From: vsv Date: Tue, 8 Oct 2019 11:17:52 +0000 (+0300) Subject: Task #2997: Add button "Show DOF" X-Git-Tag: V9_5_0a1~167^2~97 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=156333d6ed445c784552815acc68e5cbd1be02c8;p=modules%2Fshaper.git Task #2997: Add button "Show DOF" --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index ae937d345..2d9fd7d4f 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -182,9 +182,16 @@ myIsSelection(false) connect(aPlaneBtn, SIGNAL(clicked(bool)), SLOT(onChangePlane())); aLayout->addWidget(aPlaneBtn); + aLayout->addSpacing(15); + myDoFLabel = new QLabel("", aSecondWgt); aLayout->addWidget(myDoFLabel); + myShowDOFBtn = new QPushButton(tr("Show remaining DoFs"), aSecondWgt); + aLayout->addWidget(myShowDOFBtn); + myShowDOFBtn->hide(); + connect(myShowDOFBtn, SIGNAL(clicked(bool)), SLOT(onShowDOF())); + myStackWidget->addWidget(aSecondWgt); //setLayout(aLayout); @@ -751,14 +758,23 @@ bool PartSet_WidgetSketchLabel::restoreValueCustom() int aDoF = aVal.toInt(); if (aDoF == 0) { myDoFLabel->setText(tr("Sketch is fully fixed (DoF = 0)")); + myShowDOFBtn->hide(); } else { myDoFLabel->setText(tr("DoF (degrees of freedom) = ") + aVal); + myShowDOFBtn->show(); } } } else { myDoFLabel->setText(""); + myShowDOFBtn->hide(); } } return true; } + + +void PartSet_WidgetSketchLabel::onShowDOF() +{ + +} \ No newline at end of file diff --git a/src/PartSet/PartSet_WidgetSketchLabel.h b/src/PartSet/PartSet_WidgetSketchLabel.h index fe9c14716..0e19d7470 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.h +++ b/src/PartSet/PartSet_WidgetSketchLabel.h @@ -41,6 +41,7 @@ class XGUI_Workshop; class QCheckBox; class QStackedWidget; class QLineEdit; +class QPushButton; /** * \ingroup Modules @@ -203,6 +204,8 @@ private slots: void onChangePlane(); + void onShowDOF(); + private: /// Set sketch plane by shape /// \param theShape a planar face @@ -235,6 +238,7 @@ private: QStackedWidget* myStackWidget; QLabel* myDoFLabel; + QPushButton* myShowDOFBtn; bool myOpenTransaction; bool myIsSelection;