#include <SUIT_Study.h>

Signals | |
| void | studyModified (SUIT_Study *) |
Public Member Functions | |
| SUIT_Study (SUIT_Application *) | |
| virtual | ~SUIT_Study () |
| virtual int | id () const |
| SUIT_DataObject * | root () const |
| virtual QString | studyName () const |
| SUIT_Application * | application () const |
| virtual bool | isSaved () const |
| virtual bool | isModified () const |
| virtual void | Modified () |
| virtual void | closeDocument (bool=true) |
| virtual bool | openDocument (const QString &) |
| virtual bool | createDocument (const QString &) |
| bool | saveDocument () |
| virtual bool | saveDocumentAs (const QString &) |
| virtual void | update () |
| virtual void | sendChangesNotification () |
| SUIT_Operation * | activeOperation () const |
| virtual void | abortAllOperations () |
| const QList< SUIT_Operation * > & | operations () const |
| Get all started operations. | |
| virtual SUIT_Operation * | blockingOperation (SUIT_Operation *) const |
| Verifies whether operation can be activated above already started ones. | |
| bool | start (SUIT_Operation *, const bool check=true) |
| Starts operation. | |
| bool | abort (SUIT_Operation *) |
| Aborts operation. | |
| bool | commit (SUIT_Operation *) |
| Commits operation. | |
| bool | suspend (SUIT_Operation *) |
| Commits operation. | |
| bool | resume (SUIT_Operation *) |
| Resumes operation. | |
| virtual void | restoreState (int savePoint) |
| Restores the study state. | |
Protected Member Functions | |
| virtual void | setIsSaved (const bool) |
| virtual void | setIsModified (const bool) |
| virtual void | setRoot (SUIT_DataObject *) |
| virtual void | setStudyName (const QString &) |
| virtual void | operationStarted (SUIT_Operation *) |
| Perform some actions when operation starting. | |
| virtual void | operationAborted (SUIT_Operation *) |
| Perform some actions when operation aborted. | |
| virtual void | operationStopped (SUIT_Operation *) |
| Perform some actions when operation stopped. | |
| virtual void | operationCommited (SUIT_Operation *) |
| Perform some actions when operation commited. | |
| virtual bool | openTransaction () |
| Opens transaction for data modifications. | |
| virtual bool | abortTransaction () |
| Aborts transaction and all performed data modifications. | |
| virtual bool | hasTransaction () const |
| Returns TRUE if transaction is opened. | |
| virtual bool | commitTransaction (const QString &=QString()) |
| Commits transaction and all performed data modifications. | |
Private Types | |
| typedef QList< SUIT_Operation * > | Operations |
Private Member Functions | |
| void | stop (SUIT_Operation *) |
| Stops operation. | |
Private Attributes | |
| int | myId |
| SUIT_Application * | myApp |
| SUIT_DataObject * | myRoot |
| QString | myName |
| bool | myIsSaved |
| bool | myIsModified |
| Operations | myOperations |
| bool | myBlockChangeState |
Friends | |
| class | SUIT_Operation |
Support study management. Object management. Operation management.
typedef QList<SUIT_Operation*> SUIT_Study.Operations [private] |
| SUIT_Study::SUIT_Study | ( | SUIT_Application * | app | ) |
| SUIT_Study::~SUIT_Study | ( | ) | [virtual] |
Destructor.
References myRoot.
| int SUIT_Study::id | ( | ) | const [virtual] |
| SUIT_DataObject * SUIT_Study::root | ( | ) | const |
| root | data object. |
References myRoot.
| QString SUIT_Study::studyName | ( | ) | const [virtual] |
| SUIT_Application * SUIT_Study::application | ( | ) | const |
| Application. |
References myApp.
| bool SUIT_Study::isSaved | ( | ) | const [virtual] |
| TRUE | - if study saved, else FALSE. |
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References myIsSaved.
| bool SUIT_Study::isModified | ( | ) | const [virtual] |
| TRUE | - if study modified, else FALSE. |
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References myIsModified.
| void SUIT_Study::Modified | ( | ) | [virtual] |
Set study modified to on.
Reimplemented in SalomeApp_Study.
References sendChangesNotification(), and setIsModified().
| void SUIT_Study::closeDocument | ( | bool | = true | ) | [virtual] |
Close document. NOT IMPLEMENTED.
Reimplemented in CAF_Study, CAM_Study, LightApp_Study, and SalomeApp_Study.
| bool SUIT_Study::openDocument | ( | const QString & | fileName | ) | [virtual] |
Open document. Sets file name. return true.
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References myIsModified, myIsSaved, and myName.
| bool SUIT_Study::createDocument | ( | const QString & | ) | [virtual] |
Custom document initialization to be performed
within onNewDoc() handler can be put here
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
| bool SUIT_Study::saveDocument | ( | ) |
| TRUE | - if document saved successful, else FALSE. |
Reimplemented in LightApp_Study, and SalomeApp_Study.
References myName, and saveDocumentAs().
| bool SUIT_Study::saveDocumentAs | ( | const QString & | fileName | ) | [virtual] |
Save document as fileName. Set file name.
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References myIsModified, myIsSaved, and myName.
| void SUIT_Study::update | ( | ) | [virtual] |
Update study. NOT IMPLEMENTED HERE.
| void SUIT_Study::sendChangesNotification | ( | ) | [virtual] |
Emit study modified.
References studyModified().
| SUIT_Operation * SUIT_Study::activeOperation | ( | ) | const |
| active | operation. |
References myOperations.
| void SUIT_Study::abortAllOperations | ( | ) | [virtual] |
Abort all operations.
References myBlockChangeState, and myOperations.
| const QList< SUIT_Operation * > & SUIT_Study::operations | ( | ) | const |
References myOperations.
| SUIT_Operation * SUIT_Study::blockingOperation | ( | SUIT_Operation * | theOp | ) | const [virtual] |
| theOp | - operation to be checked |
Verifies whether operation can be activated above already started ones. This method is called from SUIT_Study.start() and SUIT_Study.resume() methods.
References SUIT_Operation.isGranted(), SUIT_Operation.isValid(), and myOperations.
| bool SUIT_Study::start | ( | SUIT_Operation * | theOp, |
| const bool | toCheck = true |
||
| ) |
| theOp | - operation to be started |
| toCheck | - if parameters is equal TRUE then checking performed whether all already started operations allow to start this operation above them (default value is TRUE |
Verifies whether theOp operation can be started above already started ones (if toCheck parameter is equal TRUE) and starts it
References activeOperation(), application(), blockingOperation(), SUIT_Operation.isReadyToStart(), myOperations, operationStarted(), SUIT_MessageBox.question(), SUIT_Operation.Rejected, SUIT_Operation.Running, SUIT_Operation.setExecStatus(), SUIT_Operation.setState(), SUIT_Operation.setStudy(), SUIT_Operation.started(), SUIT_Operation.startOperation(), SUIT_Operation.Suspended, and SUIT_Operation.suspendOperation().
| bool SUIT_Study::abort | ( | SUIT_Operation * | theOp | ) |
| theOp | - operation to be aborted |
Verifies whether operation already started and aborts it in this case (sets execution status to Rejected and stops operation)
References SUIT_Operation.aborted(), SUIT_Operation.abortOperation(), myOperations, operationAborted(), SUIT_Operation.Rejected, SUIT_Operation.setExecStatus(), and stop().
| bool SUIT_Study::commit | ( | SUIT_Operation * | theOp | ) |
| theOp | - operation to be committed |
Verifies whether operation already started and commits it in this case (sets execution status to Accepted and stops operation)
References SUIT_Operation.Accepted, SUIT_Operation.commitOperation(), SUIT_Operation.committed(), myOperations, operationCommited(), SUIT_Operation.setExecStatus(), stop(), and studyModified().
| bool SUIT_Study::suspend | ( | SUIT_Operation * | theOp | ) |
| theOp | - operation to be committed |
Verifies whether operation already started and suspends it in this case. Operations ususlly are suspended to start other one above them.
References myOperations, SUIT_Operation.setState(), SUIT_Operation.state(), SUIT_Operation.suspended(), SUIT_Operation.Suspended, and SUIT_Operation.suspendOperation().
| bool SUIT_Study::resume | ( | SUIT_Operation * | theOp | ) |
| theOp | - operation to be resumed |
Verifies whether operation already started but suspended and resumesit in this case.
References blockingOperation(), myOperations, SUIT_Operation.resumed(), SUIT_Operation.resumeOperation(), SUIT_Operation.Running, SUIT_Operation.setState(), SUIT_Operation.state(), and suspend().
| void SUIT_Study::restoreState | ( | int | savePoint | ) | [virtual] |
Reimplemented in SalomeApp_Study.
| void SUIT_Study.studyModified | ( | SUIT_Study * | ) | [signal] |
| void SUIT_Study::setIsSaved | ( | const bool | on | ) | [protected, virtual] |
Set study saved to on.
References myIsSaved.
| void SUIT_Study::setIsModified | ( | const bool | on | ) | [protected, virtual] |
Set study modified to on.
References myIsModified.
| void SUIT_Study::setRoot | ( | SUIT_DataObject * | obj | ) | [protected, virtual] |
Set root object.
References myRoot, PyInterp.obj, and SUIT_DataObject.reparentChildren().
| void SUIT_Study::setStudyName | ( | const QString & | name | ) | [protected, virtual] |
Set study name.
References myName.
| void SUIT_Study::operationStarted | ( | SUIT_Operation * | op | ) | [protected, virtual] |
| void SUIT_Study::operationAborted | ( | SUIT_Operation * | op | ) | [protected, virtual] |
| void SUIT_Study::operationStopped | ( | SUIT_Operation * | ) | [protected, virtual] |
| void SUIT_Study::operationCommited | ( | SUIT_Operation * | op | ) | [protected, virtual] |
| bool SUIT_Study::openTransaction | ( | ) | [protected, virtual] |
Reimplemented in CAF_Study.
| bool SUIT_Study::abortTransaction | ( | ) | [protected, virtual] |
Reimplemented in CAF_Study.
| bool SUIT_Study::hasTransaction | ( | ) | const [protected, virtual] |
Reimplemented in CAF_Study.
| bool SUIT_Study::commitTransaction | ( | const QString & | = QString() | ) | [protected, virtual] |
Reimplemented in CAF_Study.
| void SUIT_Study::stop | ( | SUIT_Operation * | theOp | ) | [private] |
| theOp | - operation to be stopped |
Stops operation. This private method is called from abort() and commit() ones to perform common actions when operation is stopped
References blockingOperation(), myOperations, operationStopped(), resume(), SUIT_Operation.setState(), SUIT_Operation.stopOperation(), SUIT_Operation.stopped(), and SUIT_Operation.Waiting.
friend class SUIT_Operation [friend] |
int SUIT_Study.myId [private] |
SUIT_Application* SUIT_Study.myApp [private] |
SUIT_DataObject* SUIT_Study.myRoot [private] |
QString SUIT_Study.myName [private] |
bool SUIT_Study.myIsSaved [private] |
bool SUIT_Study.myIsModified [private] |
Operations SUIT_Study.myOperations [private] |
bool SUIT_Study.myBlockChangeState [private] |