1 // CAF_Operation.cxx: implementation of the CAF_Operation class.
3 //////////////////////////////////////////////////////////////////////
5 #include "CAF_Operation.h"
6 #include "CAF_Application.h"
10 //////////////////////////////////////////////////////////////////////
11 // Construction/Destruction
12 //////////////////////////////////////////////////////////////////////
14 CAF_Operation::CAF_Operation(SUIT_Application* theApp)
15 :SUIT_Operation(theApp)
19 CAF_Operation::~CAF_Operation()
24 Sets the name of this operation.
25 This name is displayed in 'Undo'/'Redo' list. [ public ]
27 void CAF_Operation::setName( const QString& name )
33 Returns the name of this operation.
34 This name is displayed in 'Undo'/'Redo' list. [ public ]
36 const QString& CAF_Operation::getName() const
41 void CAF_Operation::startOperation()
43 myIsDataChanged = true;
44 CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( study() );
46 cafStudy->startOperation();
49 void CAF_Operation::abortOperation()
51 CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( study() );
53 cafStudy->abortOperation();
56 void CAF_Operation::commitOperation()
58 CAF_Study* cafStudy = dynamic_cast<CAF_Study*>( study() );
61 cafStudy->commitOperation();
62 if ( myIsDataChanged )
63 cafStudy->doModified();