1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #ifndef SALOMEAPP_DATAOBJECT_H
20 #define SALOMEAPP_DATAOBJECT_H
22 #include "SalomeApp.h"
24 #include "LightApp_DataObject.h"
25 #include "CAM_RootObject.h"
27 #include "SALOMEDSClient.hxx"
29 class SalomeApp_Study;
31 class SALOMEAPP_EXPORT SalomeApp_DataObject : public LightApp_DataObject
35 enum { CT_Value, CT_Entry, CT_IOR, CT_RefEntry };
38 SalomeApp_DataObject( SUIT_DataObject* = 0 );
39 SalomeApp_DataObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
40 virtual ~SalomeApp_DataObject();
42 virtual QString name() const;
43 virtual QPixmap icon() const;
44 virtual QString toolTip() const;
46 virtual QString text( const int ) const;
47 virtual QColor color( const ColorRole ) const;
49 virtual QString entry() const;
51 /*! location of corresponding SALOMEDS::SObject */
52 virtual _PTR(SObject) object() const;
54 bool isReference() const;
55 _PTR(SObject) referencedObject() const;
57 /*! GEOM, SMESH, VISU, etc.*/
58 virtual QString componentDataType() const;
61 QString ior( const _PTR(SObject)& ) const;
62 QString entry( const _PTR(SObject)& ) const;
63 QString value( const _PTR(SObject)& ) const;
66 _PTR(SObject) myObject;
70 * SalomeApp_ModuleObject - class for optimized access to DataModel from
71 * SalomeApp_DataObject instances - see also CAM_RootObject.h
74 class SALOMEAPP_EXPORT SalomeApp_ModuleObject : public SalomeApp_DataObject,
78 SalomeApp_ModuleObject( SUIT_DataObject* = 0 );
79 SalomeApp_ModuleObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
80 SalomeApp_ModuleObject( CAM_DataModel*, const _PTR(SObject)&, SUIT_DataObject* = 0 );
81 virtual ~SalomeApp_ModuleObject();
83 virtual QString name() const;