1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef XGUI_INSPECTIONPANEL_H_
22 #define XGUI_INSPECTIONPANEL_H_
26 #include <TopoDS_Shape.hxx>
27 #include <TopoDS_Solid.hxx>
29 #include <QDockWidget>
31 class XGUI_SelectionMgr;
37 /// Internal name of property panel widget
38 const static char* INSPECTION_PANEL = "inspection_panel_dock";
40 class XGUI_EXPORT XGUI_InspectionPanel : public QDockWidget
57 /// \param theParent is a parent of the property panel
58 /// \param theMgr operation manager
59 XGUI_InspectionPanel(QWidget* theParent, XGUI_SelectionMgr* theMgr);
61 virtual ~XGUI_InspectionPanel();
64 void onSelectionChanged();
67 void setSubShapeValue(SudShape theId, int theVal);
69 void setName(const QString& theName);
71 // Set type parameters
72 void setCylinderType(const gp_XYZ& theLoc, const gp_XYZ& theDir,
73 double theRadius, double theHeight);
75 void setConeType(const gp_XYZ& theLoc, const gp_XYZ& theDir,
76 double theRad1, double theRad2, double theHeight);
78 void setTorusType(const gp_XYZ& theLoc, const gp_XYZ& theDir,
79 double theRad1, double theRad2);
81 void setSphereType(const gp_XYZ& theLoc, double theRadius);
83 void setBoxType(double theX, double theY, double theZ,
84 double theXsize, double theYsize, double theZsize);
86 void setRotatedBoxType(double theX, double theY, double theZ,
87 double theZaxisX, double theZaxisY, double theZaxisZ,
88 double theXaxisX, double theXaxisY, double theXaxisZ,
89 double theXsize, double theYsize, double theZsize);
91 void setPlaneType(const gp_XYZ& theLoc, const gp_XYZ& theDir);
93 void setVertexType(const gp_XYZ& theLoc);
95 void setCircleType(const gp_XYZ& theLoc, const gp_XYZ& theDir, double theRadius);
97 void setArcType(const gp_XYZ& theLoc, const gp_XYZ& theDir, double theRadius,
98 const gp_XYZ& theP1, const gp_XYZ& theP2);
100 void setEllipseType(const gp_XYZ& theLoc, const gp_XYZ& theDir,
101 double theMajorRad, double theMinorRad);
103 void setEllipseArcType(const gp_XYZ& theLoc, const gp_XYZ& theDir,
104 double theMajorRad, double theMinorRad, const gp_XYZ& theP1, const gp_XYZ& theP2);
106 void setLineType(const gp_XYZ& theP1, const gp_XYZ& theP2);
108 void setShapeContent(const TopoDS_Shape& theShape);
110 void setShapeParams(const TopoDS_Shape& theShape);
114 void fillVertex(const TopoDS_Shape& theShape);
116 void fillEdge(const TopoDS_Shape& theShape);
118 void fillFace(const TopoDS_Shape& theShape);
120 void fillSolid(const TopoDS_Shape& theShape);
122 void fillContainer(const TopoDS_Shape& theShape);
124 bool processSphere(const TopoDS_Solid& theSolid);
127 XGUI_SelectionMgr* mySelectionMgr;
129 QLineEdit* myNameEdt;
130 QTableWidget* mySubShapesTab;
132 QTextBrowser* myTypeParams;