#include "XGUI.h"
#include <ModelAPI_Feature.h>
+#include <GeomAlgoAPI_ShapeInfo.h>
#include <QDockWidget>
class TopoDS_Shape;
-class GeomAPI_Vertex;
-class GeomAPI_Edge;
-class GeomAPI_Wire;
-class GeomAPI_Face;
-class GeomAPI_Shell;
-class GeomAPI_Solid;
-class GeomAPI_Shape;
-
-class GeomAPI_Pln;
-class GeomAPI_Sphere;
-class GeomAPI_Cylinder;
-class GeomAPI_Cone;
-class GeomAPI_Torus;
-class GeomAPI_Box;
class ModuleBase_PageWidget;
/// Internal name of property panel widget
* \ingroup GUI
* A class which represents an inspection panel: to show content of currently selected objects
*/
-class XGUI_EXPORT XGUI_InspectionPanel : public QDockWidget
+class XGUI_EXPORT XGUI_InspectionPanel : public QDockWidget, public GeomAlgoAPI_ShapeInfo::Translator
{
Q_OBJECT
public:
// Destructor
virtual ~XGUI_InspectionPanel();
+ // A translator of resource strings, needed for ShapeInfo.
+ virtual std::string translate(const char* theSource) override;
+
+
protected:
virtual void showEvent(QShowEvent* theEvent);
/// \param theShape the shape
void setShapeContent(const TopoDS_Shape& theShape);
- /// Set parameters of the selected shape
- /// \param theShape the shape
- void setShapeParams(const TopoDS_Shape& theShape);
-
/// Clear content of the window
void clearContent();
- /// Show parameters of a vertex
- /// \param theVertex the vertex
- void fillVertex(const std::shared_ptr<GeomAPI_Vertex>& theVertex);
-
- /// Show parameters of a edge
- /// \param theEdge the edge
- void fillEdge(const std::shared_ptr<GeomAPI_Edge>& theEdge);
-
- /// Show parameters of a wire
- /// \param theWire the wire
- void fillWire(const std::shared_ptr<GeomAPI_Wire>& theWire);
-
- /// Show parameters of a face
- /// \param theFace the face
- void fillFace(const std::shared_ptr<GeomAPI_Face>& theFace);
-
- /// Show parameters of a shell
- /// \param theShell the shell
- void fillShell(const std::shared_ptr<GeomAPI_Shell>& theShell);
-
- /// Show parameters of a solid
- /// \param theSolid the solid
- void fillSolid(const std::shared_ptr<GeomAPI_Solid>& theSolid);
-
- /// Show parameters of a compound
- /// \param theShape the compound
- void fillContainer(const std::shared_ptr<GeomAPI_Shape>& theShape);
-
- /// Show parameters of a plane
- /// \param theTitle a title of the object
- /// \param thePlane the plane
- void setPlaneType(const QString& theTitle, const std::shared_ptr<GeomAPI_Pln>& thePlane);
-
- /// Show parameters of a sphere
- /// \param theTitle a title of the object
- /// \param theSphere the sphere
- void setSphereType(const QString& theTitle, const std::shared_ptr<GeomAPI_Sphere>& theSphere);
-
- /// Show parameters of a cylinder
- /// \param theTitle a title of the object
- /// \param theCyl the cylinder
- void setCylinderType(const QString& theTitle, const std::shared_ptr<GeomAPI_Cylinder>& theCyl);
-
- /// Show parameters of a cone
- /// \param theTitle a title of the object
- /// \param theCone the cone
- void setConeType(const QString& theTitle, const std::shared_ptr<GeomAPI_Cone>& theCone);
-
- /// Show parameters of a torus
- /// \param theTitle a title of the object
- /// \param theTorus the torus
- void setTorusType(const QString& theTitle, const std::shared_ptr<GeomAPI_Torus>& theTorus);
-
- /// Show parameters of a box
- /// \param theTitle a title of the object
- /// \param theBox the box
- void setBoxType(const QString& theTitle, const std::shared_ptr<GeomAPI_Box>& theBox);
-
- /// Show parameters of a rotated box
- /// \param theTitle a title of the object
- /// \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);