Salome HOME
Copyright update 2020
[modules/shaper.git] / src / PartSet / PartSet_WidgetSketchLabel.h
index fbc3395025b9a084472fc26643397e4c907d7dd9..e6eec1e01bedc23bd524aad3ed25b06d792948e7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -31,6 +31,7 @@
 
 #include <TopoDS_Shape.hxx>
 
+#include <QStackedWidget>
 #include <QMap>
 
 class PartSet_PreviewPlanes;
@@ -41,6 +42,7 @@ class XGUI_Workshop;
 class QCheckBox;
 class QStackedWidget;
 class QLineEdit;
+class QPushButton;
 class QDialog;
 
 /**
@@ -110,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);
@@ -194,9 +202,15 @@ protected:
   /// \param thePrs a presentation
   bool fillSketchPlaneBySelection(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
 
-
+  /// Redefinition of a virtual function
   virtual void showEvent(QShowEvent* theEvent);
 
+  /// Redefinition of a virtual function
+  virtual void hideEvent(QHideEvent* theEvent);
+
+  /// Redefinition of a virtual function
+  virtual bool eventFilter(QObject* theObj, QEvent* theEvent);
+
 private slots:
   /// A slot called on set sketch plane view
   void onSetPlaneView();
@@ -207,6 +221,10 @@ private slots:
 
   void onChangePlane();
 
+  void onShowDOF();
+
+  void onShowPanel();
+
 private:
   /// Set sketch plane by shape
   /// \param theShape a planar face
@@ -239,12 +257,15 @@ private:
   QStackedWidget* myStackWidget;
 
   QLabel* myDoFLabel;
+  QPushButton* myShowDOFBtn;
 
   bool myOpenTransaction;
   bool myIsSelection;
 
   QDialog* myPartSetMessage;
   QDialog* mySizeMessage;
+
+  GeomPlanePtr myTmpPlane;
 };
 
 #endif