Salome HOME
Update from BR_V5_DEV 13Feb2009
[modules/gui.git] / src / SalomeApp / SalomeApp_DataObject.cxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 // File   : SalomeApp_DataObject.cxx
23 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
24 //
25 #include "SalomeApp_DataObject.h"
26 #include "SalomeApp_Study.h"
27 #include "SalomeApp_Application.h"
28
29 #include <CAM_DataObject.h>
30
31 #include <SUIT_Session.h>
32 #include <SUIT_Application.h>
33 #include <SUIT_ResourceMgr.h>
34
35 #include <SALOME_LifeCycleCORBA.hxx>
36 #include <Basics_Utils.hxx>
37
38 #include <QObject>
39 #include <QVariant>
40
41 /*!
42   \class SalomeApp_DataObject
43   \brief Implementation of the data object for use in CORBA-based
44   SALOME modules.
45 */
46
47 /*!
48   \brief Constructor. 
49   \param parent parent data object
50 */
51 SalomeApp_DataObject::SalomeApp_DataObject( SUIT_DataObject* parent )
52 : CAM_DataObject( parent ),
53   LightApp_DataObject( parent )
54 {
55 }
56
57 /*!
58   \brief Constructor. 
59   \param sobj SALOMEDS object
60   \param parent parent data object
61 */
62 SalomeApp_DataObject::SalomeApp_DataObject( const _PTR(SObject)& sobj, 
63                                             SUIT_DataObject* parent )
64 : CAM_DataObject( parent ),
65   LightApp_DataObject( parent )
66 {
67   myObject = sobj;
68 }
69
70 /*!
71   \brief Destructor.
72 */
73 SalomeApp_DataObject::~SalomeApp_DataObject()
74 {
75 }
76
77 /*!
78   \brief Get data object name.
79   \return object name
80 */
81 QString SalomeApp_DataObject::name() const
82 {
83   QString str;
84   if ( myObject )
85     str = myObject->GetName().c_str();
86   
87   if ( str.isEmpty() ) {
88     _PTR(SObject) refObj = referencedObject();
89     if ( refObj )
90       str = refObj->GetName().c_str();
91   }
92   
93   if ( isReference() ) {
94     if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
95       str = QString( "* " ) + str;
96     else
97       str = QString( "<Invalid Reference>" );
98   }
99   return str;
100 }
101
102 /*!
103   \brief Get object string identifier.
104   \return object ID
105 */
106 QString SalomeApp_DataObject::entry() const
107 {
108   return entry( myObject );
109 }
110
111 /*!
112   \brief Get object text data for the specified column.
113
114   This method returns the data according to the specufied column \a id:
115   - NameId     : object name (by calling name() method)
116   - EntryId    : object entry (by calling entry() method)
117   - ValueId    : object value
118   - IORId      : object IOR
119   - RefEntryId : object reference entry
120
121   \param id column id
122   \return object text data
123 */
124 QString SalomeApp_DataObject::text( const int id ) const
125 {
126   QString txt;
127
128   // add "Value", "IOR", and "Reference Entry" columns
129   switch ( id )
130   {
131   case ValueId:
132 #ifndef WIN32
133     if ( componentObject() != this )
134 #else
135     if ( componentObject() != (SUIT_DataObject*)this )
136 #endif
137       txt = value( object() );
138       if ( txt.isEmpty() )
139         txt = value( referencedObject() );
140     break;
141   case IORId:
142     txt = ior( referencedObject() );
143     break;
144   case RefEntryId :
145     if ( isReference() )
146       txt = entry( referencedObject() );
147     break;
148   default:
149     txt = LightApp_DataObject::text( id );
150     break;
151   }
152   return txt;
153 }
154
155 /*!
156   \brief Get data object icon for the specified column.
157   \param id column id
158   \return object icon for the specified column
159 */
160 QPixmap SalomeApp_DataObject::icon( const int id ) const
161 {
162   // we display icon only for the first (NameId ) column
163   if ( id == NameId ) {
164     _PTR(GenericAttribute) anAttr;
165     if ( myObject && myObject->FindAttribute( anAttr, "AttributePixMap" ) ){
166       _PTR(AttributePixMap) aPixAttr ( anAttr );
167       if ( aPixAttr->HasPixMap() ) {
168         QString componentType = componentDataType();
169         QString pixmapID      = aPixAttr->GetPixMap().c_str();
170         // select a plugin within a component
171         QStringList plugin_pixmap = pixmapID.split( "::", QString::KeepEmptyParts );
172         if ( plugin_pixmap.size() == 2 ) {
173           componentType = plugin_pixmap.front();
174           pixmapID      = plugin_pixmap.back();
175         }
176         QString pixmapName = QObject::tr( pixmapID.toLatin1().constData() );
177         LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
178         if ( aRoot && aRoot->study() ) {
179           SUIT_ResourceMgr* mgr = aRoot->study()->application()->resourceMgr();
180           return mgr->loadPixmap( componentType, pixmapName, false ); 
181         }
182       }
183     }
184   }
185   return LightApp_DataObject::icon( id );
186 }
187
188 /*!
189   \brief Get data object color for the specified column.
190   \param role color role
191   \param id column id (not used)
192   \return object color for the specified column
193 */
194 QColor SalomeApp_DataObject::color( const ColorRole role, const int id ) const
195 {
196   // we ignore parameter <id> in order to use the same colors for 
197   // all columns
198   QColor c;
199   switch ( role )
200   {
201   case Text:
202   case Foreground:
203     // text color (not selected item)
204     if ( isReference() ) {
205       if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
206         c = QColor( 255, 0, 0 );      // valid reference (red)
207       else
208         c = QColor( 200, 200, 200 );  // invalid reference (grayed)
209     }
210     else if ( myObject ) {
211       // get color atrtribute value
212       _PTR(GenericAttribute) anAttr;
213       if ( myObject->FindAttribute( anAttr, "AttributeTextColor" ) ) {
214         _PTR(AttributeTextColor) aColAttr = anAttr;
215         c = QColor( (int)aColAttr->TextColor().R, (int)aColAttr->TextColor().G, (int)aColAttr->TextColor().B );
216       }
217     }
218     break;
219   case Highlight:
220     // background color for the highlighted item
221     if ( isReference() ) {
222       if ( !(QString(referencedObject()->GetName().c_str()).isEmpty()) )
223         c = QColor( 255, 0, 0 );      // valid reference (red)
224       else
225         c = QColor( 200, 200, 200 );  // invalid reference (grayed)
226     }
227     else if ( myObject ) {
228       // get color atrtribute value
229       _PTR(GenericAttribute) anAttr;
230       if( myObject->FindAttribute ( anAttr, "AttributeTextHighlightColor") ) {
231         _PTR(AttributeTextHighlightColor) aHighColAttr = anAttr;
232         c = QColor( (int)(aHighColAttr->TextHighlightColor().R), 
233                     (int)(aHighColAttr->TextHighlightColor().G), 
234                     (int)(aHighColAttr->TextHighlightColor().B));
235       }
236     }
237     break;
238   case HighlightedText:
239     // text color for the highlighted item
240     if ( isReference() )
241       c = QColor( 255, 255, 255 );   // white
242     break;
243   }
244   if ( !c.isValid() )
245     c = LightApp_DataObject::color( role, id );
246   return c;
247 }
248
249 /*!
250   \brief Get data object tooltip for the specified column.
251   \param id column id (not used)
252   \return object tooltip for the specified column
253 */
254 QString SalomeApp_DataObject::toolTip( const int /*id*/ ) const
255 {
256   // we ignore parameter <id> in order to use the same tooltip for 
257   // all columns
258   
259   // Get customized tooltip in case of it exists
260   const SalomeApp_DataObject* compObj = dynamic_cast<SalomeApp_DataObject*>( componentObject() );
261   // Check if the component has been loaded.
262   // In order to avoid loading the component only for getting a custom tooltip.
263   if ( compObj && compObj != this && !ior(compObj->object()).isEmpty() ) {
264     SalomeApp_Application* app = 
265       dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
266     if ( app ) {
267       // --- try to find (and not load) the component instance, like GEOM instance,
268       //     registered in naming service under Containers/<hostname>/...
269       //     with any container name, on every machine available
270       Engines::MachineParameters params;
271       app->lcc()->preSet(params); // --- any container name, anywhere
272       Engines::Component_var aComponent =
273         app->lcc()->FindComponent(params, componentDataType().toLatin1().constData() );
274       
275       if ( !CORBA::is_nil(aComponent) && aComponent->hasObjectInfo() ) {
276         LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
277         if ( aRoot && aRoot->study() )
278           return QString( aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData()) );
279       }
280     }
281   }
282   
283   return QString( "Object \'%1\', module \'%2\', ID=%3" ).arg( name() ).arg( componentDataType() ).arg( entry() );
284 }
285
286 /*!
287   \brief Get component type.
288   \return component type
289 */
290 QString SalomeApp_DataObject::componentDataType() const
291 {
292   //  if ( myCompDataType.isEmpty() ) {
293     const SalomeApp_DataObject* compObj = dynamic_cast<SalomeApp_DataObject*>( componentObject() );
294     if ( compObj && compObj->object() )
295     {
296       _PTR(SComponent) aComp( compObj->object() );
297       if ( aComp ) {
298         SalomeApp_DataObject* that = (SalomeApp_DataObject*)this;
299         that->myCompDataType = aComp->ComponentDataType().c_str();
300       }
301     }
302     //  }
303   return myCompDataType;
304 }
305
306 /*!
307   \brief Get SALOMEDS object.
308   \return SALOMEDS object
309 */
310 _PTR(SObject) SalomeApp_DataObject::object() const
311 {
312   return myObject;
313 }
314
315 /*!
316   \brief Check if the data object is a reference.
317   \return \c true if this data object actually refers to another one
318 */
319 bool SalomeApp_DataObject::isReference() const
320 {
321   bool isRef = false;
322   if ( myObject )
323   {
324     _PTR(SObject) refObj;
325     isRef = myObject->ReferencedObject( refObj );
326   }
327   return isRef;
328 }
329
330 /*!
331   \brief Get the object referenced by this one.
332   \return referenced object
333 */
334 _PTR(SObject) SalomeApp_DataObject::referencedObject() const
335 {
336   _PTR(SObject) refObj;
337   _PTR(SObject) obj = myObject;
338   while ( obj && obj->ReferencedObject( refObj ) )
339     obj = refObj;
340
341   return obj;
342 }
343
344 /*!
345   \brief Check if the specified column supports custom sorting.
346   \param id column id
347   \return \c true if column sorting should be customized
348   \sa compare()
349 */
350 bool SalomeApp_DataObject::customSorting( const int id ) const
351 {
352   // perform custom sorting for the "Entry" and "Reference Entry" columns
353   return id == EntryId  || id == RefEntryId  ? true 
354     : LightApp_DataObject::customSorting( id );
355 }
356
357 /*!
358   \brief Compares data from two items for sorting purposes.
359
360   This method is called only for those columns for which customSorting()
361   method returns \c true.
362
363   \param left first data to compare
364   \param right second data to compare
365   \param id column id
366   \return result of the comparison
367   \sa customSorting()
368 */
369 bool SalomeApp_DataObject::compare( const QVariant& left, const QVariant& right, const int id ) const
370 {
371   // use the same custom sorting for the "Reference Entry" column as for the
372   // "Entry" column (call base implementation)
373   return LightApp_DataObject::compare( left, right, id == RefEntryId ? EntryId : id );
374 }
375
376 /*!
377   \brief Get data object IOR.
378   \param obj data object
379   \return data object IOR or null string if IOR is empty
380 */
381 QString SalomeApp_DataObject::ior( const _PTR(SObject)& obj ) const
382 {
383   QString txt;
384   if ( obj )
385   {
386     _PTR(GenericAttribute) attr;
387     if ( obj->FindAttribute( attr, "AttributeIOR" ) )
388     {
389       _PTR(AttributeIOR) iorAttr = attr;
390       if ( iorAttr )
391       {
392         std::string str = iorAttr->Value();
393         txt = QString( str.c_str() );
394       }
395     }
396   }
397   return txt;
398 }
399
400 /*!
401   \brief Get data object entry identifier.
402   \param obj data object
403   \return data object entry identifier or empty object does not have entry
404 */
405 QString SalomeApp_DataObject::entry( const _PTR(SObject)& obj ) const
406 {
407   QString txt;
408   if ( obj )
409   {
410     std::string str = obj->GetID();
411     txt = QString( str.c_str() );
412   }
413   return txt;
414 }
415
416 /*!
417   \brief Get data object value.
418   \param obj data object
419   \return data object value or empty string if there is no 
420   value associated to the object
421 */
422 QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const
423 {
424   if ( !obj )
425     return QString();
426
427   QString val;
428   _PTR(GenericAttribute) attr;
429
430   if ( obj->FindAttribute( attr, "AttributeString" ) )
431   {
432     _PTR(AttributeString) strAttr = attr;
433     std::string str = strAttr->Value();
434     QString aStrings = QString( str.c_str() );
435     
436     //Special case to show NoteBook variables in the "Value" column of the OB 
437     if ( LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() ) )
438     {
439       if ( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( aRoot->study() ) )
440       {
441         _PTR(Study) studyDS( aStudy->studyDS() );
442
443         bool ok = false;
444         QStringList aSectionList = aStrings.split( "|" );
445         if ( !aSectionList.isEmpty() )
446         {
447           QString aLastSection = aSectionList.last();
448           QStringList aStringList = aLastSection.split( ":" );
449           if ( !aStringList.isEmpty() )
450           {
451             ok = true;
452             for ( int i = 0, n = aStringList.size(); i < n; i++ )
453             {
454               QString aStr = aStringList[i];
455               if ( studyDS->IsVariable( aStr.toStdString() ) )
456                 val.append( aStr + ", " );
457             }
458
459             if ( !val.isEmpty() )
460               val.remove( val.length() - 2, 2 );
461           }
462         }
463         if( !ok )
464           val = aStrings;
465       }
466     }
467   }
468   else if ( obj->FindAttribute( attr, "AttributeInteger" ) )
469   {
470     _PTR(AttributeInteger) intAttr = attr;
471     if ( intAttr )
472       val = QString::number( intAttr->Value() );
473   }
474   else if ( obj->FindAttribute( attr, "AttributeReal" ) )
475   {
476     _PTR(AttributeReal) realAttr = attr;
477     if ( realAttr )
478       val = QString::number( realAttr->Value() );
479   }
480   else if ( obj->FindAttribute( attr, "AttributeTableOfInteger" ) )
481   {
482     _PTR(AttributeTableOfInteger) tableAttr = attr;
483     std::string title = tableAttr->GetTitle();
484     val = QString( title.c_str() );
485     if ( !val.isEmpty() )
486       val += QString( " " );
487     val += QString( "[%1,%2]" ).arg( tableAttr->GetNbRows() ).arg( tableAttr->GetNbColumns() );
488   }
489   else if ( obj->FindAttribute( attr, "AttributeTableOfReal" ) )
490   {
491     _PTR(AttributeTableOfReal) tableAttr = attr;
492     std::string title = tableAttr->GetTitle();
493     val = QString( title.c_str() );
494     if ( !val.isEmpty() )
495       val += QString( " " );
496     val += QString( "[%1,%2]" ).arg( tableAttr->GetNbRows() ).arg( tableAttr->GetNbColumns() );
497   }
498   else if ( obj->FindAttribute( attr, "AttributeComment" ) )
499   {
500     _PTR(AttributeComment) comm = attr;
501     std::string str = comm->Value();
502     val = QString( str.c_str() );
503   }
504
505   return val;
506 }
507
508 /*!
509   \class SalomeApp_ModuleObject
510   \brief This class is used for optimized access to the SALOMEDS-based 
511   data model from SalomeApp_DataObject class instances.
512   \sa CAM_ModuleObject class
513 */
514
515 /*!
516   \brief Constructor.
517   \param parent parent data object
518 */
519 SalomeApp_ModuleObject::SalomeApp_ModuleObject( SUIT_DataObject* parent )
520 : CAM_DataObject( parent ),
521   LightApp_DataObject( parent ),
522   SalomeApp_DataObject( parent ),
523   CAM_ModuleObject( parent )
524 {
525 }
526
527 /*!
528   \brief Constructor.
529   \param sobj SALOMEDS object
530   \param parent parent data object
531 */
532 SalomeApp_ModuleObject::SalomeApp_ModuleObject( const _PTR(SObject)& sobj, 
533                                                 SUIT_DataObject* parent )
534 : CAM_DataObject( parent ),
535   LightApp_DataObject( parent ),
536   SalomeApp_DataObject( sobj, parent ),
537   CAM_ModuleObject( parent )
538 {
539 }
540
541 /*!
542   \brief Constructor.
543   \param dm data model
544   \param sobj SALOMEDS object
545   \param parent parent data object
546 */
547 SalomeApp_ModuleObject::SalomeApp_ModuleObject( CAM_DataModel* dm, 
548                                                 const _PTR(SObject)& sobj, 
549                                                 SUIT_DataObject* parent )
550 : CAM_DataObject( parent ),
551   LightApp_DataObject( parent ),
552   SalomeApp_DataObject( sobj, parent ),
553   CAM_ModuleObject( dm, parent )
554 {
555 }
556
557 /*!
558   \brief Destructor.
559 */
560 SalomeApp_ModuleObject::~SalomeApp_ModuleObject()
561 {
562 }
563
564 /*!
565   \brief Get module name.
566   \return module name
567 */
568 QString SalomeApp_ModuleObject::name() const
569 {
570   return SalomeApp_DataObject::name();
571 }
572
573 /*!
574   \brief Get data object icon for the specified column.
575   \param id column id
576   \return object icon for the specified column
577 */
578 QPixmap SalomeApp_ModuleObject::icon( const int id ) const
579 {
580   return SalomeApp_DataObject::icon( id );
581 }
582
583 /*!
584   \brief Get data object tooltip for the specified column.
585   \param id column id
586   \return object tooltip for the specified column
587 */
588 QString SalomeApp_ModuleObject::toolTip( const int id ) const
589 {
590   return SalomeApp_DataObject::toolTip( id );
591 }
592
593 /*!
594   \class SalomeApp_RootObject
595   \brief Root data object for the CORBA-based SALOME application.
596
597   This class is to be instanciated by only one object - the root object
598   of the SalomeApp data object tree. This object is not shown in the object browser.
599   The goal of this class is to provide a unified access to SalomeApp_Study
600   object from SalomeApp_DataObject instances.
601 */
602
603 /*!
604   \brief Constructor.
605   \param study pointer to the study
606 */
607 SalomeApp_RootObject::SalomeApp_RootObject( LightApp_Study* study )
608 : CAM_DataObject( 0 ),
609   LightApp_DataObject( 0 ),
610   SalomeApp_DataObject( 0 ),
611   LightApp_RootObject( study )
612 {
613 }
614
615 /*!
616   \brief Destructor.
617 */
618 SalomeApp_RootObject::~SalomeApp_RootObject()
619 {
620 }
621
622 /*!
623   \brief Get data object name.
624   \return object name
625 */
626 QString SalomeApp_RootObject::name() const
627 {
628   return LightApp_RootObject::name();
629 }
630  
631 /*!
632   \brief Get object string identifier.
633   \return object ID
634 */
635 QString SalomeApp_RootObject::entry() const
636 {
637   return LightApp_RootObject::entry();
638 }
639
640 /*!
641   \brief Get object text data for the specified column.
642   \param id column id
643   \return object text data
644 */
645 QString SalomeApp_RootObject::text( const int id ) const
646 {
647   return LightApp_RootObject::text( id );
648 }
649
650 /*!
651   \brief Get data object icon for the specified column.
652   \param id column id
653   \return object icon for the specified column
654 */
655 QPixmap SalomeApp_RootObject::icon( const int id ) const
656 {
657   return LightApp_RootObject::icon( id );
658 }
659
660 /*!
661   \brief Get data object color for the specified column.
662   \param role color role
663   \param id column id (not used)
664   \return object color for the specified column
665 */
666 QColor SalomeApp_RootObject::color( const ColorRole role, const int id ) const
667 {
668   return LightApp_RootObject::color( role, id );
669 }
670
671 /*!
672   \brief Get data object tooltip for the specified column.
673   \param id column id (not used)
674   \return object tooltip for the specified column
675 */
676 QString SalomeApp_RootObject::toolTip( const int id ) const
677 {
678   return LightApp_RootObject::toolTip( id );
679 }
680
681 /*!
682   \class SalomeApp_SavePointObject
683   \brief Represents persistent visual_state object.
684
685   Save point objects are stored in the data model, but NOT in SObjects
686   structure, so they are handled separately using this special class
687 */
688
689 /*!
690   \brief Constructor.
691   \param parent parent data object
692   \param id save point ID
693   \param study study
694 */
695 SalomeApp_SavePointObject::SalomeApp_SavePointObject( SUIT_DataObject* parent, 
696                                                       const int id, 
697                                                       SalomeApp_Study* study )
698 : LightApp_DataObject( parent ), 
699   CAM_DataObject( parent ),
700   myId( id ),
701   myStudy( study )
702 {
703 }
704
705 /*!
706   \brief Destructor.
707 */
708 SalomeApp_SavePointObject::~SalomeApp_SavePointObject()
709 {
710 }
711
712 /*!
713   \brief Get save point unique identifier.
714   \return save point ID
715 */
716 int SalomeApp_SavePointObject::getId() const
717 {
718   return myId;
719 }
720
721 /*!
722   \brief Get object string identifier.
723   \return object ID
724 */
725 QString SalomeApp_SavePointObject::entry() const
726 {
727   return QObject::tr( "SAVE_POINT_DEF_NAME" ) + QString::number( myId );
728 }
729
730 /*!
731   \brief Get data object name.
732   \return object name
733 */
734 QString SalomeApp_SavePointObject::name() const
735 {
736   return myStudy->getNameOfSavePoint( myId );
737 }
738
739 /*!
740   \brief Get data object icon for the specified column.
741   \param id column id
742   \return object icon for the specified column
743 */
744 QPixmap SalomeApp_SavePointObject::icon( const int /*id*/ ) const
745 {
746   return QPixmap();
747 }
748
749 /*!
750   \brief Get data object tooltip for the specified column.
751   \param id column id (not used)
752   \return object tooltip for the specified column
753 */
754 QString SalomeApp_SavePointObject::toolTip( const int /*id*/ ) const
755 {
756   return QObject::tr( "SAVE_POINT_OBJECT_TOOLTIP" ).arg( name() );
757 }
758
759 /*!
760   \class SalomeApp_SavePointRootObject
761   \brief Represents parent object for visual_state objects.
762 */
763
764 /*!
765   \brief Constructor.
766   \param parent parent object
767 */
768 SalomeApp_SavePointRootObject::SalomeApp_SavePointRootObject( SUIT_DataObject* parent )
769 : SUIT_DataObject( parent )
770 {
771 }
772
773 /*!
774   \brief Get data object name.
775   \return object name
776 */
777 QString SalomeApp_SavePointRootObject::name() const
778 {
779   return QObject::tr( "SAVE_POINT_ROOT_NAME" ); 
780 }
781
782 /*!
783   \brief Get data object tooltip for the specified column.
784   \param id column id (not used)
785   \return object tooltip for the specified column
786 */
787 QString SalomeApp_SavePointRootObject::toolTip( const int /*id*/ ) const
788 {
789   return QObject::tr( "SAVE_POINT_ROOT_TOOLTIP" ); 
790 }