Salome HOME
Update viewer after selection clear for OCCT 7.4.0.
[modules/shaper.git] / src / PartSet / PartSet_WidgetSketchLabel.h
index b4158194bf4f8947b666b5cf621aeb5d9f63086c..ba5c2bb50185909acf9f1e81bb5950cdd459a628 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <TopoDS_Shape.hxx>
 
+#include <QStackedWidget>
 #include <QMap>
 
 class PartSet_PreviewPlanes;
@@ -41,6 +42,8 @@ class XGUI_Workshop;
 class QCheckBox;
 class QStackedWidget;
 class QLineEdit;
+class QPushButton;
+class QDialog;
 
 /**
 * \ingroup Modules
@@ -109,6 +112,12 @@ public:
   /// \param thePrs a presentation
   static bool canFillSketch(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
 
+  /// If widgets has several panels then this method has to show a page which contains information
+  /// for current feature. By default does nothing
+  virtual void showInformativePage() {
+    if (myStackWidget) myStackWidget->setCurrentIndex(1);
+  }
+
 signals:
   /// Signal on plane selection
   void planeSelected(const std::shared_ptr<GeomAPI_Pln>& thePln);
@@ -152,10 +161,7 @@ protected:
     return true;
   }
 
-  virtual bool restoreValueCustom()
-  {
-    return true;
-  }
+  virtual bool restoreValueCustom();
 
   /// The methiod called when widget is activated
   virtual void activateCustom();
@@ -196,6 +202,9 @@ protected:
   /// \param thePrs a presentation
   bool fillSketchPlaneBySelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
 
+
+  virtual void showEvent(QShowEvent* theEvent);
+
 private slots:
   /// A slot called on set sketch plane view
   void onSetPlaneView();
@@ -206,6 +215,10 @@ private slots:
 
   void onChangePlane();
 
+  void onShowDOF();
+
+  void onShowPanel();
+
 private:
   /// Set sketch plane by shape
   /// \param theShape a planar face
@@ -237,8 +250,14 @@ private:
   QLineEdit* mySizeOfView; ///< Value of square of size of View
   QStackedWidget* myStackWidget;
 
+  QLabel* myDoFLabel;
+  QPushButton* myShowDOFBtn;
+
   bool myOpenTransaction;
   bool myIsSelection;
+
+  QDialog* myPartSetMessage;
+  QDialog* mySizeMessage;
 };
 
 #endif