#include <LightApp_Study.h>
Signals | |
void | saved (SUIT_Study *) |
void | opened (SUIT_Study *) |
void | closed (SUIT_Study *) |
void | created (SUIT_Study *) |
void | objVisibilityChanged (QString, Qtx::VisibilityState) |
Public Member Functions | |
LightApp_Study (SUIT_Application *) | |
virtual | ~LightApp_Study () |
virtual bool | createDocument (const QString &) |
virtual bool | openDocument (const QString &) |
virtual bool | loadDocument (const QString &) |
virtual bool | saveDocument () |
virtual bool | saveDocumentAs (const QString &) |
virtual void | closeDocument (bool permanently=true) |
virtual bool | isSaved () const |
virtual bool | isModified () const |
virtual void | addComponent (const CAM_DataModel *dm) |
virtual std::string | GetTmpDir (const char *theURL, const bool isMultiFile) |
virtual QString | componentDataType (const QString &) const |
virtual QString | referencedToEntry (const QString &) const |
virtual bool | isComponent (const QString &) const |
virtual void | children (const QString &, QStringList &) const |
virtual void | components (QStringList &) const |
virtual QString | centry (const QString &) const |
virtual QString | getVisualComponentName () const |
virtual void | setObjectProperty (int, const QString &, const QString &, const QVariant &) |
virtual void | setObjectProperty (const QString &, const QString &, const QVariant &) |
virtual void | setObjectProperty (int, const QString &, const QVariant &) |
virtual void | setObjectProperties (int, const QString &, const PropMap &) |
virtual QVariant | getObjectProperty (int, const QString &, const QString &, const QVariant &) const |
virtual const PropMap & | getObjectProperties (int, const QString &) |
virtual const ObjMap & | getObjectProperties (int) |
virtual const ViewMgrMap & | getObjectProperties () const |
virtual void | removeObjectProperties (int) |
virtual void | removeObjectProperties (const QString &) |
virtual void | setVisibilityState (const QString &theEntry, Qtx::VisibilityState theState) |
virtual Qtx::VisibilityState | visibilityState (const QString &theEntry) const |
virtual void | setVisibilityStateForAll (Qtx::VisibilityState theState) |
virtual LightApp_DataObject * | findObjectByEntry (const QString &theEntry) |
Public Member Functions inherited from CAM_Study | |
CAM_Study (SUIT_Application *) | |
Constructor. More... | |
virtual | ~CAM_Study () |
Destructor. 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 void | Modified () |
bool | saveDocument () |
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 Member Functions | |
virtual void | saveModuleData (QString theModuleName, QStringList theListOfFiles) |
virtual void | openModuleData (QString theModuleName, QStringList &theListOfFiles) |
virtual bool | saveStudyData (const QString &theFileName) |
virtual bool | openStudyData (const QString &theFileName) |
virtual std::vector< std::string > | GetListOfFiles (const char *theModuleName) const |
virtual void | SetListOfFiles (const char *theModuleName, const std::vector< std::string > theListOfFiles) |
virtual void | RemoveTemporaryFiles (const char *theModuleName, const bool isMultiFile) const |
virtual bool | openDataModel (const QString &, CAM_DataModel *) |
virtual CAM_ModuleObject * | createModuleObject (LightApp_DataModel *theDataModel, SUIT_DataObject *theParent) const |
Protected Member Functions inherited from CAM_Study | |
virtual void | dataModelInserted (const CAM_DataModel *) |
Called when data model is inserted in the study. 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 | |
LightApp_Driver * | myDriver |
ViewMgrMap | myViewMgrMap |
Friends | |
class | LightApp_Application |
class | LightApp_DataModel |
Additional Inherited Members | |
Public Types inherited from CAM_Study | |
typedef QList< CAM_DataModel * > | ModelList |
Protected Slots inherited from CAM_Study | |
virtual void | updateModelRoot (const CAM_DataModel *) |
Update data model root object. More... | |
Custom study, using for open/close of documents HDF format. Data of each module can be saved to different files, those after that are combined into one HDF file
LightApp_Study::LightApp_Study | ( | SUIT_Application * | app | ) |
Constructor.
References myDriver.
|
virtual |
Destructor.
References myDriver.
|
virtual |
Creates SComponent for module, necessary for SalomeApp study
Reimplemented in SalomeApp_Study.
|
virtual |
Get the entry for the given module
comp | - list to be filled |
Reimplemented in SalomeApp_Study.
References CAM_Study::dataModels(), LightApp_DataObject::entry(), CAM_DataModel::module(), CAM_Module::name(), and CAM_DataModel::root().
|
virtual |
Reimplemented in SalomeApp_Study.
|
signal |
|
virtual |
Closes document
Reimplemented from CAM_Study.
Reimplemented in SalomeApp_Study.
References LightApp_Driver::ClearDriverContents(), closed(), CAM_Study::closeDocument(), and myDriver.
|
virtual |
Reimplemented in SalomeApp_Study.
References LightApp_DataObject::componentDataType(), SUIT_DataObjectIterator::current(), SUIT_DataObjectIterator::DepthLeft, LightApp_DataObject::entry(), and SUIT_Study::root().
|
virtual |
Fills list with components names
comp | - list to be filled |
Reimplemented in SalomeApp_Study.
References SUIT_DataObject::children(), children(), LightApp_DataObject::entry(), getVisualComponentName(), obj, and SUIT_Study::root().
|
signal |
|
virtual |
Create document.
Reimplemented from SUIT_Study.
Reimplemented in SalomeApp_Study.
References created(), SUIT_Study::createDocument(), SUIT_Study::setRoot(), SUIT_Study::setStudyName(), and LightApp_Application::studyId().
|
protectedvirtual |
Virtual method that creates the root object (module object) for the given data model. The type of the created object depends on the study class, therefore data model classes should not create their module objects directly and should instead use LightApp_DataModel::createModuleObject() that in its turn relies on this method.
theDataModel | - data model instance to create a module object for |
theParent | - the module object's parent (normally it's the study root) |
Reimplemented in SalomeApp_Study.
References addComponent(), SUIT_DataObject::children(), children(), CAM_DataModel::module(), CAM_Module::moduleName(), LightApp_ModuleObject::name(), obj, and SUIT_Study::root().
|
virtual |
Find a data object by the specified entry.
theEntry | - Entry of the object. |
Reimplemented in SalomeApp_Study.
References SUIT_DataObjectIterator::current(), SUIT_DataObjectIterator::DepthLeft, LightApp_DataObject::entry(), and SUIT_Study::root().
|
protectedvirtual |
theModuleName | - name of module |
Reimplemented in SalomeApp_Study.
References LightApp_Driver::GetListOfFiles(), and myDriver.
|
virtual |
Get a map of the properties of the object identified by theViewMgrId and theEntry.
theViewMgrId | - Id of the viewer manager. |
theEntry | - Entry of the object. |
References myViewMgrMap.
Get all objects and it's properties from view manager identified by theViewMgrId.
theEntry | - Entry of the object. |
References myViewMgrMap.
|
virtual |
Get global properties map
References myViewMgrMap.
|
virtual |
Get a visual property of the object identified by theViewMgrId, theEntry and thePropName.
theViewMgrId | - Id of the viewer manager. |
theEntry | - Entry of the object. |
thePropName | - the name of the visual property. |
theDefValue | - the default value of the visual property. |
References myViewMgrMap.
Reimplemented in SalomeApp_Study.
References LightApp_Driver::GetTmpDir(), and myDriver.
|
virtual |
|
virtual |
Reimplemented in SalomeApp_Study.
References SUIT_DataObject::children(), LightApp_DataObject::entry(), obj, and SUIT_Study::root().
|
virtual |
Reimplemented from SUIT_Study.
Reimplemented in SalomeApp_Study.
References CAM_Study::dataModels(), SUIT_Study::isModified(), and LightApp_DataModel::isModified().
|
virtual |
Reimplemented from SUIT_Study.
Reimplemented in SalomeApp_Study.
References SUIT_Study::isSaved().
|
virtual |
Loads document
Reimplemented in SalomeApp_Study.
References SUIT_Study::application(), LightApp_Driver::ClearDriverContents(), CAM_Study::dataModels(), myDriver, openDataModel(), SUIT_Study::openDocument(), opened(), openStudyData(), SUIT_Study::setRoot(), and SUIT_Study::studyName().
|
signal |
|
protectedvirtual |
Opens data model
Reimplemented from CAM_Study.
Reimplemented in SalomeApp_Study.
References CAM_DataModel::module(), CAM_Module::name(), CAM_DataModel::open(), openModuleData(), and LightApp_DataModel::update().
|
virtual |
Opens document
Reimplemented from SUIT_Study.
Reimplemented in SalomeApp_Study.
References SUIT_Study::application(), LightApp_Driver::ClearDriverContents(), CAM_Study::dataModels(), myDriver, openDataModel(), SUIT_Study::openDocument(), opened(), openStudyData(), SUIT_Study::setRoot(), and SUIT_Study::studyName().
|
signal |
|
protectedvirtual |
Gets list of file for module 'theModuleNam'
Reimplemented in SalomeApp_Study.
References LightApp_Driver::GetListOfFiles(), and myDriver.
|
protectedvirtual |
Opens data for study
Reimplemented in SalomeApp_Study.
References SUIT_Study::application(), QtxResourceMgr::booleanValue(), myDriver, LightApp_Driver::ReadDatasFromFile(), and SUIT_Application::resourceMgr().
|
virtual |
entry | - entry of reference object |
Reimplemented in SalomeApp_Study.
|
virtual |
Remove view manager with all objects.
theViewMgrId | - Id of the viewer manager. |
References myViewMgrMap.
|
virtual |
Remove object's properties from all view managers.
theEntry | - Entry of the object. |
References myViewMgrMap.
|
protectedvirtual |
Removes temporary files
Reimplemented in SalomeApp_Study.
References myDriver, and LightApp_Driver::RemoveTemporaryFiles().
|
signal |
|
virtual |
Saves document
Reimplemented in SalomeApp_Study.
References LightApp_Driver::ClearDriverContents(), CAM_Study::dataModels(), CAM_DataModel::module(), myDriver, CAM_Module::name(), LightApp_DataModel::save(), saved(), SUIT_Study::saveDocument(), saveModuleData(), saveStudyData(), and SUIT_Study::studyName().
|
virtual |
Saves document
Reimplemented from SUIT_Study.
Reimplemented in SalomeApp_Study.
References SUIT_Study::application(), QtxResourceMgr::booleanValue(), CAM_Study::dataModels(), LightApp_Driver::GetListOfFiles(), CAM_DataModel::module(), myDriver, CAM_Module::name(), LightApp_Driver::RemoveFiles(), SUIT_Application::resourceMgr(), LightApp_DataModel::saveAs(), saved(), SUIT_Study::saveDocumentAs(), saveModuleData(), and saveStudyData().
|
protectedvirtual |
Saves list file for module 'theModuleName'
Reimplemented in SalomeApp_Study.
References myDriver, and LightApp_Driver::SetListOfFiles().
|
protectedvirtual |
Saves data from study
Reimplemented in SalomeApp_Study.
References SUIT_Study::application(), QtxResourceMgr::booleanValue(), CAM_Study::dataModels(), myDriver, SUIT_Application::resourceMgr(), and LightApp_Driver::SaveDatasInFile().
|
protectedvirtual |
Sets list of files necessary for module
theModuleName | - name of module |
theListOfFiles | - list of files |
Reimplemented in SalomeApp_Study.
References myDriver, and LightApp_Driver::SetListOfFiles().
|
virtual |
Set a map of the properties of the object identified by theViewMgrId and theEntry.
theViewMgrId | - Id of the viewer manager. |
theEntry | - Entry of the object. |
References myViewMgrMap.
|
virtual |
Set a visual property of the object
theViewMgrId | - Id of the viewer namager |
theEntry | - Entry of the object |
thePropName | - the name of the visual property |
theValue | - the value of the visual property |
References myViewMgrMap.
|
virtual |
Set a visual property of the object for all registered viewers
theEntry | - Entry of the object |
thePropName | - the name of the visual property |
theValue | - the value of the visual property |
References getObjectProperties(), and setObjectProperty().
|
virtual |
Set a visual property for all registered objects for given viewer
theViewMgrId | - Id of the viewer manager. |
thePropName | - the name of the visual property |
theValue | - the value of the visual property |
References getObjectProperties(), and setObjectProperty().
|
virtual |
Set 'visibility state' property of the object.
theEntry | - Entry of the object. |
theState | - visibility status |
References app, SUIT_Study::application(), OB_Browser::model(), LightApp_Application::objectBrowser(), objVisibilityChanged(), and SUIT_AbstractModel::setVisibilityState().
|
virtual |
Set 'visibility state' property for all object.
theEntry | - Entry of the object. |
References app, SUIT_Study::application(), OB_Browser::model(), LightApp_Application::objectBrowser(), and SUIT_AbstractModel::setVisibilityStateForAll().
|
virtual |
Get 'visibility state' property of the object.
theEntry | - Entry of the object. |
References app, SUIT_Study::application(), OB_Browser::model(), LightApp_Application::objectBrowser(), Qtx::UnpresentableState, and SUIT_AbstractModel::visibilityState().
|
friend |
|
friend |
|
private |
|
private |