- /// SLOT, Defines Sketch editing mode
- /// \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
- /// \param theMode the mode appeared on the feature
- //void onFeatureConstructed(ObjectPtr theFeature, int theMode);
-
- /// Slot which reacts to the point 2d set to the feature. Creates a constraint
- /// \param the feature
- /// \param the attribute of the feature
- //void onStorePoint2D(ObjectPtr theFeature, const std::string& theAttribute);
-
- /// Called when sketch is launched
- //void onSketchLaunched();
+ /// Realizes some functionality by an operation start
+ /// Displays all sketcher sub-Objects, hides sketcher result, appends selection filters
+ /// \param theOperation a started operation
+ virtual void operationStarted(ModuleBase_Operation* theOperation);
+
+ /// Realizes some functionality by an operation commit
+ /// Restarts sketcher operation automatically of it is necessary
+ /// \param theOperation a committed operation
+ virtual void operationCommitted(ModuleBase_Operation* theOperation);
+
+ /// Realizes some functionality by an operation abort
+ /// Hides all sketcher sub-Objects, displays sketcher result and removes selection filters
+ /// \param theOperation an aborted operation
+ virtual void operationAborted(ModuleBase_Operation* theOperation);
+
+ /// Realizes some functionality by an operation stop
+ /// Hides all sketcher sub-Objects, displays sketcher result and removes selection filters
+ /// \param theOperation a stopped operation
+ virtual void operationStopped(ModuleBase_Operation* theOperation);
+
+ /// Returns action according to the given ID
+ /// \param theId an action identifier, it should be uniqued in the bounds of the module
+ QAction* action(const QString& theId) const;
+
+ /// Returns True if there are available Undos and the sketch manager allows undo
+ /// \return the boolean result
+ virtual bool canUndo() const;
+
+ //! Returns True if there are available Redos and the sketch manager allows redo
+ /// \return the boolean result
+ virtual bool canRedo() const;
+
+ /// Returns whether the object can be displayed at the bounds of the active operation.
+ /// Display only current operation results for usual operation and ask the sketcher manager
+ /// if it is a sketch operation
+ /// \param theObject a model object
+ virtual bool canDisplayObject(const ObjectPtr& theObject) const;
+ /// Add menu atems for viewer into the given menu
+ /// \param theMenu a popup menu to be shown in the viewer
+ virtual void addViewerItems(QMenu* theMenu) const;
+
+public slots:
+ /// SLOT, that is called by no more widget signal emitted by property panel
+ /// Set a specific flag to restart the sketcher operation
+ void onNoMoreWidgets();
+
+ /// Processes the context menu action click
+ /// \param isChecked a state of toggle if the action is checkable
+ void onAction(bool isChecked);