X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_InspectionPanel.h;h=4073ca6143e583d44743f133f0afb294eb9a4963;hb=3ce3e69a217055142b03d67add35d054979a6340;hp=552ce7774e399a2a934aa9e55477afe6307f9644;hpb=d891d2db015eba5f8eb7d25d2c9295a37057cdef;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_InspectionPanel.h b/src/XGUI/XGUI_InspectionPanel.h index 552ce7774..4073ca614 100644 --- a/src/XGUI/XGUI_InspectionPanel.h +++ b/src/XGUI/XGUI_InspectionPanel.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 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 @@ -12,10 +12,9 @@ // // 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef XGUI_INSPECTIONPANEL_H_ @@ -23,17 +22,21 @@ #include "XGUI.h" +#include + #include #include -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,9 +54,10 @@ 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"; +MAYBE_UNUSED const static char* INSPECTION_PANEL = "inspection_panel_dock"; /** * \ingroup GUI @@ -79,17 +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: - /// Vitrual method is redefined in order to adjust size of internal wirdet to size of - /// the whole whindow - /// \param theEvent an event with resize parameters - virtual void resizeEvent(QResizeEvent* theEvent); + virtual void showEvent(QShowEvent* theEvent); private slots: /// A slot to react on selection changed @@ -179,20 +179,27 @@ private: /// \param theBox the box void setRotatedBoxType(const QString& theTitle, const std::shared_ptr& 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