+ /// Commits operation
+ /// Public slot. Commits operation. This slot is not virtual and cannot be redefined.
+ /// Redefine commitOperation method to change behavior of operation instead
+ bool commit();
+
+ /// Alias for start/abort slots
+ /// Public slot. Aborts operation if false, else does nothing.
+ /// Provided for S/S compatibility with QAction's toggle(bool)
+ /// \param theState th flag to abort, if it is true, do nothing, overwise abort
+ void setRunning(bool theState);
+
+ protected:
+ /// Virtual method called when operation started (see start() method for more description)
+ /// Default impl calls corresponding slot and commits immediately.
+ virtual void startOperation() {}
+
+ /// Implementation of specific steps on postpone operation
+ virtual void postponeOperation() {}
+
+ /// Virtual method called when operation stopped - committed or aborted.
+ virtual void stopOperation() {}
+
+ /// Virtual method called when operation aborted (see abort() method for more description)
+ virtual void abortOperation() {}
+
+ /// Virtual method called when operation committed (see commit() method for more description)
+ virtual void commitOperation() {}
+
+ /// Virtual method called after operation committed (see commit() method for more description)
+ virtual void afterCommitOperation() {}
+
+ /// Virtual method called after operation resume (see resume() method for more description)
+ virtual void resumeOperation() {}
+
+ /// Creates an operation new feature
+ /// \param theFlushMessage the flag whether the create message should be flushed
+ /// \returns the created feature
+ virtual FeaturePtr createFeature(const bool theFlushMessage = true);
+
+ /// Verifies whether this operator can be commited.
+ /// \return Returns TRUE if current operation can be committed, e.g. all parameters are filled
+ virtual bool canBeCommitted() const;
+
+ /// Return a widget value point by the selection and the viewer position
+ /// The default realization returns false
+ /// \param thePrs the presentation
+ /// \param theViewer a viewer to have the viewer the eye position
+ /// \param theX the horizontal coordinate
+ /// \param theY the vertical coordinate
+ /// \return true if the point exits in the selection
+ virtual bool getViewerPoint(ModuleBase_ViewerPrs thePrs,
+ ModuleBase_IViewer* theViewer,
+ double& theX, double& theY);
+
+ /// Removes the preselection information and clears the map of preselection
+ void clearPreselection();
+
+ protected:
+ /// The operation feature to be handled
+ FeaturePtr myFeature;