X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetSketchLabel.h;h=5d4ad6f52eebe4a30c4e86e45e81459e754b87de;hb=50c050906e6b5926727fcbadcbf4247326ef60be;hp=442f319074c52a5a8f34982b4a0a888897936bfb;hpb=cd9217d7e87997ec8bc150a6d8c389e742ca0f84;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetSketchLabel.h b/src/PartSet/PartSet_WidgetSketchLabel.h index 442f31907..5d4ad6f52 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.h +++ b/src/PartSet/PartSet_WidgetSketchLabel.h @@ -8,10 +8,19 @@ #include "PartSet.h" #include +#include + +#include +#include +#include + +#include +#include class QLabel; class XGUI_OperationMgr; -class PartSet_OperationSketch; +class XGUI_Workshop; +//class PartSet_OperationSketch; class PARTSET_EXPORT PartSet_WidgetSketchLabel : public ModuleBase_ModelWidget { @@ -20,10 +29,7 @@ Q_OBJECT PartSet_WidgetSketchLabel(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId); - virtual ~PartSet_WidgetSketchLabel() - { - } - ; + virtual ~PartSet_WidgetSketchLabel(); /// Saves the internal parameters to the given feature /// \param theFeature a model feature to be changed @@ -43,17 +49,49 @@ Q_OBJECT QWidget* getControl() const; - void setOperationsMgr(XGUI_OperationMgr* theMgr); + /// The methiod called when widget is activated + virtual void activate(); + + /// The methiod called when widget is deactivated + virtual void deactivate(); + + XGUI_Workshop* workshop() const { return myWorkshop; } + + void setWorkshop(XGUI_Workshop* theWork) { myWorkshop = theWork; } + + std::shared_ptr plane() const; + +signals: + void planeSelected(const std::shared_ptr& thePln); private slots: void onPlaneSelected(); private: - void updateLabel(PartSet_OperationSketch* theSketchOpe); + AISObjectPtr createPreviewPlane(std::shared_ptr theOrigin, + std::shared_ptr theNorm, + const int theRGB[3]); + + std::shared_ptr setSketchPlane(const TopoDS_Shape& theShape); + + void erasePreviewPlanes(); + void showPreviewPlanes(); + + void setSketchingMode(); QLabel* myLabel; QString myText; QString myTooltip; + + XGUI_Workshop* myWorkshop; + + AISObjectPtr myYZPlane; + AISObjectPtr myXZPlane; + AISObjectPtr myXYPlane; + bool myPreviewDisplayed; + + Handle(StdSelect_FaceFilter) myFaceFilter; + //Handle(ModuleBase_ShapeInPlaneFilter) mySketchFilter; }; #endif