1 // Copyright (C) 2007-2008 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
22 // File : SalomeApp_DataObject.h
23 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
25 #ifndef SALOMEAPP_DATAOBJECT_H
26 #define SALOMEAPP_DATAOBJECT_H
28 #include "SalomeApp.h"
29 #include <LightApp_DataObject.h>
30 #include <SALOMEDSClient.hxx>
32 class SalomeApp_Study;
34 class SALOMEAPP_EXPORT SalomeApp_DataObject : public virtual LightApp_DataObject
40 ValueId = EntryId + 1, //!< value column
41 IORId, //!< IOR column
42 RefEntryId //!< reference entry column
46 SalomeApp_DataObject( SUIT_DataObject* = 0 );
47 SalomeApp_DataObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
48 virtual ~SalomeApp_DataObject();
50 virtual QString name() const;
51 virtual QString entry() const;
53 virtual QString text( const int = NameId ) const;
54 virtual QPixmap icon( const int = NameId ) const;
55 virtual QColor color( const ColorRole, const int = NameId ) const;
56 virtual QString toolTip( const int = NameId ) const;
58 virtual _PTR(SObject) object() const;
60 bool isReference() const;
61 _PTR(SObject) referencedObject() const;
63 virtual QString componentDataType() const;
65 virtual bool customSorting( const int = NameId ) const;
66 virtual bool compare( const QVariant&, const QVariant&, const int = NameId ) const;
69 QString ior( const _PTR(SObject)& ) const;
70 QString entry( const _PTR(SObject)& ) const;
71 QString value( const _PTR(SObject)& ) const;
74 _PTR(SObject) myObject;
77 class SALOMEAPP_EXPORT SalomeApp_ModuleObject : public SalomeApp_DataObject,
78 public CAM_ModuleObject
81 SalomeApp_ModuleObject( SUIT_DataObject* = 0 );
82 SalomeApp_ModuleObject( const _PTR(SObject)&, SUIT_DataObject* = 0 );
83 SalomeApp_ModuleObject( CAM_DataModel*, const _PTR(SObject)&, SUIT_DataObject* = 0 );
84 virtual ~SalomeApp_ModuleObject();
86 virtual QString name() const;
87 QPixmap icon( const int = NameId ) const;
88 QString toolTip( const int = NameId ) const;
91 class SALOMEAPP_EXPORT SalomeApp_RootObject : public SalomeApp_DataObject,
92 public LightApp_RootObject
95 SalomeApp_RootObject( LightApp_Study* );
96 virtual ~SalomeApp_RootObject();
99 QString entry() const;
100 QString text( const int = NameId ) const;
101 QPixmap icon( const int = NameId ) const;
102 QColor color( const ColorRole, const int = NameId ) const;
103 QString toolTip( const int = NameId ) const;
106 class SALOMEAPP_EXPORT SalomeApp_SavePointObject : public virtual LightApp_DataObject
109 SalomeApp_SavePointObject( SUIT_DataObject*, const int, SalomeApp_Study* );
110 virtual ~SalomeApp_SavePointObject();
112 virtual QString name() const;
113 virtual QString entry() const;
115 virtual QPixmap icon( const int = NameId ) const;
116 virtual QString toolTip( const int = NameId ) const;
122 SalomeApp_Study* myStudy;
125 class SALOMEAPP_EXPORT SalomeApp_SavePointRootObject : public SUIT_DataObject
128 SalomeApp_SavePointRootObject( SUIT_DataObject* );
130 virtual QString name() const;
131 virtual QString toolTip( const int = NameId ) const;