|
SHAPER
9.15.0
|
Base class for all operations. More...

Public Slots | |
| virtual bool | start () |
| Starts operation Public slot. More... | |
| void | abort () |
| Aborts operation Public slot. More... | |
| bool | commit () |
| Commits operation Public slot. More... | |
| virtual void | postpone () |
| Deactivates current operation which can be resumed later. More... | |
| virtual void | resume () |
| Resumes operation Public slot. More... | |
| void | onValuesChanged () |
| Changes the modified flag of the operation. More... | |
| void | onValueStateChanged (int thePreviousState) |
| Changes the modified flag of the operation if the current state of the widget is modified. More... | |
Signals | |
| void | beforeStarted () |
| The operation is started. More... | |
| void | started () |
| The operation is started. More... | |
| void | beforeAborted () |
| The operation is aborted. More... | |
| void | aborted () |
| The operation is aborted. More... | |
| void | beforeCommitted () |
| The operation is committed. More... | |
| void | committed () |
| The operation is committed. More... | |
| void | stopped () |
| The operation is aborted or committed. More... | |
| void | resumed () |
| The operation is resumed. More... | |
| void | postponed () |
| The operation is postponed. More... | |
Public Member Functions | |
| ModuleBase_OperationFeature (const QString &theId="", QObject *theParent=0) | |
| Constructor. More... | |
| virtual | ~ModuleBase_OperationFeature () |
| Destructor. More... | |
| bool | isEditOperation () const |
| Returns True id the current operation is launched in editing mode. More... | |
| void | setEditOperation (const bool &isEditState) |
| Change the operation mode from create to edit. More... | |
| FeaturePtr | feature () const |
| Returns the operation feature. More... | |
| virtual bool | isValid () const |
| Must return True if the operation's feature is valid. More... | |
| void | setFeature (FeaturePtr theFeature) |
| Sets the operation feature. More... | |
| virtual bool | hasObject (ObjectPtr theObj) const |
| Returns True if the current operation works with the given object (feature or result) More... | |
| virtual bool | isDisplayedOnStart (ObjectPtr theObject) |
| Returns true if the object is displayed when the operation was started. More... | |
| virtual void | initSelection (const QList< std::shared_ptr< ModuleBase_ViewerPrs >> &thePreSelected) |
| Initialisation of operation with preliminary selection. More... | |
| void | setPreselection (const QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues) |
| Fill internal map by preselection. More... | |
| virtual void | setPropertyPanel (ModuleBase_IPropertyPanel *theProp) |
| Set property pane to the operation. More... | |
| virtual ModuleBase_ModelWidget * | activateByPreselection (const std::string &theGreedAttributeId) |
| Activates widgets by preselection if it is accepted. More... | |
| void | setParentFeature (CompositeFeaturePtr theParent) |
| If the operation works with feature which is sub-feature of another one then this variable has to be initialised by parent feature before operation feature creating. More... | |
| CompositeFeaturePtr | parentFeature () const |
| void | setPreviousCurrentFeature (const FeaturePtr &theFeature) |
| Stores the previous to the operation current feature. More... | |
| FeaturePtr | previousCurrentFeature () |
| Returns the previous to the operation current feature. More... | |
| void | setNeedToBeAborted (const bool theState) |
| Set whether the operation should be aborted. More... | |
| bool | isNeedToBeAborted () const |
| Returns valid state of the operation. More... | |
| void | openTransactionOnResume () |
| Call this function on launch of a nested operation when transaction has to be reopened on resume of main operation By default transaction is not reopened on resuming. More... | |
| ModuleBase_OperationDescription * | getDescription () const |
| Returns the operation description /returns the instance of the description class. More... | |
| const QStringList & | grantedOperationIds () const |
| Returns list of granted operation indices. More... | |
| void | setGrantedOperationIds (const QStringList &theList) |
| Sets list of operation indices, which can be started without the current operation stop. More... | |
| virtual bool | isGranted (QString theId) const |
| 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. More... | |
| virtual bool | isModified () const |
| Returns True if data of its feature was modified during operation. More... | |
| QString | id () const |
| Returns operations Id from it's description. More... | |
| ModuleBase_IPropertyPanel * | propertyPanel () const |
| QString | helpFileName () const |
| void | setHelpFileName (QString theName) |
| void | setHideFacesVisible (bool isVisible) |
| bool | isHideFacesVisible () const |
Static Public Member Functions | |
| static QString | EditSuffix () |
| Appends to operation's history id, if it is an "edit" operation (myIsEditing == true) More... | |
Protected Member Functions | |
| virtual void | startOperation () |
| Displays the feature/results if it is hidden. It will be hided in stopOperation. More... | |
| virtual void | stopOperation () |
| Hide feature/results if they were hided on start. More... | |
| virtual void | resumeOperation () |
| Virtual method called after operation resume (see resume() method for more description) More... | |
| virtual FeaturePtr | createFeature (const bool theFlushMessage=true) |
| Creates an operation new feature. More... | |
| void | clearPreselection () |
| Removes the preselection information and clears the map of preselection. More... | |
| virtual void | postponeOperation () |
| Implementation of specific steps on postpone operation. More... | |
| virtual void | abortOperation () |
| Virtual method called when operation aborted (see abort() method for more description) More... | |
| virtual void | commitOperation () |
| Virtual method called when operation committed (see commit() method for more description) More... | |
| virtual void | afterCommitOperation () |
| Virtual method called after operation committed (see commit() method for more description) More... | |
| virtual bool | canBeCommitted () const |
| Verifies whether this operator can be committed. More... | |
Protected Attributes | |
| FeaturePtr | myFeature |
| The operation feature to be handled. More... | |
| std::set< ObjectPtr > | myVisualizedObjects |
| a list of hidden objects, which are displayed by operation start and should be hidden by operation stop More... | |
| bool | myIsEditing |
| Editing feature flag. More... | |
| bool | myNeedToBeAborted |
| State used only if the operation should not be committed. More... | |
| QList< std::shared_ptr< ModuleBase_ViewerPrs > > | myPreSelection |
| List of pre-selected object. More... | |
| CompositeFeaturePtr | myParentFeature |
| If the operation works with feature which is sub-feature of another one then this variable has to be initialised by parent feature before operation feature creating. More... | |
| FeaturePtr | myPreviousCurrentFeature |
| Last current feature before editing operation. More... | |
| bool | myRestartTransactionOnResume |
Base class for all operations.
Base class for all operations. If you perform an action it is reasonable to create operation intended for this. This is a base class for all operations which provides mechanism for correct starting operations, starting operations above already started ones, committing operations and so on. To create own operation it is reasonable to inherit it from this class and redefines virtual methods to provide own behavior Main virtual methods are
| ModuleBase_OperationFeature::ModuleBase_OperationFeature | ( | const QString & | theId = "", |
| QObject * | theParent = 0 |
||
| ) |
Constructor.
| theId | the operation identifier |
| theParent | the QObject parent |
|
virtual |
Destructor.
|
inlinestatic |
Appends to operation's history id, if it is an "edit" operation (myIsEditing == true)
|
inline |
Returns True id the current operation is launched in editing mode.
| void ModuleBase_OperationFeature::setEditOperation | ( | const bool & | isEditState | ) |
Change the operation mode from create to edit.
The transaction and the operation name in the model history of transaction are the same. It updates the edit state in the widgets of property panel
| isEditState | boolean state whether the operation should become editing or creating the new one is started |
| FeaturePtr ModuleBase_OperationFeature::feature | ( | ) | const |
Returns the operation feature.
|
virtual |
Must return True if the operation's feature is valid.
Since IOperation does not have any feature returns false.
Reimplemented from ModuleBase_Operation.
| void ModuleBase_OperationFeature::setFeature | ( | FeaturePtr | theFeature | ) |
Sets the operation feature.
|
virtual |
Returns True if the current operation works with the given object (feature or result)
|
virtual |
Returns true if the object is displayed when the operation was started.
| theObject | a feature or result of the operation feature |
|
virtual |
Initialisation of operation with preliminary selection.
| thePreSelected | a container of selected presentations |
filtering of selection is not necessary
| void ModuleBase_OperationFeature::setPreselection | ( | const QList< std::shared_ptr< ModuleBase_ViewerPrs >> & | theValues | ) |
Fill internal map by preselection.
| theValues | a list of preselection |
|
virtual |
Set property pane to the operation.
| theProp | a property panel instance |
Reimplemented from ModuleBase_Operation.
|
virtual |
Activates widgets by preselection if it is accepted.
| theGreedAttributeId | a greed attribute id if there is in the current feature |
| void ModuleBase_OperationFeature::setParentFeature | ( | CompositeFeaturePtr | theParent | ) |
If the operation works with feature which is sub-feature of another one then this variable has to be initialised by parent feature before operation feature creating.
| CompositeFeaturePtr ModuleBase_OperationFeature::parentFeature | ( | ) | const |
| void ModuleBase_OperationFeature::setPreviousCurrentFeature | ( | const FeaturePtr & | theFeature | ) |
Stores the previous to the operation current feature.
| theFeature | a feature |
| FeaturePtr ModuleBase_OperationFeature::previousCurrentFeature | ( | ) |
Returns the previous to the operation current feature.
|
inline |
Set whether the operation should be aborted.
By default the state is false in operation
| theState | abort state |
|
inline |
Returns valid state of the operation.
|
inline |
Call this function on launch of a nested operation when transaction has to be reopened on resume of main operation By default transaction is not reopened on resuming.
|
virtualslot |
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.
|
slot |
Aborts operation Public slot.
Aborts operation. This slot is not virtual and cannot be redefined. Redefine abortOperation method to change behavior of operation instead
|
slot |
Commits operation Public slot.
Commits operation. This slot is not virtual and cannot be redefined. Redefine commitOperation method to change behavior of operation instead
|
protectedvirtual |
Displays the feature/results if it is hidden. It will be hided in stopOperation.
Reimplemented from ModuleBase_Operation.
|
protectedvirtual |
Hide feature/results if they were hided on start.
Reimplemented from ModuleBase_Operation.
|
protectedvirtual |
Virtual method called after operation resume (see resume() method for more description)
Reimplemented from ModuleBase_Operation.
|
protectedvirtual |
Creates an operation new feature.
| theFlushMessage | the flag whether the create message should be flushed |
|
protected |
Removes the preselection information and clears the map of preselection.
|
inlineinherited |
Returns the operation description /returns the instance of the description class.
|
inherited |
Returns list of granted operation indices.
|
inherited |
Sets list of operation indices, which can be started without the current operation stop.
| theList | an ids |
|
virtualinherited |
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.
|
virtualinherited |
Returns True if data of its feature was modified during operation.
|
inherited |
Returns operations Id from it's description.
|
inlineinherited |
|
signalinherited |
The operation is started.
|
signalinherited |
The operation is started.
|
signalinherited |
The operation is aborted.
|
signalinherited |
The operation is aborted.
|
signalinherited |
The operation is committed.
|
signalinherited |
The operation is committed.
|
signalinherited |
The operation is aborted or committed.
|
signalinherited |
The operation is resumed.
|
signalinherited |
The operation is postponed.
|
virtualslotinherited |
Deactivates current operation which can be resumed later.
|
virtualslotinherited |
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.
|
slotinherited |
Changes the modified flag of the operation.
|
slotinherited |
Changes the modified flag of the operation if the current state of the widget is modified.
| thePreviousState | the previous value state of the widget |
|
inlineprotectedvirtualinherited |
Implementation of specific steps on postpone operation.
|
inlineprotectedvirtualinherited |
Virtual method called when operation aborted (see abort() method for more description)
|
inlineprotectedvirtualinherited |
Virtual method called when operation committed (see commit() method for more description)
|
inlineprotectedvirtualinherited |
Virtual method called after operation committed (see commit() method for more description)
|
protectedvirtualinherited |
Verifies whether this operator can be committed.
|
protected |
The operation feature to be handled.
|
protected |
a list of hidden objects, which are displayed by operation start and should be hidden by operation stop
|
protected |
Editing feature flag.
|
protected |
State used only if the operation should not be committed.
|
protected |
List of pre-selected object.
|
protected |
If the operation works with feature which is sub-feature of another one then this variable has to be initialised by parent feature before operation feature creating.
|
protected |
Last current feature before editing operation.
It is cashed when Edit operation is started in order to restore the document current feature on commit/abort this operation.