20 #ifndef ModuleBase_OperationFeature_H
21 #define ModuleBase_OperationFeature_H
23 #include <ModuleBase.h>
24 #include <ModuleBase_Operation.h>
26 #include <ModelAPI_Object.h>
27 #include <ModelAPI_CompositeFeature.h>
31 #include <QStringList>
84 void setEditOperation(
const bool& isEditState);
88 FeaturePtr feature()
const;
95 void setFeature(FeaturePtr theFeature);
98 virtual bool hasObject(ObjectPtr theObj)
const;
103 virtual bool isDisplayedOnStart(ObjectPtr theObject);
107 virtual void initSelection(
108 const QList<std::shared_ptr<ModuleBase_ViewerPrs>>& thePreSelected);
112 void setPreselection(
const QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
129 void setParentFeature(CompositeFeaturePtr theParent);
132 CompositeFeaturePtr parentFeature()
const;
136 void setPreviousCurrentFeature(
const FeaturePtr& theFeature);
140 FeaturePtr previousCurrentFeature();
163 virtual bool start();
188 virtual FeaturePtr createFeature(
const bool theFlushMessage =
true);
191 void clearPreselection();
219 bool myRestartTransactionOnResume;
A class for Property panel object definition.
Definition: ModuleBase_IPropertyPanel.h:35
A class which provides access to selection.
Definition: ModuleBase_ISelection.h:44
A Base object for definition of connector object to Salome Viewer.
Definition: ModuleBase_IViewer.h:47
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
Base class for all operations.
Definition: ModuleBase_OperationFeature.h:61
static QString EditSuffix()
Appends to operation's history id, if it is an "edit" operation (myIsEditing == true)
Definition: ModuleBase_OperationFeature.h:67
void openTransactionOnResume()
Call this function on launch of a nested operation when transaction has to be reopened on resume of m...
Definition: ModuleBase_OperationFeature.h:153
QList< std::shared_ptr< ModuleBase_ViewerPrs > > myPreSelection
List of pre-selected object.
Definition: ModuleBase_OperationFeature.h:208
void setNeedToBeAborted(const bool theState)
Set whether the operation should be aborted.
Definition: ModuleBase_OperationFeature.h:144
FeaturePtr myFeature
The operation feature to be handled.
Definition: ModuleBase_OperationFeature.h:195
CompositeFeaturePtr myParentFeature
If the operation works with feature which is sub-feature of another one then this variable has to be ...
Definition: ModuleBase_OperationFeature.h:213
bool myNeedToBeAborted
State used only if the operation should not be commited.
Definition: ModuleBase_OperationFeature.h:205
bool isNeedToBeAborted() const
Returns valid state of the operation.
Definition: ModuleBase_OperationFeature.h:148
FeaturePtr myPreviousCurrentFeature
Last current feature before editing operation.
Definition: ModuleBase_OperationFeature.h:217
std::set< ObjectPtr > myVisualizedObjects
a list of hidden objects, whic are diplayed by operation start and should be hidden by operation stop
Definition: ModuleBase_OperationFeature.h:199
bool isEditOperation() const
Returns True id the current operation is launched in editing mode.
Definition: ModuleBase_OperationFeature.h:76
bool myIsEditing
Editing feature flag.
Definition: ModuleBase_OperationFeature.h:202
Base class for all operations.
Definition: ModuleBase_Operation.h:53
virtual void abort()
Aborts operation Public slot.
Definition: ModuleBase_Operation.cpp:115
virtual void setPropertyPanel(ModuleBase_IPropertyPanel *theProp)
Set property pane to the operation.
Definition: ModuleBase_Operation.cpp:173
virtual bool start()
Starts operation Public slot.
Definition: ModuleBase_Operation.cpp:91
virtual bool isValid() const
Must return True if the operation's feature is valid.
Definition: ModuleBase_Operation.cpp:81
virtual bool commit()
Commits operation Public slot.
Definition: ModuleBase_Operation.cpp:135
virtual void resumeOperation()
Virtual method called after operation resume (see resume() method for more description)
Definition: ModuleBase_Operation.h:193
virtual void stopOperation()
Virtual method called when operation stopped - committed or aborted.
Definition: ModuleBase_Operation.h:181
virtual void startOperation()
Virtual method called when operation started (see start() method for more description) Default impl c...
Definition: ModuleBase_Operation.h:175
Presentation.
Definition: ModuleBase_ViewerPrs.h:37