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

Public Types | |
| typedef QList< CAM_DataModel * > | ModelList |
Public Member Functions | |
| CAM_Study (SUIT_Application *) | |
| Constructor. More... | |
| virtual | ~CAM_Study () |
| Destructor. More... | |
| virtual void | closeDocument (bool permanently=true) |
| Called when study is closed. More... | |
| bool | appendDataModel (const CAM_DataModel *) |
| Append data model to the study. More... | |
| virtual bool | insertDataModel (const CAM_DataModel *, const int=-1) |
| Insert data model dm with index idx. More... | |
| bool | insertDataModel (const CAM_DataModel *, const CAM_DataModel *) |
| Insert data model dm after data model other. More... | |
| virtual bool | removeDataModel (const CAM_DataModel *) |
| Remove data model from the study. More... | |
| bool | containsDataModel (const CAM_DataModel *) const |
| Check if data model is contained in the list. More... | |
| void | dataModels (ModelList &) const |
| Get all data models. More... | |
Public Member Functions inherited from SUIT_Study | |
| 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 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. More... | |
| virtual SUIT_Operation * | blockingOperation (SUIT_Operation *) const |
| Verifies whether operation can be activated above already started ones. More... | |
| bool | start (SUIT_Operation *, const bool check=true) |
| Starts operation. More... | |
| bool | abort (SUIT_Operation *) |
| Aborts operation. More... | |
| bool | commit (SUIT_Operation *) |
| Commits operation. More... | |
| bool | suspend (SUIT_Operation *) |
| Commits operation. More... | |
| bool | resume (SUIT_Operation *) |
| Resumes operation. More... | |
| virtual void | restoreState (int savePoint) |
| Restores the study state. More... | |
Protected Slots | |
| virtual void | updateModelRoot (const CAM_DataModel *) |
| Update data model root object. More... | |
Protected Member Functions | |
| virtual void | dataModelInserted (const CAM_DataModel *) |
| Called when data model is inserted in the study. More... | |
| virtual bool | openDataModel (const QString &, CAM_DataModel *) |
| Called when data model is opened. More... | |
| virtual bool | saveDataModel (const QString &, CAM_DataModel *) |
| Called when data model is saved. More... | |
Protected Member Functions inherited from SUIT_Study | |
| 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. More... | |
| virtual void | operationAborted (SUIT_Operation *) |
| Perform some actions when operation aborted. More... | |
| virtual void | operationStopped (SUIT_Operation *) |
| Perform some actions when operation stopped. More... | |
| virtual void | operationCommited (SUIT_Operation *) |
| Perform some actions when operation commited. More... | |
| virtual bool | openTransaction () |
| Opens transaction for data modifications. More... | |
| virtual bool | abortTransaction () |
| Aborts transaction and all performed data modifications. More... | |
| virtual bool | hasTransaction () const |
Returns true if transaction is opened. More... | |
| virtual bool | commitTransaction (const QString &=QString()) |
| Commits transaction and all performed data modifications. More... | |
Private Attributes | |
| ModelList | myDataModels |
| data models list More... | |
Additional Inherited Members | |
Signals inherited from SUIT_Study | |
| void | studyModified (SUIT_Study *) |
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 |
|
virtual |
| bool CAM_Study::appendDataModel | ( | const CAM_DataModel * | dm | ) |
| dm | data model being added |
true on success and false on error References insertDataModel(), and myDataModels.
|
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 SUIT_Study::closeDocument(), and myDataModels.
| 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.
|
protectedvirtual |
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().
| void CAM_Study::dataModels | ( | ModelList & | lst | ) | const |
| lst | returning list of data model. |
References myDataModels.
|
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.
|
protectedvirtual |
Base implementation does nothing and returns false.
true on success and false on error Reimplemented in LightApp_Study, and SalomeApp_Study.
|
virtual |
| dm | data model being removed |
true on success and false on error References myDataModels, CAM_DataModel::root(), and CAM_ModuleObject::setDataModel().
|
protectedvirtual |
Base implementation does nothing and returns false.
true on success and false on error
|
protectedvirtualslot |
| dm | data model being updated. |
References 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().
|
private |