X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_SketcherMgr.h;h=062bd102f2f876701d1ed66fb20dd2f48a18e43b;hb=fb54db5e1466b16dfc029c4a7364a67a9a6a8c24;hp=113abadd2a852ba76c0aeb0d28396c1211e18ff1;hpb=0b6f36afb6768202f1d1c18b69b18f4871c56c8e;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 113abadd2..062bd102f 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -9,6 +9,7 @@ #include "PartSet.h" +#include "PartSet_Filters.h" #include "PartSet_Tools.h" #include @@ -34,6 +35,8 @@ class ModuleBase_Operation; class XGUI_OperationMgr; class XGUI_Workshop; +class Handle_AIS_InteractiveObject; + class QMouseEvent; /** @@ -148,7 +151,8 @@ public: /// Commit the operation if it is possible. If the operation is dimention constraint, /// it gives widget editor to input dimention value - void operationActivatedByPreselection(); + /// \return true if the operation is stopped after activation + bool operationActivatedByPreselection(); /// Returns True if there are available Undos and the sketch manager allows undo /// \return the boolean result @@ -236,6 +240,11 @@ public: /// \param theModes a list of modes static void sketchSelectionModes(QIntList& theModes); + /// Create specific for the module presentation + /// \param theResult an object for presentation + /// \return created presentation or NULL(default value) + virtual Handle_AIS_InteractiveObject createPresentation(const ResultPtr& theResult); + /// Connects or disconnects to the value changed signal of the property panel widgets /// \param theWidget a property contol widget /// \param isToConnect a boolean value whether connect or disconnect @@ -245,14 +254,24 @@ public: /// \param thePreviousState the previous widget value state void widgetStateChanged(int thePreviousState); + /// If the current operation is a dimention one, the style of dimension visualization is send for + /// the current object + /// \param theObject an object to be customized + void customizePresentation(const ObjectPtr& theObject); + + /// Update sketch presentations according to the the state + /// \param theType a type of sketch visualization style + /// \param theState a boolean state + void updateBySketchParameters(const PartSet_Tools::ConstraintVisibleState& theType, + bool theState); + public slots: /// Process sketch plane selected event void onPlaneSelected(const std::shared_ptr& thePln); +private slots: /// Toggle show constraints void onShowConstraintsToggle(int theType, bool theState); - -private slots: /// Process the enter mouse to the view port. If the current operation is a create of /// a nested sketch feature, it updates internal flags to display the feature on mouse move void onEnterViewPort(); @@ -283,6 +302,12 @@ private: void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, Point& thePoint); + /// Show distance value editor if it is a distance operation and all attribute references + /// are filled by preseletion + /// \return true if the value is accepted + static bool setDistanceValueByPreselection(ModuleBase_Operation* theOperation, + ModuleBase_IWorkshop* theWorkshop); + typedef QMap, std::set > > FeatureToSelectionMap; @@ -356,6 +381,7 @@ private: CompositeFeaturePtr myCurrentSketch; + Handle(PartSet_CirclePointFilter) myCirclePointFilter; Handle(ModuleBase_ShapeInPlaneFilter) myPlaneFilter; FeatureToSelectionMap myCurrentSelection; bool myPreviousUpdateViewerEnabled;