Salome HOME
Update translations to French and group messages by their context.
[modules/shaper.git] / src / XGUI / XGUI_InspectionPanel.h
index e8a6f7ba6f38ead416353a2f654ce1e2e514d343..9f60ff56ea7291d00c797ce36d7c137bf4920399 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  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
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef XGUI_INSPECTIONPANEL_H_
 
 #include "XGUI.h"
 
+#include <ModelAPI_Feature.h>
+
 #include <QDockWidget>
 
 #include <memory>
 
-class XGUI_SelectionMgr;
+class XGUI_Workshop;
 class QLineEdit;
 class QTableWidget;
 class QLabel;
 class QTextBrowser;
 class QVBoxLayout;
 class QResizeEvent;
+class QStackedWidget;
+class QGridLayout;
 
 class TopoDS_Shape;
 
@@ -51,6 +54,7 @@ class GeomAPI_Cylinder;
 class GeomAPI_Cone;
 class GeomAPI_Torus;
 class GeomAPI_Box;
+class ModuleBase_PageWidget;
 
 /// Internal name of property panel widget
 const static char* INSPECTION_PANEL = "inspection_panel_dock";
@@ -79,11 +83,13 @@ public:
   /// Constructor
   /// \param theParent is a parent of the property panel
   /// \param theMgr operation manager
-  XGUI_InspectionPanel(QWidget* theParent, XGUI_SelectionMgr* theMgr);
+  XGUI_InspectionPanel(QWidget* theParent, XGUI_Workshop* theWorkshop);
 
   // Destructor
   virtual ~XGUI_InspectionPanel();
 
+protected:
+  virtual void showEvent(QShowEvent* theEvent);
 
 private slots:
   /// A slot to react on selection changed
@@ -173,20 +179,27 @@ private:
   /// \param theBox the box
   void setRotatedBoxType(const QString& theTitle, const std::shared_ptr<GeomAPI_Box>& theBox);
 
-
   /// Set text into parameters area
   /// \param theText the text
   void setParamsText(const QString& theText);
 
+  /// Fills Feature panel with controls specific to the given feature
+  /// \param theFeature the selected feature
+  void buildFeaturePane(const FeaturePtr& theFeature);
+
 private:
-  XGUI_SelectionMgr* mySelectionMgr; //> selection manager
-
-  QLineEdit* myNameEdt; //> Name field
-  QTableWidget* mySubShapesTab; //> table of sub-shapes
-  QLabel* myTypeLbl; //> label of a type
-  QTextBrowser* myTypeParams; //> parameters area
-  QVBoxLayout* myMainLayout; //> main layout
-  //QWidget* myMainWidget;  //> main widget
+  XGUI_Workshop* myWorkshop; //> selection manager
+
+  QLineEdit* myNameEdt; ///> Name field
+  QTableWidget* mySubShapesTab; ///> table of sub-shapes
+  QLabel* myTypeLbl; ///> label of a type
+  QTextBrowser* myTypeParams; ///> parameters area
+  QVBoxLayout* myMainLayout; ///> main layout
+  ModuleBase_PageWidget* myFeaturePane; ///> Content of feature property panel
+  QGridLayout* myFeatureLayout; ///> Layout of feature panel
+  QStackedWidget* myStackWgt; ///> base widget of the panel
+  int myShapePanelId;
+  int myFeaturePanelId;
 };
 
 #endif
\ No newline at end of file