+ QVBoxLayout* aLayout = new QVBoxLayout(this);
+ ModuleBase_Tools::zeroMargins(aLayout);
+
+ myStackWidget = new QStackedWidget(this);
+ myStackWidget->setContentsMargins(0,0,0,0);
+ aLayout->addWidget(myStackWidget);
+
+ // Define label for plane selection
+ QWidget* aFirstWgt = new QWidget(this);
+
+ // Size of the View control
+ mySizeOfViewWidget = new QWidget(aFirstWgt);
+ QHBoxLayout* aSizeLayout = new QHBoxLayout(mySizeOfViewWidget);
+ aSizeLayout->addWidget(new QLabel("Size of the view", mySizeOfViewWidget));
+ mySizeOfView = new QLineEdit(mySizeOfViewWidget);
+
+ QDoubleValidator* aValidator = new QDoubleValidator(0, DBL_MAX, 12, mySizeOfView);
+ aValidator->setLocale(ModuleBase_Tools::doubleLocale());
+ aValidator->setNotation(QDoubleValidator::StandardNotation);
+ mySizeOfView->setValidator(aValidator);
+ aSizeLayout->addWidget(mySizeOfView);
+
+ QString aText = QString::fromStdString(theData->getProperty("title"));
+ QLabel* aLabel = new QLabel(aText, aFirstWgt);
+ aLabel->setWordWrap(true);
+ QString aTooltip = QString::fromStdString(theData->getProperty("tooltip"));
+ aLabel->setToolTip(aTooltip);
+ aLabel->setIndent(5);
+
+ aLayout = new QVBoxLayout(aFirstWgt);
+ ModuleBase_Tools::zeroMargins(aLayout);
+ aLayout->addWidget(mySizeOfViewWidget);
+ aLayout->addWidget(aLabel);
+ aLayout->addStretch(1);
+
+ myStackWidget->addWidget(aFirstWgt);
+
+ // Define widget for sketch manmagement
+ QWidget* aSecondWgt = new QWidget(this);
+ aLayout = new QVBoxLayout(aSecondWgt);
+ ModuleBase_Tools::zeroMargins(aLayout);
+
+ QGroupBox* aViewBox = new QGroupBox(tr("Sketcher plane"), this);
+ QVBoxLayout* aViewLayout = new QVBoxLayout(aViewBox);
+
+ myViewInverted = new QCheckBox(tr("Reversed"), aViewBox);
+ aViewLayout->addWidget(myViewInverted);
+
+ QPushButton* aSetViewBtn =
+ new QPushButton(QIcon(":icons/plane_view.png"), tr("Set plane view"), aViewBox);
+ connect(aSetViewBtn, SIGNAL(clicked(bool)), this, SLOT(onSetPlaneView()));
+ aViewLayout->addWidget(aSetViewBtn);
+
+ aLayout->addWidget(aViewBox);
+
+ QMap<PartSet_Tools::ConstraintVisibleState, QString> aStates;
+ aStates[PartSet_Tools::Geometrical] = tr("Show geometrical constraints");
+ aStates[PartSet_Tools::Dimensional] = tr("Show dimensional constraints");
+ aStates[PartSet_Tools::Expressions] = tr("Show existing expressions");
+
+ QMap<PartSet_Tools::ConstraintVisibleState, QString>::const_iterator anIt = aStates.begin(),
+ aLast = aStates.end();
+ for (; anIt != aLast; anIt++) {
+ QCheckBox* aShowConstraints = new QCheckBox(anIt.value(), this);
+ connect(aShowConstraints, SIGNAL(toggled(bool)), this, SLOT(onShowConstraint(bool)));
+ aLayout->addWidget(aShowConstraints);
+
+ PartSet_Tools::ConstraintVisibleState aState = anIt.key();
+ myShowConstraints[aState] = aShowConstraints;
+
+ if (toShowConstraints.contains(aState))
+ aShowConstraints->setChecked(toShowConstraints[aState]);
+ }
+
+ myStackWidget->addWidget(aSecondWgt);
+ //setLayout(aLayout);
+
+ myPreviewPlanes = new PartSet_PreviewPlanes();