X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_DataModel.h;h=2b7d92176c7bd94a8f5b232b6fcd805d6d783f3f;hb=282328072477a3e3cde6d02204129828c4c7ac23;hp=473a71fba77ff8f3aabbaed892d735d577f2f2a4;hpb=f0688b4c39fcc3e49c2b58a90724b9c1c84f1337;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_DataModel.h b/src/HYDROGUI/HYDROGUI_DataModel.h index 473a71fb..2b7d9217 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.h +++ b/src/HYDROGUI/HYDROGUI_DataModel.h @@ -51,6 +51,11 @@ public: HYDROGUI_DataModel( CAM_Module* theModule ); virtual ~HYDROGUI_DataModel(); + /** + * Creates the document into the data model. Reimplemented. + */ + virtual bool create( CAM_Study* ); + /** * Open the document into the data model. Reimplemented. * \param theURL opened study path @@ -144,7 +149,8 @@ public: /** * Create a new region in the given calculation case containing given zones. */ - bool createNewRegion( Handle(HYDROData_CalculationCase) theCase, const QList& theZonesList ); + bool createNewRegion( Handle(HYDROData_CalculationCase) theCase, + const QList& theZonesList ); /** * Correct an internal model object according to the current document mode @@ -226,6 +232,7 @@ public: * Creates the Calculation Case subtree for usage within an operation dialog. * \param theParent a created object will be appended as a child of this GUI object * \param theCase the calculation case model object + * \param theLandCover if true - land cover regions will be represented in the tree */ void buildCaseTree( SUIT_DataObject* theParent, Handle(HYDROData_CalculationCase) theCase ); @@ -248,6 +255,14 @@ public: */ static QString partitionName( const ObjectKind theObjectKind ); + /** + * Creates the default Strickler table object: both GUI data object and corresponding model object + * \param theDocument a document into which created object will be added + * \param theParent a created object will be appended as a child of this GUI object + */ + void createDefaultStricklerTable( const Handle(HYDROData_Document)& theDocument, + LightApp_DataObject* theParent ); + protected: /** * Returns the document for the current study @@ -358,6 +373,17 @@ protected: static SUIT_DataObject* findChildByName( const SUIT_DataObject* theFather, const QString& theName ); + void updateDocument(); + + /** + * Set object visibility state. + * \param theModelObject the data model object + * \param theDataObject the GUI object + */ + void setObjectVisibilityState( Handle(HYDROData_Entity) theModelObject, + HYDROGUI_DataObject* theObject ); + + protected: QString myStudyURL; ///< the saved/opened document URL QByteArray myStates;