Salome HOME
Initial version
[modules/gui.git] / src / CAF / CAF_Operation.h
1 // CAF_Operation.h: interface for the CAF_Operation class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #if !defined(AFX_CAF_OPERATION_H__87D24897_EA69_4A5A_B81F_39E25ABC254B__INCLUDED_)
6 #define AFX_CAF_OPERATION_H__87D24897_EA69_4A5A_B81F_39E25ABC254B__INCLUDED_
7
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
11
12 #include <qobject.h>
13 #include <qstring.h>
14 #include <qiconset.h>
15 #include <qkeysequence.h>
16
17 #include "CAF.h"
18
19 #include "SUIT_Operation.h"
20
21 class CAF_Study;
22
23 class CAF_EXPORT CAF_Operation : public SUIT_Operation
24 {
25         Q_OBJECT
26 public:
27         CAF_Operation(SUIT_Application* theApp);
28         virtual ~CAF_Operation();
29
30         void             setName( const QString& name );
31     const QString&   getName() const;
32
33 protected: 
34     bool myIsDataChanged;
35     // All operations-successors must set this field to true in order
36     // to indicates that data are changed or false if aren't changed.
37     // By default, in startOperation method this field is set to true.
38
39 protected:
40         virtual void startOperation();
41         virtual void abortOperation();
42         virtual void commitOperation();
43
44 private:
45         QString  myName;
46
47         friend class SUIT_Study;
48 };
49
50 #endif // !defined(AFX_SUIT_OPERATION_H__87D24897_EA69_4A5A_B81F_39E25ABC254B__INCLUDED_)