A Data Model class provides a connection of SALOME data structure and OpenParts application data model.
More...
#include <SHAPERGUI_DataModel.h>
|
| | SHAPERGUI_DataModel (SHAPERGUI *theModule) |
| | Constructor. More...
|
| |
| virtual bool | open (const QString &thePath, CAM_Study *theStudy, QStringList theFiles) |
| | Open a data file. More...
|
| |
| virtual bool | save (QStringList &theFiles) |
| | Save module data to file. More...
|
| |
| virtual bool | saveAs (const QString &thePath, CAM_Study *theStudy, QStringList &theFiles) |
| | Save module data to a file. More...
|
| |
| virtual bool | close () |
| | Close data structure. More...
|
| |
| virtual bool | create (CAM_Study *theStudy) |
| | Create data structure. More...
|
| |
| virtual bool | isModified () const |
| | Returns True if the data structure has been modified. More...
|
| |
| virtual bool | isSaved () const |
| | Returns True if the data structure is already saved. More...
|
| |
| virtual void | initRootObject () override |
| | Creates a module root object if it has not been created yet and append it to the active study. More...
|
| |
| virtual void | update (LightApp_DataObject *theObj=0, LightApp_Study *theStudy=0) |
| | Update data object. More...
|
| |
| virtual bool | dumpPython (const QString &, CAM_Study *, bool, QStringList &) |
| | Redefinition of virtual method: include the module dump in the common SALOME dump. More...
|
| |
|
| static void | removeDirectory (const QString &theDirectoryName) |
| | Removes the directory with content if it exists. More...
|
| |
A Data Model class provides a connection of SALOME data structure and OpenParts application data model.
◆ SHAPERGUI_DataModel()
| SHAPERGUI_DataModel::SHAPERGUI_DataModel |
( |
SHAPERGUI * |
theModule | ) |
|
Constructor.
- Parameters
-
| theModule | a module instance |
◆ open()
| bool SHAPERGUI_DataModel::open |
( |
const QString & |
thePath, |
|
|
CAM_Study * |
theStudy, |
|
|
QStringList |
theFiles |
|
) |
| |
|
virtual |
Open a data file.
- Parameters
-
| thePath | a path to the directory |
| theStudy | a current study |
| theFiles | a list of files to open |
◆ save()
| bool SHAPERGUI_DataModel::save |
( |
QStringList & |
theFiles | ) |
|
|
virtual |
Save module data to file.
- Parameters
-
| theFiles | list of created files |
◆ saveAs()
| bool SHAPERGUI_DataModel::saveAs |
( |
const QString & |
thePath, |
|
|
CAM_Study * |
theStudy, |
|
|
QStringList & |
theFiles |
|
) |
| |
|
virtual |
Save module data to a file.
- Parameters
-
| thePath | a path to the directory |
| theStudy | a current study |
| theFiles | a list of files to open |
◆ close()
| bool SHAPERGUI_DataModel::close |
( |
| ) |
|
|
virtual |
◆ create()
| bool SHAPERGUI_DataModel::create |
( |
CAM_Study * |
theStudy | ) |
|
|
virtual |
Create data structure.
- Parameters
-
◆ isModified()
| bool SHAPERGUI_DataModel::isModified |
( |
| ) |
const |
|
virtual |
Returns True if the data structure has been modified.
◆ isSaved()
| bool SHAPERGUI_DataModel::isSaved |
( |
| ) |
const |
|
virtual |
Returns True if the data structure is already saved.
◆ initRootObject()
| void SHAPERGUI_DataModel::initRootObject |
( |
| ) |
|
|
overridevirtual |
Creates a module root object if it has not been created yet and append it to the active study.
It is necessary for correct persistent of the model.
◆ update()
| void SHAPERGUI_DataModel::update |
( |
LightApp_DataObject * |
theObj = 0, |
|
|
LightApp_Study * |
theStudy = 0 |
|
) |
| |
|
virtual |
Update data object.
- Parameters
-
| theObj | an data object |
| theStudy | a current study |
◆ dumpPython()
| bool SHAPERGUI_DataModel::dumpPython |
( |
const QString & |
thePath, |
|
|
CAM_Study * |
theStudy, |
|
|
bool |
isMultiFile, |
|
|
QStringList & |
theListOfFiles |
|
) |
| |
|
virtual |
Redefinition of virtual method: include the module dump in the common SALOME dump.
◆ removeDirectory()
| void SHAPERGUI_DataModel::removeDirectory |
( |
const QString & |
theDirectoryName | ) |
|
|
staticprotected |
Removes the directory with content if it exists.
- Parameters
-
| theDirectoryName | a directory name |