1 #include "SUIT_Operation.h"
3 #include "SUIT_Study.h"
4 #include "SUIT_Application.h"
6 SUIT_Operation::SUIT_Operation( SUIT_Application* app )
14 SUIT_Operation::~SUIT_Operation()
18 SUIT_Study* SUIT_Operation::study() const
23 SUIT_Application* SUIT_Operation::application() const
28 SUIT_Operation::OperationState SUIT_Operation::state() const
33 void SUIT_Operation::start()
35 myStudy = myApp->activeStudy();
38 if ( myStudy->canStartOperation( this ) )
40 if ( !isReadyToStart() )
42 myStudy->stopOperation();
53 void SUIT_Operation::abort()
56 myStudy->stopOperation();
62 void SUIT_Operation::commit()
65 myStudy->stopOperation();
68 emit commited( this );
70 myStudy->sendChangesNotification();
73 void SUIT_Operation::resume()
81 void SUIT_Operation::suspend()
86 emit suspended( this );
89 bool SUIT_Operation::isReadyToStart()
94 void SUIT_Operation::startOperation()
101 void SUIT_Operation::abortOperation()
105 void SUIT_Operation::resumeOperation()
109 void SUIT_Operation::suspendOperation()
113 void SUIT_Operation::commitOperation()
117 bool SUIT_Operation::setSlot( const QObject* theReceiver, const char* theSlot )
119 return connect( this, SIGNAL( callSlot() ), theReceiver, theSlot );
122 bool SUIT_Operation::isValid( SUIT_Operation* ) const
127 bool SUIT_Operation::isGranted() const
132 void SUIT_Operation::setStudy( SUIT_Study* s )
137 void SUIT_Operation::setApplication( SUIT_Application* app )