Represents document object in the CAM application architecture. More...
#include <CAM_Study.h>

Public Types | |
| typedef QList< CAM_DataModel * > | ModelList |
Signals | |
| void | studyModified (SUIT_Study *) |
Public Member Functions | |
| CAM_Study (SUIT_Application *) | |
| Constructor. | |
| virtual | ~CAM_Study () |
| Destructor. | |
| virtual void | closeDocument (bool permanently=true) |
| Called when study is closed. | |
| bool | appendDataModel (const CAM_DataModel *) |
| Append data model to the study. | |
| virtual bool | insertDataModel (const CAM_DataModel *, const int=-1) |
| Insert data model dm with index idx. | |
| bool | insertDataModel (const CAM_DataModel *, const CAM_DataModel *) |
| Insert data model dm after data model other. | |
| virtual bool | removeDataModel (const CAM_DataModel *) |
| Remove data model from the study. | |
| bool | containsDataModel (const CAM_DataModel *) const |
| Check if data model is contained in the list. | |
| void | dataModels (ModelList &) const |
| Get all data models. | |
| 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 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 Slots | |
| virtual void | updateModelRoot (const CAM_DataModel *) |
| Update data model root object. | |
Protected Member Functions | |
| virtual void | dataModelInserted (const CAM_DataModel *) |
| Called when data model is inserted in the study. | |
| virtual bool | openDataModel (const QString &, CAM_DataModel *) |
| Called when data model is opened. | |
| virtual bool | saveDataModel (const QString &, CAM_DataModel *) |
| Called when data model is saved. | |
| 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 Attributes | |
| ModelList | myDataModels |
| data models list | |
For each loaded module study contains the data model instance reference. Provides all necessary functionality for data models management.
| typedef QList<CAM_DataModel*> CAM_Study.ModelList |
| CAM_Study::CAM_Study | ( | SUIT_Application * | app | ) |
| app | parent application |
| CAM_Study::~CAM_Study | ( | ) | [virtual] |
| void CAM_Study::closeDocument | ( | bool | permanently = true | ) | [virtual] |
Closes all data models.
| permanently | if true close study permanently (not used in the base implemetation) |
Reimplemented from SUIT_Study.
Reimplemented in LightApp_Study, and SalomeApp_Study.
References myDataModels.
| bool CAM_Study::appendDataModel | ( | const CAM_DataModel * | dm | ) |
| dm | data model being added |
true on success and false on error References insertDataModel(), and myDataModels.
| bool CAM_Study::insertDataModel | ( | const CAM_DataModel * | dm, |
| const int | idx = -1 |
||
| ) | [virtual] |
| dm | data model being added |
| idx | data model required index |
true on success and false on error References dataModelInserted(), myDataModels, and updateModelRoot().
| bool CAM_Study::insertDataModel | ( | const CAM_DataModel * | dm, |
| const CAM_DataModel * | other | ||
| ) |
If other is 0, the data model is added to the end of list.
| dm | data model being added |
| other | data model to be previous in the list |
true on success and false on error References insertDataModel(), and myDataModels.
| bool CAM_Study::removeDataModel | ( | const CAM_DataModel * | dm | ) | [virtual] |
| dm | data model being removed |
true on success and false on error References myDataModels, CAM_DataModel.root(), and CAM_ModuleObject.setDataModel().
| bool CAM_Study::containsDataModel | ( | const CAM_DataModel * | dm | ) | const |
| dm | data model |
true if data model is in the list and false otherwise. References myDataModels.
| void CAM_Study::dataModels | ( | ModelList & | lst | ) | const |
| lst | returning list of data model. |
References myDataModels.
| void CAM_Study::dataModelInserted | ( | const CAM_DataModel * | dModel | ) | [protected, virtual] |
Open data model dModel, if it is saved and update data tree.
| dModel | data model |
Reimplemented in SalomeApp_Study.
References CAM_DataModel.create(), SUIT_Study.isSaved(), openDataModel(), SUIT_Study.studyName(), and updateModelRoot().
| bool CAM_Study::openDataModel | ( | const QString & | , |
| CAM_DataModel * | |||
| ) | [protected, virtual] |
Base implementation does nothing and returns false.
true on success and false on error Reimplemented in LightApp_Study, and SalomeApp_Study.
| bool CAM_Study::saveDataModel | ( | const QString & | , |
| CAM_DataModel * | |||
| ) | [protected, virtual] |
Base implementation does nothing and returns false.
true on success and false on error | void CAM_Study::updateModelRoot | ( | const CAM_DataModel * | dm | ) | [protected, virtual, slot] |
| dm | data model being updated. |
Reimplemented in SalomeApp_Study.
References test_big_table.aName, SUIT_DataObject.children(), SUIT_DataObject.insertChild(), CAM_DataModel.module(), CAM_Module.moduleName(), myDataModels, SUIT_DataObject.name(), SUIT_DataObject.replaceChild(), CAM_DataModel.root(), and SUIT_Study.root().
| int SUIT_Study::id | ( | ) | const [virtual, inherited] |
| SUIT_DataObject * SUIT_Study::root | ( | ) | const [inherited] |
| root | data object. |
References SUIT_Study.myRoot.
| QString SUIT_Study::studyName | ( | ) | const [virtual, inherited] |
| SUIT_Application * SUIT_Study::application | ( | ) | const [inherited] |
| Application. |
References SUIT_Study.myApp.
| bool SUIT_Study::isSaved | ( | ) | const [virtual, inherited] |
| TRUE | - if study saved, else FALSE. |
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References SUIT_Study.myIsSaved.
| bool SUIT_Study::isModified | ( | ) | const [virtual, inherited] |
| TRUE | - if study modified, else FALSE. |
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References SUIT_Study.myIsModified.
| void SUIT_Study::Modified | ( | ) | [virtual, inherited] |
Set study modified to on.
Reimplemented in SalomeApp_Study.
References SUIT_Study.sendChangesNotification(), and SUIT_Study.setIsModified().
| bool SUIT_Study::openDocument | ( | const QString & | fileName | ) | [virtual, inherited] |
Open document. Sets file name. return true.
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References SUIT_Study.myIsModified, SUIT_Study.myIsSaved, and SUIT_Study.myName.
| bool SUIT_Study::createDocument | ( | const QString & | ) | [virtual, inherited] |
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 | ( | ) | [inherited] |
| TRUE | - if document saved successful, else FALSE. |
Reimplemented in LightApp_Study, and SalomeApp_Study.
References SUIT_Study.myName, and SUIT_Study.saveDocumentAs().
| bool SUIT_Study::saveDocumentAs | ( | const QString & | fileName | ) | [virtual, inherited] |
Save document as fileName. Set file name.
Reimplemented in CAF_Study, LightApp_Study, and SalomeApp_Study.
References SUIT_Study.myIsModified, SUIT_Study.myIsSaved, and SUIT_Study.myName.
| void SUIT_Study::update | ( | ) | [virtual, inherited] |
Update study. NOT IMPLEMENTED HERE.
| void SUIT_Study::sendChangesNotification | ( | ) | [virtual, inherited] |
Emit study modified.
References SUIT_Study.studyModified().
| SUIT_Operation * SUIT_Study::activeOperation | ( | ) | const [inherited] |
| active | operation. |
References SUIT_Study.myOperations.
| void SUIT_Study::abortAllOperations | ( | ) | [virtual, inherited] |
Abort all operations.
References SUIT_Study.myBlockChangeState, and SUIT_Study.myOperations.
| const QList< SUIT_Operation * > & SUIT_Study::operations | ( | ) | const [inherited] |
References SUIT_Study.myOperations.
| SUIT_Operation * SUIT_Study::blockingOperation | ( | SUIT_Operation * | theOp | ) | const [virtual, inherited] |
| 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 SUIT_Study.myOperations.
| bool SUIT_Study::start | ( | SUIT_Operation * | theOp, |
| const bool | toCheck = true |
||
| ) | [inherited] |
| 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 SUIT_Study.activeOperation(), SUIT_Study.application(), SUIT_Study.blockingOperation(), SUIT_Operation.isReadyToStart(), SUIT_Study.myOperations, SUIT_Study.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 | ) | [inherited] |
| 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(), SUIT_Study.myOperations, SUIT_Study.operationAborted(), SUIT_Operation.Rejected, SUIT_Operation.setExecStatus(), and SUIT_Study.stop().
| bool SUIT_Study::commit | ( | SUIT_Operation * | theOp | ) | [inherited] |
| 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(), SUIT_Study.myOperations, SUIT_Study.operationCommited(), SUIT_Operation.setExecStatus(), SUIT_Study.stop(), and SUIT_Study.studyModified().
| bool SUIT_Study::suspend | ( | SUIT_Operation * | theOp | ) | [inherited] |
| 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 SUIT_Study.myOperations, SUIT_Operation.setState(), SUIT_Operation.state(), SUIT_Operation.suspended(), SUIT_Operation.Suspended, and SUIT_Operation.suspendOperation().
| bool SUIT_Study::resume | ( | SUIT_Operation * | theOp | ) | [inherited] |
| theOp | - operation to be resumed |
Verifies whether operation already started but suspended and resumesit in this case.
References SUIT_Study.blockingOperation(), SUIT_Study.myOperations, SUIT_Operation.resumed(), SUIT_Operation.resumeOperation(), SUIT_Operation.Running, SUIT_Operation.setState(), SUIT_Operation.state(), and SUIT_Study.suspend().
| void SUIT_Study::restoreState | ( | int | savePoint | ) | [virtual, inherited] |
Reimplemented in SalomeApp_Study.
| void SUIT_Study.studyModified | ( | SUIT_Study * | ) | [signal, inherited] |
| void SUIT_Study::setIsSaved | ( | const bool | on | ) | [protected, virtual, inherited] |
Set study saved to on.
References SUIT_Study.myIsSaved.
| void SUIT_Study::setIsModified | ( | const bool | on | ) | [protected, virtual, inherited] |
Set study modified to on.
References SUIT_Study.myIsModified.
| void SUIT_Study::setRoot | ( | SUIT_DataObject * | obj | ) | [protected, virtual, inherited] |
Set root object.
References SUIT_Study.myRoot, PyInterp.obj, and SUIT_DataObject.reparentChildren().
| void SUIT_Study::setStudyName | ( | const QString & | name | ) | [protected, virtual, inherited] |
Set study name.
References SUIT_Study.myName.
| void SUIT_Study::operationStarted | ( | SUIT_Operation * | op | ) | [protected, virtual, inherited] |
| void SUIT_Study::operationAborted | ( | SUIT_Operation * | op | ) | [protected, virtual, inherited] |
| void SUIT_Study::operationStopped | ( | SUIT_Operation * | ) | [protected, virtual, inherited] |
| void SUIT_Study::operationCommited | ( | SUIT_Operation * | op | ) | [protected, virtual, inherited] |
| bool SUIT_Study::openTransaction | ( | ) | [protected, virtual, inherited] |
Reimplemented in CAF_Study.
| bool SUIT_Study::abortTransaction | ( | ) | [protected, virtual, inherited] |
Reimplemented in CAF_Study.
| bool SUIT_Study::hasTransaction | ( | ) | const [protected, virtual, inherited] |
Reimplemented in CAF_Study.
| bool SUIT_Study::commitTransaction | ( | const QString & | = QString() | ) | [protected, virtual, inherited] |
Reimplemented in CAF_Study.
ModelList CAM_Study.myDataModels [private] |