]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Provide icons for presentations in Object Browser tree.
authormzn <mzn@opencascade.com>
Wed, 8 Nov 2006 12:56:40 +0000 (12:56 +0000)
committermzn <mzn@opencascade.com>
Wed, 8 Nov 2006 12:56:40 +0000 (12:56 +0000)
26 files changed:
src/VISUGUI/VISU_images.po
src/VISUGUI/VisuGUI_Tools.cxx
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_CutLines_i.cc
src/VISU_I/VISU_CutLines_i.hh
src/VISU_I/VISU_CutPlanes_i.cc
src/VISU_I/VISU_CutPlanes_i.hh
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_DeformedShape_i.hh
src/VISU_I/VISU_GaussPoints_i.hh
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_IsoSurfaces_i.hh
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Plot3D_i.cc
src/VISU_I/VISU_Plot3D_i.hh
src/VISU_I/VISU_PrsMerger_i.cc
src/VISU_I/VISU_PrsMerger_i.hh
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.hh
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_StreamLines_i.hh
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_Vectors_i.cc
src/VISU_I/VISU_Vectors_i.hh

index 9d2040769034f91d24bd35a99aa5964b79fe553f..15dc4652add3ab0901efe13390e58be4e8ab0dd0 100644 (file)
@@ -54,7 +54,7 @@ msgid "ICON_ISO_SURFACES"
 msgstr "Visu_isosurfaces.png"
 
 msgid "ICON_CUT_PLANES"
-msgstr "Visu_cutplane.png"
+msgstr "Visu_cutplanes.png"
 
 msgid "ICON_CUT_LINES"
 msgstr "Visu_cutlines.png"
@@ -65,6 +65,80 @@ msgstr "Visu_streamlines.png"
 msgid "ICON_PLOT2D"
 msgstr "Visu_plot2d.png"
 
+# Tree icons for presentations
+
+msgid "ICON_TREE_RESULT"
+msgstr "Visu_tree_result.png"
+
+msgid "ICON_TREE_TABLE"
+msgstr "Visu_tree_table.png"
+
+msgid "ICON_TREE_CURVE"
+msgstr "Visu_tree_curve.png"
+
+msgid "ICON_TREE_CONTAINER"
+msgstr "Visu_tree_container.png"
+
+msgid "ICON_TREE_MESH"
+msgstr "Visu_tree_mesh.png"
+
+msgid "ICON_TREE_SCALAR_MAP"
+msgstr "Visu_tree_scalars.png"
+
+msgid "ICON_TREE_SCALAR_MAP_GROUPS"
+msgstr "Visu_tree_scalars_gr.png"
+
+msgid "ICON_TREE_DEFORMED_SHAPE"
+msgstr "Visu_tree_deformed.png"
+
+msgid "ICON_TREE_DEFORMED_SHAPE_GROUPS"
+msgstr "Visu_tree_deformed_gr.png"
+
+msgid "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE"
+msgstr "Visu_tree_scalarmapondeformedshape.png"
+
+msgid "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS"
+msgstr "Visu_tree_scalarmapondeformedshape_gr.png"
+
+msgid "ICON_TREE_VECTORS"
+msgstr "Visu_tree_vectors.png"
+
+msgid "ICON_TREE_VECTORS_GROUPS"
+msgstr "Visu_tree_vectors_gr.png"
+
+msgid "ICON_TREE_ISO_SURFACES"
+msgstr "Visu_tree_isosurfaces.png"
+
+msgid "ICON_TREE_ISO_SURFACES_GROUPS"
+msgstr "Visu_tree_isosurfaces_gr.png"
+
+msgid "ICON_TREE_CUT_PLANES"
+msgstr "Visu_tree_cutplanes.png"
+
+msgid "ICON_TREE_CUT_PLANES_GROUPS"
+msgstr "Visu_tree_cutplanes_gr.png"
+
+msgid "ICON_TREE_CUT_LINES"
+msgstr "Visu_tree_cutlines.png"
+
+msgid "ICON_TREE_CUT_LINES_GROUPS"
+msgstr "Visu_tree_cutlines_gr.png"
+
+msgid "ICON_TREE_STREAM_LINES"
+msgstr "Visu_tree_streamlines.png"
+
+msgid "ICON_TREE_STREAM_LINES_GROUPS"
+msgstr "Visu_tree_streamlines_gr.png"
+
+msgid "ICON_TREE_PLOT_3D"
+msgstr "Visu_tree_plot3d.png"
+
+msgid "ICON_TREE_PLOT_3D_GROUPS"
+msgstr "Visu_tree_plot3d_gr.png"
+
+msgid "ICON_TREE_GAUSS_POINTS"
+msgstr "Visu_tree_gauss_points.png"
+
 # Representation menu
 
 msgid "ICON_POINTS"
index 763de11a8b7f43d98bc3a680d253f866d512a306..5538c0d54ece7b982a81686b22edfe20e5397caf 100644 (file)
@@ -1121,6 +1121,9 @@ namespace VISU
       }
     }
 
+    SalomeApp_Module* aModule = (SalomeApp_Module*)theModule;
+    UpdateObjBrowser(aModule, false, aResultSObj);
+
     theModule->application()->putInfo(QObject::tr("INF_DONE"));
     // Make "Save" button active
     theModule->getApp()->updateActions();
index 275d3e2e92fa7d8a1db3c37a92cb81238acd9f6f..b45ccbe2e1949ebb987b824d82c31dcc6aedc296 100644 (file)
@@ -659,6 +659,8 @@ VISU::ColoredPrs3d_i
 }
 
 //----------------------------------------------------------------------------
+
+
 VISU::Storable* 
 VISU::ColoredPrs3d_i
 ::Build(int theRestoring)
@@ -695,6 +697,17 @@ VISU::ColoredPrs3d_i
       CORBA::String_var anIOR = GetID();
       CreateAttributes(myStudy,anEntry.c_str(),aRefFatherEntry.c_str(),anIOR,myName.c_str(),"",aComment.latin1(),true);
       mySObject = myStudy->FindObjectIOR(anIOR);
+      
+      // Set icon
+      if (GetIconName() != 0)
+       {
+         SALOMEDS::GenericAttribute_var anAttr;
+         SALOMEDS::AttributePixMap_var  aPixmap;
+
+         anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+         aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+         aPixmap ->SetPixMap(GetIconName());
+       }
     }
 #ifndef _DEXCEPT_
   }catch(std::exception& exc){
index b5417b22a32dde891548d36b3b4f34ccf6400579..7e692efe0fade991169c0d40437d7adb739d0acb 100644 (file)
@@ -305,6 +305,10 @@ namespace VISU
     virtual
     void 
     DoHook();
+
+    virtual
+    const char*
+    GetIconName() = 0;
   };
 
 }
index 5115bbb82c6b382a078365279dd5969254e62c79..1e84dc02a15201348948a0ab39b95b210ffca5c9 100644 (file)
@@ -309,6 +309,16 @@ void VISU::CutLines_i::DoHook(){
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::CutLines_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_CUT_LINES";
+  else
+    return "ICON_TREE_CUT_LINES_GROUPS";
+}
+
 VISU_Actor* 
 VISU::CutLines_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
index 2c56f04434c0f2e6c8984e1e80c502648eaafa5f..41a3b39d7b05a472939680c7ee5afcd8568efb58 100644 (file)
@@ -101,6 +101,8 @@ namespace VISU{
   protected:
     virtual void DoHook();
 
+    virtual const char* GetIconName();
+
     VISU_CutLinesPL *myCutLinesPL;
     TCurvesInv myMapCurvesInverted;
 
index 21afcb427bc28f6f36a8c8a043a3fd1bf60fe882..300957a4af4078151c6c5a8e688ea9421af44737 100644 (file)
@@ -187,6 +187,16 @@ void VISU::CutPlanes_i::DoHook(){
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::CutPlanes_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_CUT_PLANES";
+  else
+    return "ICON_TREE_CUT_PLANES_GROUPS";
+}
+
 VISU_Actor* 
 VISU::CutPlanes_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
index e4a86664328a1714fff572cefbd6dda3a5345186..fb14934318cddcf19ca29e9e313dea37214996d7 100644 (file)
@@ -77,6 +77,8 @@ namespace VISU{
   protected:
     virtual void DoHook();
 
+    virtual const char* GetIconName();
+
     VISU_CutPlanesPL *myCutPlanesPL;
 
   public:
index ec2a17501679545d97dd7441bbe09a060398ca1a..eea7502853829d3e4c6c65aa5c0b671b2220112a 100644 (file)
@@ -164,6 +164,17 @@ void VISU::DeformedShape_i::DoHook(){
 }
 
 
+const char*
+VISU::DeformedShape_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_DEFORMED_SHAPE";
+  else
+    return "ICON_TREE_DEFORMED_SHAPE_GROUPS";
+}  
+
+
 void VISU::DeformedShape_i::SetMapScale(double theMapScale){
   myDeformedShapePL->SetMapScale(theMapScale);
 }
index 5cbaee013fe514653cc1c1252a1cb20867eae797..0e8586e67d567c8e87dcddfb3a99ece706d4496a 100644 (file)
@@ -67,6 +67,8 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+    
+    virtual const char* GetIconName();
 
     VISU_DeformedShapePL *myDeformedShapePL;
     SALOMEDS::Color myColor;
index c80ef747ece03d9b3c8fef45cbbfa4464102fc05..5b613f6f7fe26893087e8c6415ee56ef41280855 100644 (file)
@@ -255,6 +255,10 @@ namespace VISU
     void
     DoHook();
 
+    virtual 
+    const char* 
+    GetIconName() {return "ICON_TREE_GAUSS_POINTS";}
+
     virtual 
     VISU_PipeLine* 
     GetPipeLine();
index 9b7cf0bfd39dd276b2ccd45721e871ec563b79c6..03559ba3e75ea02604117a7e9b34e7375dd6abd0 100644 (file)
@@ -140,6 +140,15 @@ void VISU::IsoSurfaces_i::DoHook(){
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::IsoSurfaces_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_ISO_SURFACES";
+  else
+    return "ICON_TREE_ISO_SURFACES_GROUPS";
+}
 
 VISU_Actor* 
 VISU::IsoSurfaces_i
index a71601d64e3222b07ce515cf4af7934d0171d9f8..96b87ddd9d2ba5ddc8013e4acd45f7e93069bf46 100644 (file)
@@ -64,6 +64,8 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+    virtual const char* GetIconName();
+
     VISU_IsoSurfacesPL* myIsoSurfacesPL;
 
   public:
index ababd5074ccc8c94689164a913db0acd42ab994b..c10839bfbf4ac41bb81cd5afb9d123b6043e4b28 100644 (file)
@@ -96,6 +96,10 @@ void VISU::Mesh_i::RemoveFromStudy()
     }
   };
 
+  // Unset icon
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+  aStudyBuilder->RemoveAttribute(GetSObject(), "AttributePixMap");
+  
   ProcessVoidEvent(new TRemoveFromStudy(this));
 }
 
@@ -294,6 +298,15 @@ VISU::Storable* VISU::Mesh_i::Build (int theRestoring)
       CORBA::String_var aString = GetID();
       anIOR->SetValue(aString);
     }
+
+    // Set icon
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::AttributePixMap_var  aPixmap;
+    
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap->SetPixMap("ICON_TREE_MESH");
+
   }catch(std::exception& exc){
     INFOS("Follow exception was occured :\n"<<exc.what());
     return NULL;
index fbd7b5d3f8b78a2d7aa997a9c958d27c3b2d7e0e..396b3c97679fbb82a6683187b3eab64c9cb00b9f 100644 (file)
@@ -188,6 +188,16 @@ void VISU::Plot3D_i::DoHook()
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::Plot3D_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_PLOT_3D";
+  else
+    return "ICON_TREE_PLOT_3D_GROUPS";
+}
+
 VISU_Actor* 
 VISU::Plot3D_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
index 066a05f22f7663f2525d0c17efe99d50b74e1df3..b5fceca313c49b5320c1cc9f3a52edc06786d470 100644 (file)
@@ -75,6 +75,8 @@ namespace VISU {
   protected:
     virtual void DoHook();
 
+    virtual const char* GetIconName();
+
     VISU_Plot3DPL *myPlot3DPL;
 
   public:
index 3c40a3f2e928ed45fc8f4cb793ca7f8b8111ddb7..554c7ca57b945cc4094cbe90452a65f4e07af228 100644 (file)
 #include "VISU_ScalarMap_i.hh"
 #include "SUIT_ResourceMgr.h"
 
+#include "SUIT_Session.h"
+#include "SALOME_Event.hxx"
+#include "SalomeApp_Study.h"
+#include "SalomeApp_Application.h"
+
 #include <vtkUnstructuredGrid.h>
 #include <vtkCellType.h>
 #include <vtkProperty.h>
@@ -191,6 +196,8 @@ void VISU::PrsMerger_i::RemoveAllGeom()
 {
   clearMeshList();
   myPrsMergerPL->RemoveAllGeom();
+
+  UpdateIcon();
 }
 
 
@@ -256,6 +263,8 @@ SetMeshOnGroup(const char* theMeshName,
   }
   else
     aTmpMesh->Delete();
+
+  UpdateIcon();
 }
 
 CORBA::Long
@@ -284,6 +293,8 @@ AddMeshOnGroup(const char* theMeshName,
   
   if (MYDEBUG) MESSAGE("AddMeshOnGroup nbGeoms after  ="<<myPrsMergerPL->GetNbGeometry());
 
+  UpdateIcon();
+
   return aRetVal;
 }
 
@@ -405,6 +416,52 @@ VISU::PrsMerger_i
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::PrsMerger_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_SCALAR_MAP";
+  else
+    return "ICON_TREE_SCALAR_MAP_GROUPS";
+}
+
+void VISU::PrsMerger_i
+::UpdateIcon()
+{
+  if (mySObject->_is_nil())
+    return;
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+
+  // Check if the icon needs to be updated, update if necessary
+  SALOMEDS::GenericAttribute_var anAttr;
+  SALOMEDS::AttributePixMap_var  aPixmap;
+
+  anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+  aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+
+  if ( aPixmap->GetPixMap() != (std::string)GetIconName() )
+    aPixmap->SetPixMap(GetIconName());
+
+  // Update Object Browser
+  SUIT_Session* aSession = SUIT_Session::session();
+  QPtrList<SUIT_Application> anApplications = aSession->applications();
+  QPtrListIterator<SUIT_Application> anIter (anApplications);
+  while (SUIT_Application* aSApp = anIter.current()) {
+    SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp);
+    if (!anApp) return;
+    SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy());
+    if (!aStudy) return;
+    if (_PTR(Study) aCStudy = aStudy->studyDS()) {
+      if (myStudy->StudyId() == aCStudy->StudyId()) {
+       anApp->updateObjectBrowser();
+       break;
+      }
+    }
+  }
+}
+
 CORBA::Long
 VISU::PrsMerger_i
 ::GetNumberOfGeom()
@@ -481,3 +538,4 @@ VISU::PrsMerger_i
   if (MYDEBUG) MESSAGE("return="<<!aAllPoints);
   return (!aAllPoints);
 }
+
index 861e4b34b8ba3d95bc99cb3450079de61086e21c..986d102815c3a85c4d9d86492365d3f7a62ae1d2 100644 (file)
@@ -77,6 +77,8 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+    virtual const char* GetIconName();
+    void UpdateIcon();
     void clearMeshList();
     
     VISU_PrsMergerPL* myPrsMergerPL;
index 77871bc129df7a6a02d017bb51c19b3b1764b9ea..c8b5beeefb14a3f391ea045a9af6782b3146c94b 100644 (file)
@@ -1039,11 +1039,22 @@ VISU::Result_i
     theIsAtOnce = true;
 
   if(Build(SALOMEDS::SObject::_nil(),theIsAtOnce)){
+    
+    // Set icon
+    SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
+
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::AttributePixMap_var  aPixmap;
+    
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObject, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap ->SetPixMap("ICON_TREE_RESULT");
+
     if(theIsBuildAll)
       return BuildAll();
     return true;
   }
-
+  
   return false;
 }
 
index 12a430e1c48b07dae81783d97d0d0db2a9c4268c..244879cc35d7442380e240e3468d178f57dfe08b 100644 (file)
@@ -226,6 +226,16 @@ void VISU::ScalarMapOnDeformedShape_i::DoHook()
   TSuperClass::DoHook();
 }
 
+const char*
+VISU::ScalarMapOnDeformedShape_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE";
+  else
+    return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS";
+}
+
 VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
   if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::CreateActor:"<<__LINE__<<endl;
index 4f47b250a0651e2cc92e3825e8e8769db6510c29..7914398b19491e2b89a56316ece615e5f375974d 100644 (file)
@@ -89,6 +89,10 @@ namespace VISU{
     void
     DoHook();
 
+    virtual 
+    const char* 
+    GetIconName();
+
     VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;
     SALOMEDS::Color myColor;
     bool myIsColored;
index d7be64f835c1ff69dfb6f6db5b767d8b3802a55e..ba959d3ae53c7480e6bc2a450afe214fdc7fdc11 100644 (file)
@@ -262,6 +262,15 @@ void VISU::StreamLines_i::DoHook(){
   DeformedShape_i::DoHook();
 }
 
+const char*
+VISU::StreamLines_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_STREAM_LINES";
+  else
+    return "ICON_TREE_STREAM_LINES_GROUPS";
+}
 
 void VISU::StreamLines_i::Update() {
   SetSource();
index 9c4af6fe53abb771eaa323ae7562a9e947a19e49..f02c591f953cf2a1260dd27043ff508c9a9ba5be 100644 (file)
@@ -72,6 +72,9 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+
+    virtual const char* GetIconName();
+    
     virtual void SetSource(VISU::Prs3d_ptr thePrs3d);
     virtual void SetSource(VISU::Prs3d_i* thePrs3d);
     virtual void SetSource();
index 899595bda3c5473d5c510c8e3310638210c74c9a..89f0576db23ff4ca1e40d44ac3bb1acaf9f661b4 100644 (file)
@@ -212,7 +212,15 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
        // mpv (PAL5357): reference attributes are unnecessary now
        //SALOMEDS::SObject_var refSO = Builder->NewObject( mySObj );
        //Builder->Addreference( refSO, SO );
-      }
+    }
+
+    // Set icon
+    SALOMEDS::AttributePixMap_var  aPixmap;
+
+    anAttr  = Builder->FindOrCreateAttribute( mySObj, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap->SetPixMap("ICON_TREE_TABLE");
+
     return this;
   }
   return NULL;
@@ -385,6 +393,16 @@ VISU::Storable* VISU::Curve_i::Build(int theRestoring )
                                          true );
        // create SObject referenced to real table object
        mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID(anEntry.c_str()));
+
+       // Set icon
+       SALOMEDS::StudyBuilder_var aStudyBuilder =  myStudy->NewBuilder();
+
+       SALOMEDS::GenericAttribute_var anAttr;
+       SALOMEDS::AttributePixMap_var  aPixmap;
+    
+       anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObj, "AttributePixMap" );
+       aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+       aPixmap ->SetPixMap("ICON_TREE_CURVE");
       }
       return this;
     }
@@ -897,6 +915,16 @@ VISU::Storable* VISU::Container_i::Build( int theRestoring )
                                       aComment.latin1(),
                                       true );
     mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID(anEntry.c_str()));
+
+    // Set icon
+    SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+
+    SALOMEDS::GenericAttribute_var anAttr;
+    SALOMEDS::AttributePixMap_var  aPixmap;
+    
+    anAttr  = aStudyBuilder->FindOrCreateAttribute( mySObj, "AttributePixMap" );
+    aPixmap = SALOMEDS::AttributePixMap::_narrow( anAttr );
+    aPixmap ->SetPixMap("ICON_TREE_CONTAINER");
   }
   return this;
 }
index 99fc94dd7af36bec1c16dc4e97a8f66c00a6a07e..e4408f5e4d1b4b78f986fb84fcd90376af578e1b 100644 (file)
@@ -180,6 +180,17 @@ void VISU::Vectors_i::DoHook(){
 }
 
 
+const char*
+VISU::Vectors_i
+::GetIconName()
+{
+  if (!GetNumberOfGeom())
+    return "ICON_TREE_VECTORS";
+  else
+    return "ICON_TREE_VECTORS_GROUPS";
+}
+
+
 VISU_PipeLine* VISU::Vectors_i::GetPipeLine(){
   VISU_PipeLine* aPipeLine = VISU_VectorsPL::New();
   aPipeLine->SetIDMapper(myPipeLine->GetIDMapper());
index 9177228d0792272e73a7ecdef1825e39d6a3b8be..873820df610349384c12f0970ee584f1f47ee2c2 100644 (file)
@@ -67,6 +67,9 @@ namespace VISU{
 
   protected:
     virtual void DoHook();
+
+    virtual const char* GetIconName();
+    
     virtual VISU_PipeLine* GetPipeLine();
 
     VISU_VectorsPL *myVectorsPL;