+ /// Returns the operation description
+ /// /returns the instance of the description class
+ ModuleBase_OperationDescription* getDescription() const { return myDescription; }
+
+ /// Returns list of granted operation indices
+ const QStringList& grantedOperationIds() const;
+
+ /// Sets list of operation indices, which can be started without the current operation stop
+ /// \param theList an ids
+ void setGrantedOperationIds(const QStringList& theList);
+
+ /// Must return true if this operation can be launched as nested for any current operation
+ /// and it is not necessary to check this operation on validity. By default
+ /// the operation is not granted.
+ /// The method has to be redefined for granted operations.
+ virtual bool isGranted(QString theId) const;
+
+ /// Returns True if data of its feature was modified during operation
+ virtual bool isModified() const { return myIsModified; }
+
+ /// Change the modified state of the operation
+ void setIsModified(const bool theIsModified) { myIsModified = theIsModified; }
+
+ /// Returns operations Id from it's description
+ QString id() const;
+
+ /// Must return True if the operation's feature is valid.
+ /// Since IOperation does not have any feature returns false.
+ virtual bool isValid() const;
+
+ /// \brief Set property pane to the operation
+ /// \param theProp a property panel instance
+ virtual void setPropertyPanel(ModuleBase_IPropertyPanel* theProp);
+
+ /// \return Currently installed property panel
+ ModuleBase_IPropertyPanel* propertyPanel() const { return myPropertyPanel; }
+
+ QString helpFileName() const { return myHelpFileName; }
+
+ void setHelpFileName(QString theName) {
+ myHelpFileName = theName;
+ }
+
+signals:
+ /// The operation is started
+ void beforeStarted();
+ /// The operation is started
+ void started();
+
+ /// The operation is aborted
+ void beforeAborted();
+ /// The operation is aborted
+ void aborted();
+
+ /// The operation is committed
+ void beforeCommitted();
+ /// The operation is committed
+ void committed();
+
+ /// The operation is aborted or committed
+ void stopped();
+
+ /// The operation is resumed
+ void resumed();
+
+ /// The operation is postponed
+ void postponed();
+
+ 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.
+ /// \return true if the start is successful
+ virtual bool start();
+
+ /// Deactivates current operation which can be resumed later.
+ virtual void postpone();
+
+ /// 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.
+ virtual 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
+ virtual 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
+ virtual bool commit();
+
+ /// Changes the modified flag of the operation
+ void onValuesChanged();
+
+ /// Changes the modified flag of the operation if the current state of the widget is modified
+ /// \param thePreviousState the previous vlaue state of the widget
+ void onValueStateChanged(int thePreviousState);
+
+ protected: