1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef HYDROGUI_DATAOBJECT_H
24 #define HYDROGUI_DATAOBJECT_H
26 #include <HYDROData_Object.h>
28 #include <LightApp_DataObject.h>
35 * \class HYDROGUI_DataObject
36 * \brief Module data object, used for object browser tree creation.
38 * This is an Object Browser object that contains reference to data structure
40 * This class inherits CAM_DataObject virtually, so it is necessary to call in the class
41 * constructor the CAM object constructor manually for the correct initialization
43 class HYDROGUI_DataObject : public LightApp_DataObject
48 * \param theParent parent data object
49 * \param theData reference to the corresponding object from data structure
51 HYDROGUI_DataObject( SUIT_DataObject* theParent,
52 Handle(HYDROData_Object) theData );
55 * Returns the unique object identifier string.
57 virtual QString entry() const;
60 * Returns the name of object.
62 virtual QString name() const;
65 * Returns the model data object.
67 const Handle(HYDROData_Object)& modelObject() const { return myData; }
70 * Redefines the object.
72 void setObject( Handle(HYDROData_Object) theObject ) { myData = theObject; }
75 * Returns the entry prefix for all HYDRO data objects.
77 static QString entryPrefix() { return QString( "HYDRO_" ); }
80 * Returns the full entry for the specified data object.
82 static QString dataObjectEntry( const Handle(HYDROData_Object)& theObject );
85 Handle(HYDROData_Object) myData; ///< object from data model
89 * \class HYDROGUI_NamedObject
90 * \brief Module data object, used for object browser tree creation.
92 * It contains only name inside, without additional data: it is just information
93 * or grouping object in the Object Browser.
94 * This class inherits CAM_DataObject virtually, so it is necessary to call in the class
95 * constructor the CAM object constructor manually for the correct initialization
97 class HYDROGUI_NamedObject : public virtual LightApp_DataObject
102 * \param theParent parent data object
103 * \param theName displayed name
105 HYDROGUI_NamedObject( SUIT_DataObject* theParent,
106 const QString& theName );
109 * Returns the unique object identifier string.
111 virtual QString entry() const;
114 * Returns the name of object.
116 virtual QString name() const;
119 QString myName; ///< name in the OB