]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_InspectionPanel.h
Salome HOME
27ea2a8b2910db0364639c571fedc110dee3dfbc
[modules/shaper.git] / src / XGUI / XGUI_InspectionPanel.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef XGUI_INSPECTIONPANEL_H_
22 #define XGUI_INSPECTIONPANEL_H_
23
24 #include "XGUI.h"
25
26 #include <QDockWidget>
27
28 class XGUI_SelectionMgr;
29 class QLineEdit;
30 class QTableWidget;
31 class QLabel;
32 class QTextBrowser;
33
34 /// Internal name of property panel widget
35 const static char* INSPECTION_PANEL = "inspection_panel_dock";
36
37 class XGUI_EXPORT XGUI_InspectionPanel : public QDockWidget
38 {
39   Q_OBJECT
40 public:
41   enum SudShape {
42     ShapeId,
43     CompoundId,
44     CompsolidId,
45     SolidId,
46     ShellId,
47     FaceId,
48     WireId,
49     EdgeId,
50     VertexId
51   };
52
53   /// Constructor
54   /// \param theParent is a parent of the property panel
55   /// \param theMgr operation manager
56   XGUI_InspectionPanel(QWidget* theParent, XGUI_SelectionMgr* theMgr);
57
58   virtual ~XGUI_InspectionPanel();
59
60   void setSubShapeValue(SudShape theId, int theVal);
61
62   void setName(const QString& theName);
63
64   // Set of type parameters
65   void setCylinderType(double theX, double theY, double theZ,
66     double theDX, double theDY, double theDZ, double theRadius, double theHeight);
67
68   void setSphereType(double theX, double theY, double theZ, double theRadius);
69
70   void setBoxType(double theX, double theY, double theZ,
71     double theXsize, double theYsize, double theZsize);
72
73   void setRotatedBoxType(double theX, double theY, double theZ,
74     double theZaxisX, double theZaxisY, double theZaxisZ,
75     double theXaxisX, double theXaxisY, double theXaxisZ,
76     double theXsize, double theYsize, double theZsize);
77
78   void setPlaneType(double theX, double theY, double theZ,
79     double theDX, double theDY, double theDZ);
80
81   void setVertexType(double theX, double theY, double theZ);
82
83 private slots:
84   void onSelectionChanged();
85
86 private:
87   XGUI_SelectionMgr* mySelectionMgr;
88
89   QLineEdit* myNameEdt;
90   QTableWidget* mySubShapesTab;
91   QLabel* myTypeLbl;
92   QTextBrowser* myTypeParams;
93 };
94
95 #endif