+ /// If operation needs to redisplay its result during operation
+ /// then this method has to return True
+ virtual bool hasPreview() const { return false; }
+
+ /// Initialisation of operation with preliminary selection
+ /// \param theSelected the list of selected presentations
+ /// \param theHighlighted the list of highlighted presentations
+ /// \param theViewer a viewer to have the viewer the eye position
+ virtual void initSelection(ModuleBase_ISelection* theSelection,
+ ModuleBase_IViewer* /* theViewer*/);
+
+ virtual void setPropertyPanel(ModuleBase_IPropertyPanel* theProp);
+
+ ModuleBase_IPropertyPanel* propertyPanel() const { return myPropertyPanel; }
+
+ /// Activates widgets by preselection if it is accepted
+ virtual bool activateByPreselection();
+
+signals:
+ void started(); /// the operation is started
+ void aborted(); /// the operation is aborted
+ void committed(); /// the operation is committed
+ void stopped(); /// the operation is aborted or committed
+ void resumed(); /// the operation is resumed
+
+ public slots:
+ /// Starts operation
+ /// Public slot. Verifies whether operation can be started and starts operation.
+ /// This slot is not virtual and cannot be redefined. Redefine startOperation method
+ /// to change behavior of operation. There is no point in using this method. It would
+ /// be better to inherit own operator from base one and redefine startOperation method
+ /// instead.
+ void start();
+ /// Resumes operation
+ /// Public slot. Verifies whether operation can be started and starts operation.
+ /// This slot is not virtual and cannot be redefined. Redefine startOperation method
+ /// to change behavior of operation. There is no point in using this method. It would
+ /// be better to inherit own operator from base one and redefine startOperation method
+ /// instead.
+ void resume();
+ /// Aborts operation
+ /// Public slot. Aborts operation. This slot is not virtual and cannot be redefined.
+ /// Redefine abortOperation method to change behavior of operation instead
+ void abort();
+ /// 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);
+
+ // Data model methods.
+ /// Stores a custom value in model.
+ virtual void storeCustomValue();
+
+ /// Slots which listen the mode widget activation
+ /// \param theWidget the model widget
+ virtual void onWidgetActivated(ModuleBase_ModelWidget* theWidget);
+
+ protected:
+ /// Virtual method called when operation started (see start() method for more description)
+ /// Default impl calls corresponding slot and commits immediately.