X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_SketcherMgr.h;h=71ba10312df149bec88947b6d5bb2cb2e3536c80;hb=3205d0f18200948632155bbe7b640bc1e482243d;hp=d2a5226ed2a18e3c6be5f0ccb691ea7b58f05aef;hpb=7e0af4dfdaaf4168d0a6f8153e513e728bd4b544;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index d2a5226ed..71ba10312 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -93,6 +94,11 @@ public: //// \return boolean value static bool isNestedCreateOperation(ModuleBase_Operation* theOperation); + /// Returns true if the operation is an edit nested feature one + /// \param theOperation a checked operation + //// \return boolean value + static bool isNestedEditOperation(ModuleBase_Operation* theOperation); + /// Returns whether the current operation is a sketch entity - line, point, arc or circle /// \param theId is an id of object /// \return a boolean value @@ -127,6 +133,10 @@ public: /// \param theOperation a committed operation void commitNestedSketch(ModuleBase_Operation* theOperation); + /// Commit the operation if it is possible. If the operation is dimention constraint, + /// it gives widget editor to input dimention value + void operationActivatedByPreselection(); + /// Returns True if there are available Undos and the sketch manager allows undo /// \return the boolean result bool canUndo() const; @@ -154,6 +164,10 @@ public: /// \return boolean result bool canDisplayCurrentCreatedFeature() const; + /// Returns true if the current operation is nested creation or internal reentrant edit + /// \param theOperation an operation + bool canChangeCursor(ModuleBase_Operation* theOperation) const; + /// Returns state of constraints showing flag bool isConstraintsShown() const { return myIsConstraintsShown; } @@ -181,6 +195,9 @@ public: //! \return string value QString getFeatureError(const FeaturePtr& theFeature); + /// It nullify internal flags concerned to clicked mouse event + void clearClickedFlags(); + /// Returns list of strings which contains id's of sketch operations static const QStringList& sketchOperationIdList(); @@ -191,6 +208,15 @@ public: /// \param theModes a list of modes static void sketchSelectionModes(QIntList& theModes); + /// 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 + void connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, const bool isToConnect); + + /// Visualize the operation feature if the previous state is modified value in property panel + /// \param thePreviousState the previous widget value state + void widgetStateChanged(int thePreviousState); + public slots: /// Process sketch plane selected event void onPlaneSelected(const std::shared_ptr& thePln); @@ -205,13 +231,8 @@ private slots: /// Process the leave mouse of the view port. If the current operation is a create of /// a nested sketch feature, it hides the feature in the viewer void onLeaveViewPort(); - - /// Validates the operation. Apply button is disabled if the widget value is in Modified state - void onValueStateChanged(); /// Listens to the value changed signal and display the current operation feature void onBeforeValuesChangedInPropertyPanel(); - /// Listens to the signal about values are to be changed in the property panel - void onValuesChangedInPropertyPanel(); /// Listens to the signal about the modification of the values have been done in the property panel void onAfterValuesChangedInPropertyPanel(); @@ -220,7 +241,7 @@ private slots: void onMouseMoved(ModuleBase_IViewWindow*, QMouseEvent*); void onMouseDoubleClick(ModuleBase_IViewWindow*, QMouseEvent*); void onApplicationStarted(); - void onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget); + //void onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget); void onBeforeContextMenu(); void onAfterContextMenu(); @@ -269,10 +290,6 @@ private: const FeatureToSelectionMap& theSelection, SelectMgr_IndexedMapOfOwner& anOwnersToSelect); - /// Connects or disconnects to the value changed signal of the property panel widgets - /// \param isToConnect a boolean value whether connect or disconnect - void connectToPropertyPanel(const bool isToConnect); - /// Returns true if the created feature is visible /// \param bool isVisibleCreatedFeature() const; @@ -290,6 +307,7 @@ private: /// \param isToDisplay a flag about the display or erase the feature void visualizeFeature(const FeaturePtr& theFeature, const bool isEditOperation, const bool isToDisplay, const bool isFlushRedisplay = true); + private: XGUI_OperationMgr* operationMgr() const; @@ -303,7 +321,7 @@ private: bool myIsMouseOverViewProcessed; /// the state whether the over view state is processed by mouseMove method bool myIsPopupMenuActive; /// the state of the popup menu is shown Point myCurrentPoint; - Point myClickedPoint; + //Point myClickedPoint; CompositeFeaturePtr myCurrentSketch;