Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LightApp_Study Class Reference

#include <LightApp_Study.h>

Inheritance diagram for LightApp_Study:
Inheritance graph

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 PropMapgetObjectProperties (int, const QString &)
 
virtual const ObjMapgetObjectProperties (int)
 
virtual const ViewMgrMapgetObjectProperties () 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_DataObjectfindObjectByEntry (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_DataObjectroot () const
 
virtual QString studyName () const
 
SUIT_Applicationapplication () const
 
virtual void Modified ()
 
bool saveDocument ()
 
virtual void update ()
 
virtual void sendChangesNotification ()
 
SUIT_OperationactiveOperation () const
 
virtual void abortAllOperations ()
 
const QList< SUIT_Operation * > & operations () const
 Get all started operations. More...
 
virtual SUIT_OperationblockingOperation (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_ModuleObjectcreateModuleObject (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_DrivermyDriver
 
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...
 

Detailed Description

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

Constructor & Destructor Documentation

LightApp_Study::LightApp_Study ( SUIT_Application app)

Constructor.

References myDriver.

LightApp_Study::~LightApp_Study ( )
virtual

Destructor.

References myDriver.

Member Function Documentation

void LightApp_Study::addComponent ( const CAM_DataModel dm)
virtual

Creates SComponent for module, necessary for SalomeApp study

Reimplemented in SalomeApp_Study.

QString LightApp_Study::centry ( const QString &  comp) const
virtual

Get the entry for the given module

Parameters
comp- list to be filled
Returns
module root's entry

Reimplemented in SalomeApp_Study.

References CAM_Study::dataModels(), LightApp_DataObject::entry(), CAM_DataModel::module(), CAM_Module::name(), and CAM_DataModel::root().

void LightApp_Study::children ( const QString &  ,
QStringList &   
) const
virtual
Returns
entries of object children

Reimplemented in SalomeApp_Study.

void LightApp_Study::closed ( SUIT_Study )
signal
void LightApp_Study::closeDocument ( bool  permanently = true)
virtual

Closes document

Reimplemented from CAM_Study.

Reimplemented in SalomeApp_Study.

References LightApp_Driver::ClearDriverContents(), closed(), CAM_Study::closeDocument(), and myDriver.

QString LightApp_Study::componentDataType ( const QString &  entry) const
virtual
void LightApp_Study::components ( QStringList &  comp) const
virtual

Fills list with components names

Parameters
comp- list to be filled

Reimplemented in SalomeApp_Study.

References SUIT_DataObject::children(), children(), LightApp_DataObject::entry(), getVisualComponentName(), obj, and SUIT_Study::root().

void LightApp_Study::created ( SUIT_Study )
signal
bool LightApp_Study::createDocument ( const QString &  theStr)
virtual
CAM_ModuleObject * LightApp_Study::createModuleObject ( LightApp_DataModel theDataModel,
SUIT_DataObject theParent 
) const
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.

Parameters
theDataModel- data model instance to create a module object for
theParent- the module object's parent (normally it's the study root)
Returns
the module object instance
See Also
LightApp_DataModel class, SalomeApp_Study class, LightApp_ModuleObject class

Reimplemented in SalomeApp_Study.

References addComponent(), SUIT_DataObject::children(), children(), CAM_DataModel::module(), CAM_Module::moduleName(), LightApp_ModuleObject::name(), obj, and SUIT_Study::root().

LightApp_DataObject * LightApp_Study::findObjectByEntry ( const QString &  theEntry)
virtual

Find a data object by the specified entry.

Parameters
theEntry- Entry of the object.
Returns
data object.

Reimplemented in SalomeApp_Study.

References SUIT_DataObjectIterator::current(), SUIT_DataObjectIterator::DepthLeft, LightApp_DataObject::entry(), and SUIT_Study::root().

std::vector< std::string > LightApp_Study::GetListOfFiles ( const char *  theModuleName) const
protectedvirtual
Returns
list of files necessary for module
Parameters
theModuleName- name of module

Reimplemented in SalomeApp_Study.

References LightApp_Driver::GetListOfFiles(), and myDriver.

const PropMap & LightApp_Study::getObjectProperties ( int  theViewMgrId,
const QString &  theEntry 
)
virtual

Get a map of the properties of the object identified by theViewMgrId and theEntry.

Parameters
theViewMgrId- Id of the viewer manager.
theEntry- Entry of the object.
Returns
a map of the properties of the object.

References myViewMgrMap.

const ObjMap & LightApp_Study::getObjectProperties ( int  theViewMgrId)
virtual

Get all objects and it's properties from view manager identified by theViewMgrId.

Parameters
theEntry- Entry of the object.

References myViewMgrMap.

const ViewMgrMap & LightApp_Study::getObjectProperties ( ) const
virtual

Get global properties map

References myViewMgrMap.

QVariant LightApp_Study::getObjectProperty ( int  theViewMgrId,
const QString &  theEntry,
const QString &  thePropName,
const QVariant &  theDefValue 
) const
virtual

Get a visual property of the object identified by theViewMgrId, theEntry and thePropName.

Parameters
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.
Returns
value of the visual propetry. If value is't found then return theDefValue.

References myViewMgrMap.

std::string LightApp_Study::GetTmpDir ( const char *  theURL,
const bool  isMultiFile 
)
virtual
Returns
temporary directory for saving files of modules

Reimplemented in SalomeApp_Study.

References LightApp_Driver::GetTmpDir(), and myDriver.

QString LightApp_Study::getVisualComponentName ( ) const
virtual
Returns
a name of the component where visual parameters are stored
bool LightApp_Study::isComponent ( const QString &  entry) const
virtual
Returns
true if entry corresponds to component

Reimplemented in SalomeApp_Study.

References SUIT_DataObject::children(), LightApp_DataObject::entry(), obj, and SUIT_Study::root().

bool LightApp_Study::isModified ( ) const
virtual
Returns
true if study is modified

Reimplemented from SUIT_Study.

Reimplemented in SalomeApp_Study.

References CAM_Study::dataModels(), SUIT_Study::isModified(), and LightApp_DataModel::isModified().

bool LightApp_Study::isSaved ( ) const
virtual
Returns
true if data model is saved

Reimplemented from SUIT_Study.

Reimplemented in SalomeApp_Study.

References SUIT_Study::isSaved().

void LightApp_Study::objVisibilityChanged ( QString  ,
Qtx::VisibilityState   
)
signal
bool LightApp_Study::openDataModel ( const QString &  studyName,
CAM_DataModel dm 
)
protectedvirtual
bool LightApp_Study::openDocument ( const QString &  theFileName)
virtual
void LightApp_Study::opened ( SUIT_Study )
signal
void LightApp_Study::openModuleData ( QString  theModuleName,
QStringList &  theListOfFiles 
)
protectedvirtual

Gets list of file for module 'theModuleNam'

Reimplemented in SalomeApp_Study.

References LightApp_Driver::GetListOfFiles(), and myDriver.

bool LightApp_Study::openStudyData ( const QString &  theFileName)
protectedvirtual
QString LightApp_Study::referencedToEntry ( const QString &  entry) const
virtual
Returns
real entry by entry of reference
Parameters
entry- entry of reference object

Reimplemented in SalomeApp_Study.

void LightApp_Study::removeObjectProperties ( int  theViewMgrId)
virtual

Remove view manager with all objects.

Parameters
theViewMgrId- Id of the viewer manager.

References myViewMgrMap.

void LightApp_Study::removeObjectProperties ( const QString &  theEntry)
virtual

Remove object's properties from all view managers.

Parameters
theEntry- Entry of the object.

References myViewMgrMap.

void LightApp_Study::RemoveTemporaryFiles ( const char *  theModuleName,
const bool  isMultiFile 
) const
protectedvirtual

Removes temporary files

Reimplemented in SalomeApp_Study.

References myDriver, and LightApp_Driver::RemoveTemporaryFiles().

void LightApp_Study::saved ( SUIT_Study )
signal
void LightApp_Study::saveModuleData ( QString  theModuleName,
QStringList  theListOfFiles 
)
protectedvirtual

Saves list file for module 'theModuleName'

Reimplemented in SalomeApp_Study.

References myDriver, and LightApp_Driver::SetListOfFiles().

bool LightApp_Study::saveStudyData ( const QString &  theFileName)
protectedvirtual
void LightApp_Study::SetListOfFiles ( const char *  theModuleName,
const std::vector< std::string >  theListOfFiles 
)
protectedvirtual

Sets list of files necessary for module

Parameters
theModuleName- name of module
theListOfFiles- list of files

Reimplemented in SalomeApp_Study.

References myDriver, and LightApp_Driver::SetListOfFiles().

void LightApp_Study::setObjectProperties ( int  theViewMgrId,
const QString &  theEntry,
const PropMap thePropMap 
)
virtual

Set a map of the properties of the object identified by theViewMgrId and theEntry.

Parameters
theViewMgrId- Id of the viewer manager.
theEntry- Entry of the object.

References myViewMgrMap.

void LightApp_Study::setObjectProperty ( int  theViewMgrId,
const QString &  theEntry,
const QString &  thePropName,
const QVariant &  theValue 
)
virtual

Set a visual property of the object

Parameters
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.

void LightApp_Study::setObjectProperty ( const QString &  theEntry,
const QString &  thePropName,
const QVariant &  theValue 
)
virtual

Set a visual property of the object for all registered viewers

Parameters
theEntry- Entry of the object
thePropName- the name of the visual property
theValue- the value of the visual property

References getObjectProperties(), and setObjectProperty().

void LightApp_Study::setObjectProperty ( int  theViewMgrId,
const QString &  thePropName,
const QVariant &  theValue 
)
virtual

Set a visual property for all registered objects for given viewer

Parameters
theViewMgrId- Id of the viewer manager.
thePropName- the name of the visual property
theValue- the value of the visual property

References getObjectProperties(), and setObjectProperty().

void LightApp_Study::setVisibilityState ( const QString &  theEntry,
Qtx::VisibilityState  theState 
)
virtual

Set 'visibility state' property of the object.

Parameters
theEntry- Entry of the object.
theState- visibility status

References app, SUIT_Study::application(), OB_Browser::model(), LightApp_Application::objectBrowser(), objVisibilityChanged(), and SUIT_AbstractModel::setVisibilityState().

void LightApp_Study::setVisibilityStateForAll ( Qtx::VisibilityState  theState)
virtual

Set 'visibility state' property for all object.

Parameters
theEntry- Entry of the object.

References app, SUIT_Study::application(), OB_Browser::model(), LightApp_Application::objectBrowser(), and SUIT_AbstractModel::setVisibilityStateForAll().

Qtx::VisibilityState LightApp_Study::visibilityState ( const QString &  theEntry) const
virtual

Get 'visibility state' property of the object.

Parameters
theEntry- Entry of the object.
Returns
'visibility state' property of the object.

References app, SUIT_Study::application(), OB_Browser::model(), LightApp_Application::objectBrowser(), Qtx::UnpresentableState, and SUIT_AbstractModel::visibilityState().

Friends And Related Function Documentation

friend class LightApp_Application
friend
friend class LightApp_DataModel
friend

Member Data Documentation

LightApp_Driver* LightApp_Study::myDriver
private
ViewMgrMap LightApp_Study::myViewMgrMap
private

The documentation for this class was generated from the following files: