#include <LightApp_DataModel.h>
Signals | |
void | opened () |
void | saved () |
void | closed () |
Signals inherited from CAM_DataModel | |
void | rootChanged (const CAM_DataModel *) |
Emitted when the root data object is changed. More... | |
Public Member Functions | |
LightApp_DataModel (CAM_Module *theModule) | |
virtual | ~LightApp_DataModel () |
virtual bool | open (const QString &, CAM_Study *, QStringList) |
virtual bool | save (QStringList &) |
virtual bool | saveAs (const QString &, CAM_Study *, QStringList &) |
virtual bool | close () |
virtual bool | dumpPython (const QString &, CAM_Study *, bool, QStringList &) |
virtual void | update (LightApp_DataObject *=0, LightApp_Study *=0) |
virtual bool | isModified () const |
virtual bool | isSaved () const |
LightApp_Module * | getModule () const |
int | groupId () const |
void | registerColumn (SUIT_DataBrowser *, const QString &, const int) |
void | unregisterColumn (SUIT_DataBrowser *, const QString &) |
Public Member Functions inherited from CAM_DataModel | |
CAM_DataModel (CAM_Module *) | |
Constructor. More... | |
virtual | ~CAM_DataModel () |
Destructor. More... | |
virtual void | initialize () |
Initialize data model. More... | |
CAM_DataObject * | root () const |
Get data model root object. More... | |
CAM_Module * | module () const |
Get module. More... | |
virtual bool | create (CAM_Study *) |
Create empty data model. More... | |
Protected Member Functions | |
LightApp_Study * | getStudy () const |
virtual void | build () |
virtual void | updateWidgets () |
virtual CAM_ModuleObject * | createModuleObject (SUIT_DataObject *theRoot) const |
Protected Member Functions inherited from CAM_DataModel | |
virtual void | setRoot (const CAM_DataObject *) |
Set data model root object. More... | |
Private Attributes | |
int | myGroupId |
Description : Base class of data model
LightApp_DataModel::LightApp_DataModel | ( | CAM_Module * | theModule | ) |
Constructor
References CAM_DataModel::module(), and myGroupId.
|
virtual |
Destructor
|
protectedvirtual |
Build whole data model tree
|
virtual |
Emit closed()
Reimplemented from CAM_DataModel.
Reimplemented in SALOME_PYQT_DataModelLight.
References closed().
|
signal |
|
protectedvirtual |
Creates the data model's root (module object) using the study services. This is important because different study classes use different moduel object classes. Therefore creation of the module object cannot be done at the data model level where the type of the current study instance should not be known. The module object returned by this method should be then passed to the model's setRoot().
References LightApp_Study::createModuleObject(), and LightApp_RootObject::study().
|
virtual |
Does nothing by default. Should be redefined in light modules that want to participate in "Dump study" operation.
Reimplemented in SALOME_PYQT_DataModelLight.
LightApp_Module * LightApp_DataModel::getModule | ( | ) | const |
References CAM_DataModel::module().
|
protected |
References CAM_DataModel::root(), SUIT_DataObject::root(), and LightApp_RootObject::study().
int LightApp_DataModel::groupId | ( | ) | const |
References myGroupId.
|
virtual |
default implementation, always returns false so as not to mask study's isModified()
Reimplemented in SALOME_PYQT_DataModelLight.
|
virtual |
default implementation, always returns true so as not to mask study's isSaved()
Emit opened()
Reimplemented from CAM_DataModel.
Reimplemented in SalomeApp_DataModel, and SALOME_PYQT_DataModelLight.
References opened().
|
signal |
void LightApp_DataModel::registerColumn | ( | SUIT_DataBrowser * | browser, |
const QString & | name, | ||
const int | custom_id | ||
) |
Register custom column in the object browser
browser | - object browser where new column should be created |
name | - translated column name |
custom_id | - custom column identificator passed into data object's methods text(), icon() etc |
References groupId(), OB_Browser::model(), and SUIT_AbstractModel::registerColumn().
|
virtual |
Emit saved()
Reimplemented from CAM_DataModel.
Reimplemented in SALOME_PYQT_DataModelLight.
References saved().
Emit saved()
Reimplemented from CAM_DataModel.
Reimplemented in SALOME_PYQT_DataModelLight.
References saved().
|
signal |
void LightApp_DataModel::unregisterColumn | ( | SUIT_DataBrowser * | browser, |
const QString & | name | ||
) |
Remove registered custom column from the object browser
browser | - object browser where new column should be created |
name | - translated column name |
References groupId(), OB_Browser::model(), and SUIT_AbstractModel::unregisterColumn().
|
virtual |
Default behaviour of data model update for light modules
Reimplemented in SalomeApp_DataModel, and SALOME_PYQT_DataModelLight.
References build(), SUIT_DataObject::children(), CAM_DataModel::root(), and updateWidgets().
|
protectedvirtual |
Updates data model presentation in some widgets (for example, in object browser
References app, CAM_Module::application(), CAM_DataModel::module(), LightApp_Application::objectBrowser(), and SUIT_DataBrowser::updateTree().
|
private |