+
+/*!
+ \brief Get module name.
+ \return module name
+*/
+QString SalomeApp_ModuleObject::name() const
+{
+ return SalomeApp_DataObject::name();
+}
+
+/*!
+ \brief Get data object icon for the specified column.
+ \param id column id
+ \return object icon for the specified column
+ \sa CAM_ModuleObject class
+*/
+QPixmap SalomeApp_ModuleObject::icon( const int id ) const
+{
+ QPixmap p = SalomeApp_DataObject::icon( id );
+ // The module might not provide a separate small icon
+ // for Obj. Browser representation -> always try to scale it
+ // See CAM_ModuleObject::icon()
+ if ( !p.isNull() )
+ p = Qtx::scaleIcon( p, 16 );
+ return p;
+}
+
+/*!
+ \brief Get data object tooltip for the specified column.
+ \param id column id
+ \return object tooltip for the specified column
+*/
+QString SalomeApp_ModuleObject::toolTip( const int id ) const
+{
+ return SalomeApp_DataObject::toolTip( id );
+}
+
+/*!
+ \class SalomeApp_RootObject
+ \brief Root data object for the CORBA-based SALOME application.
+
+ This class is to be instanciated by only one object - the root object
+ of the SalomeApp data object tree. This object is not shown in the object browser.
+ The goal of this class is to provide a unified access to SalomeApp_Study
+ object from SalomeApp_DataObject instances.
+*/
+
+/*!
+ \brief Constructor.
+ \param study pointer to the study
+*/
+SalomeApp_RootObject::SalomeApp_RootObject( LightApp_Study* study )
+: CAM_DataObject( 0 ),
+ LightApp_DataObject( 0 ),
+ SalomeApp_DataObject( 0 ),
+ LightApp_RootObject( study ),
+ _toSynchronize(true)
+{
+}
+
+/*!
+ \brief Destructor.
+*/
+SalomeApp_RootObject::~SalomeApp_RootObject()
+{
+}
+
+/*!
+ \brief Get data object name.
+ \return object name
+*/
+QString SalomeApp_RootObject::name() const
+{
+ return LightApp_RootObject::name();
+}
+
+/*!
+ \brief Get object string identifier.
+ \return object ID
+*/
+QString SalomeApp_RootObject::entry() const
+{
+ return LightApp_RootObject::entry();
+}
+
+/*!
+ \brief Get object text data for the specified column.
+ \param id column id
+ \return object text data
+*/
+QString SalomeApp_RootObject::text( const int id ) const
+{
+ return LightApp_RootObject::text( id );
+}
+
+/*!
+ \brief Get data object icon for the specified column.
+ \param id column id
+ \return object icon for the specified column
+*/
+QPixmap SalomeApp_RootObject::icon( const int id ) const
+{
+ return LightApp_RootObject::icon( id );
+}
+
+/*!
+ \brief Get data object color for the specified column.
+ \param role color role
+ \param id column id (not used)
+ \return object color for the specified column
+*/
+QColor SalomeApp_RootObject::color( const ColorRole role, const int id ) const
+{
+ return LightApp_RootObject::color( role, id );
+}
+
+/*!
+ \brief Get data object tooltip for the specified column.
+ \param id column id (not used)
+ \return object tooltip for the specified column
+*/
+QString SalomeApp_RootObject::toolTip( const int id ) const
+{
+ return LightApp_RootObject::toolTip( id );
+}
+
+/*!
+ \class SalomeApp_SavePointObject
+ \brief Represents persistent visual_state object.
+
+ Save point objects are stored in the data model, but NOT in SObjects
+ structure, so they are handled separately using this special class
+*/
+
+/*!
+ \brief Constructor.
+ \param parent parent data object
+ \param id save point ID
+ \param study study
+*/
+SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* parent,
+ const int id,
+ SalomeApp_Study* study )
+ : CAM_DataObject( parent ),
+ LightApp_DataObject( parent ),
+ myId( id ),
+ myStudy( study )
+{
+}
+
+/*!
+ \brief Destructor.
+*/
+SalomeApp_SavePointObject::~SalomeApp_SavePointObject()
+{
+}
+
+/*!
+ \brief Get save point unique identifier.
+ \return save point ID
+*/
+int SalomeApp_SavePointObject::getId() const
+{
+ return myId;
+}
+
+/*!
+ \brief Get object string identifier.
+ \return object ID
+*/
+QString SalomeApp_SavePointObject::entry() const
+{
+ return QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( myId );
+}
+
+/*!
+ \brief Get data object name.
+ \return object name
+*/
+QString SalomeApp_SavePointObject::name() const
+{
+ return myStudy->getNameOfSavePoint( myId );
+}
+
+/*!
+ \brief Get data object icon for the specified column.
+ \param id column id
+ \return object icon for the specified column
+*/
+QPixmap SalomeApp_SavePointObject::icon( const int /*id*/ ) const
+{
+ return QPixmap();
+}
+
+/*!
+ \brief Get data object tooltip for the specified column.
+ \param id column id (not used)
+ \return object tooltip for the specified column
+*/
+QString SalomeApp_SavePointObject::toolTip( const int /*id*/ ) const
+{
+ return QObject::tr( "SAVE_POINT_OBJECT_TOOLTIP" ).arg( name() );
+}
+
+/*!
+ \class SalomeApp_SavePointRootObject
+ \brief Represents parent object for visual_state objects.
+*/
+
+/*!
+ \brief Constructor.
+ \param parent parent object
+*/
+SalomeApp_SavePointRootObject::SalomeApp_SavePointRootObject( SUIT_DataObject* parent )
+: SUIT_DataObject( parent )
+{
+}
+
+/*!
+ \brief Get data object name.
+ \return object name
+*/
+QString SalomeApp_SavePointRootObject::name() const
+{
+ return QObject::tr( "SAVE_POINT_ROOT_NAME" );
+}
+
+/*!
+ \brief Get data object tooltip for the specified column.
+ \param id column id (not used)
+ \return object tooltip for the specified column
+*/
+QString SalomeApp_SavePointRootObject::toolTip( const int /*id*/ ) const
+{
+ return QObject::tr( "SAVE_POINT_ROOT_TOOLTIP" );
+}