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/ or email : webmaster.salome@opencascade.com
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;
72 * SalomeApp_ModuleObject - class for optimized access to DataModel from
73 * SalomeApp_DataObject instances - see also CAM_RootObject.h
76 class SALOMEAPP_EXPORT SalomeApp_ModuleObject : public SalomeApp_DataObject,
80 SalomeApp_ModuleObject( SUIT_DataObject* = 0 );
81 SalomeApp_ModuleObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
82 SalomeApp_ModuleObject( CAM_DataModel*, const _PTR(SObject)&, SUIT_DataObject* = 0 );
83 virtual ~SalomeApp_ModuleObject();
85 virtual QString name() const;
89 * SalomeApp_SavePointObject - class that represents persistent visual_state object
90 * these objects are stored in data model, but NOT in SObjects structure, so we
91 * must handle them separately using this special class for them
94 class SALOMEAPP_EXPORT SalomeApp_SavePointObject : public virtual LightApp_DataObject
97 SalomeApp_SavePointObject( SUIT_DataObject* parent, const int, SalomeApp_Study* study );
98 virtual ~SalomeApp_SavePointObject();
100 virtual QString entry() const;
102 virtual QString name() const;
103 virtual QPixmap icon() const;
104 virtual QString toolTip() const;
110 SalomeApp_Study* myStudy;
114 * SalomeApp_SavePointRootObject - class that represents parent object for visual_state objects
117 class SALOMEAPP_EXPORT SalomeApp_SavePointRootObject : public SUIT_DataObject
120 SalomeApp_SavePointRootObject( SUIT_DataObject* parent ) : SUIT_DataObject( parent ) {}
122 virtual QString name() const { return QObject::tr( "SAVE_POINT_ROOT_NAME" ); }
123 virtual QString toolTip() const{ return QObject::tr( "SAVE_POINT_ROOT_TOOLTIP" ); }