20 #ifndef XGUI_OperationMgr_H
21 #define XGUI_OperationMgr_H
25 #include <ModuleBase_Operation.h>
26 #include "ModelAPI_Feature.h"
30 #include <QStringList>
56 XGUI_InformationMessage
76 { myWorkshop = theWorkshop; };
93 bool hasOperation()
const;
96 bool hasOperation(
const QString& theId)
const;
103 const XGUI_MessageKind& theMessageKind = XGUI_AbortOperationMessage);
109 int operationsCount()
const;
112 QStringList operationList()
const;
131 bool canStartOperation(
const QString& theId,
bool& isCommitted);
146 bool abortAllOperations(
const XGUI_MessageKind& theMessageKind = XGUI_AbortOperationMessage);
149 bool commitOperation();
161 void onAbortOperation();
163 void onAbortAllOperation();
165 void onValidateOperation();
167 bool commitAllOperations();
201 bool isGrantedOperation(
const QString& theId);
205 void setCurrentFeature(
const FeaturePtr& theFeature);
211 bool onKeyReleased(
QObject *theObject, QKeyEvent* theEvent);
216 bool onKeyPressed(
QObject *theObject, QKeyEvent* theEvent);
222 bool onProcessDelete(
QObject* theObject);
229 bool onProcessEnter(
QObject *theObject);
233 void onOperationStopped();
238 void onBeforeOperationStarted();
241 void onOperationStarted();
244 void onBeforeOperationAborted();
247 void onOperationAborted();
250 void onBeforeOperationCommitted();
253 void onOperationCommitted();
256 void onOperationResumed();
262 static bool isChildObject(
const QObject* theObject,
const QObject* theParent);
268 static QMessageBox* createMessageBox(
const QString& theMessage);
274 static QMessageBox* createInformationBox(
const QString& theMessage);
277 typedef QList<ModuleBase_Operation*> Operations;
278 Operations myOperations;
283 QMessageBox* myActiveMessageBox;
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
Base class for all operations.
Definition: ModuleBase_Operation.h:53
Operation manager.
Definition: XGUI_OperationMgr.h:49
void setSHIFTPressed(const bool thePressed)
Returns true if SHIFT is pressed.
Definition: XGUI_OperationMgr.h:153
void operationCommitted(ModuleBase_Operation *theOperation)
Emitted when current operation is Committed.
bool hasSHIFTPressed() const
Returns true if SHIFT is pressed.
Definition: XGUI_OperationMgr.h:157
void keyEnterReleased()
Signal is emitted after the key released click.
XGUI_MessageKind
Enumeration of kind of message that is used when trying to stop the active operation.
Definition: XGUI_OperationMgr.h:54
@ XGUI_AbortOperationMessage
warns and give possibility to abort current operation
Definition: XGUI_OperationMgr.h:55
void setWorkshop(ModuleBase_IWorkshop *theWorkshop)
Set reference to workshop.
Definition: XGUI_OperationMgr.h:75
ModuleBase_IWorkshop * workshop() const
Current workshop.
Definition: XGUI_OperationMgr.h:79
void operationResumed(ModuleBase_Operation *theOperation)
Signal about an operation is resumed. It is emitted after the resume() of operation is done.
void operationStopped(ModuleBase_Operation *theOperation)
Signal about an operation is stopped.
void operationAborted(ModuleBase_Operation *theOperation)
Emitted when current operation is aborted.
Processes "Delete" key event of application.
Definition: XGUI_OperationMgr.cpp:65
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:82