X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Module.h;h=a3a188ad0347ff9a10f376b7bc06d3f382f84928;hb=d22fc665c79c31c9eea0625e04c2e941adfdf7be;hp=a91f679439004b9e13ceb390b999ccde5dd5b555;hpb=771603e0ec2357cfac6a2f11bb180d0b75c82521;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index a91f67943..a3a188ad0 100644 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -5,8 +5,8 @@ #include #include +#include #include -#include #include #include @@ -17,8 +17,6 @@ #include -class QMouseEvent; -class QKeyEvent; class PartSet_Listener; class ModelAPI_Feature; class XGUI_ViewerPrs; @@ -70,26 +68,6 @@ Q_OBJECT void onOperationStopped(ModuleBase_Operation* theOperation); /// SLOT, that is called afetr the popup menu action clicked. void onContextMenuCommand(const QString& theId, bool isChecked); - /// SLOT, that is called by mouse press in the viewer. - /// The mouse released point is sent to the current operation to be processed. - /// \param theEvent the mouse event - void onMousePressed(QMouseEvent* theEvent); - /// SLOT, that is called by mouse release in the viewer. - /// The mouse released point is sent to the current operation to be processed. - /// \param theEvent the mouse event - void onMouseReleased(QMouseEvent* theEvent); - /// SLOT, that is called by mouse move in the viewer. - /// The mouse moved point is sent to the current operation to be processed. - /// \param theEvent the mouse event - void onMouseMoved(QMouseEvent* theEvent); - - /// SLOT, that is called by the key in the viewer is clicked. - /// \param theEvent the mouse event - void onKeyRelease(QKeyEvent* theEvent); - - /// SLOT, that is called by the mouse double click in the viewer. - /// \param theEvent the mouse event - void onMouseDoubleClick(QMouseEvent* theEvent); /// SLOT, to apply to the current viewer the operation /// \param theX the X projection value @@ -116,7 +94,8 @@ Q_OBJECT void onSetSelection(const QList& theFeatures); /// SLOT, Defines Sketch editing mode - void setSketchingMode(); + /// \param thePln - plane of current sketch + void setSketchingMode(const gp_Pln& thePln); /// SLOT, to visualize the feature in another local context mode /// \param theFeature the feature to be put in another local context mode @@ -128,6 +107,36 @@ Q_OBJECT /// \param the attribute of the feature void onStorePoint2D(ObjectPtr theFeature, const std::string& theAttribute); + /// Called when sketch is launched + void onSketchLaunched(); + +protected slots: + /// Called on selection changed event + virtual void onSelectionChanged(); + + /// SLOT, that is called by mouse press in the viewer. + /// The mouse released point is sent to the current operation to be processed. + /// \param theEvent the mouse event + virtual void onMousePressed(QMouseEvent* theEvent); + + /// SLOT, that is called by mouse release in the viewer. + /// The mouse released point is sent to the current operation to be processed. + /// \param theEvent the mouse event + virtual void onMouseReleased(QMouseEvent* theEvent); + + /// SLOT, that is called by mouse move in the viewer. + /// The mouse moved point is sent to the current operation to be processed. + /// \param theEvent the mouse event + virtual void onMouseMoved(QMouseEvent* theEvent); + + /// SLOT, that is called by the mouse double click in the viewer. + /// \param theEvent the mouse event + virtual void onMouseDoubleClick(QMouseEvent* theEvent); + + /// SLOT, that is called by the key in the viewer is clicked. + /// \param theEvent the mouse event + virtual void onKeyRelease(QKeyEvent* theEvent); + protected: /// Creates a new operation /// \param theCmdId the operation name @@ -140,15 +149,16 @@ Q_OBJECT //! Edits the feature void editFeature(FeaturePtr theFeature); + gp_Pln getSketchPlane(FeaturePtr theSketch) const; + private: //XGUI_Workshop* myWorkshop; PartSet_Listener* myListener; std::map myFeaturesInFiles; - /// A filter which provides selection within a current document or whole PartSet - Handle(XGUI_ShapeDocumentFilter) myDocumentShapeFilter; Handle(StdSelect_FaceFilter) myPlaneFilter; + Handle(ModuleBase_ShapeInPlaneFilter) mySketchFilter; }; #endif