Salome HOME
Providing Action class to have a common approach to start/finish/abort model transact...
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationAction.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 /*
4  * ModuleBase_OperationAction.h
5  *
6  *  Created on: Apr 2, 2014
7  *      Author: sbh
8  */
9
10 #ifndef ModuleBase_OperationAction_H
11 #define ModuleBase_OperationAction_H
12
13 #include <ModuleBase.h>
14
15 #include <ModuleBase_Operation.h>
16
17 /*!
18  * \class ModuleBase_OperationAction
19  * \ingroup GUI
20  * \brief Base class for action operations
21  *
22  *  This is an action-like operation, which modifies the structure of data through
23  *  starting/comitting transactions in the document. This operations are single stepped,
24  *  and have no filled property panel, like Delete/Detach.
25  */
26
27 class MODULEBASE_EXPORT ModuleBase_OperationAction : public ModuleBase_Operation
28 {
29 Q_OBJECT
30
31  public:
32   /// Constructor
33   /// \param theId the operation identifier
34   /// \param theParent the QObject parent
35   ModuleBase_OperationAction(const QString& theId = "", QObject* theParent = 0);
36   /// Destructor
37   virtual ~ModuleBase_OperationAction();
38
39  public slots:
40   /// Commits the operation. Change is modified state to true value.
41   /// \return the result of commit
42   virtual bool commit();
43 };
44
45 #endif