msgstr "Visu_isosurfaces.png"
msgid "ICON_CUT_PLANES"
-msgstr "Visu_cutplane.png"
+msgstr "Visu_cutplanes.png"
msgid "ICON_CUT_LINES"
msgstr "Visu_cutlines.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"
}
}
+ SalomeApp_Module* aModule = (SalomeApp_Module*)theModule;
+ UpdateObjBrowser(aModule, false, aResultSObj);
+
theModule->application()->putInfo(QObject::tr("INF_DONE"));
// Make "Save" button active
theModule->getApp()->updateActions();
}
//----------------------------------------------------------------------------
+
+
VISU::Storable*
VISU::ColoredPrs3d_i
::Build(int theRestoring)
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){
virtual
void
DoHook();
+
+ virtual
+ const char*
+ GetIconName() = 0;
};
}
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)
protected:
virtual void DoHook();
+ virtual const char* GetIconName();
+
VISU_CutLinesPL *myCutLinesPL;
TCurvesInv myMapCurvesInverted;
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)
protected:
virtual void DoHook();
+ virtual const char* GetIconName();
+
VISU_CutPlanesPL *myCutPlanesPL;
public:
}
+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);
}
protected:
virtual void DoHook();
+
+ virtual const char* GetIconName();
VISU_DeformedShapePL *myDeformedShapePL;
SALOMEDS::Color myColor;
void
DoHook();
+ virtual
+ const char*
+ GetIconName() {return "ICON_TREE_GAUSS_POINTS";}
+
virtual
VISU_PipeLine*
GetPipeLine();
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
protected:
virtual void DoHook();
+ virtual const char* GetIconName();
+
VISU_IsoSurfacesPL* myIsoSurfacesPL;
public:
}
};
+ // Unset icon
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myStudy->NewBuilder();
+ aStudyBuilder->RemoveAttribute(GetSObject(), "AttributePixMap");
+
ProcessVoidEvent(new TRemoveFromStudy(this));
}
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;
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)
protected:
virtual void DoHook();
+ virtual const char* GetIconName();
+
VISU_Plot3DPL *myPlot3DPL;
public:
#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>
{
clearMeshList();
myPrsMergerPL->RemoveAllGeom();
+
+ UpdateIcon();
}
}
else
aTmpMesh->Delete();
+
+ UpdateIcon();
}
CORBA::Long
if (MYDEBUG) MESSAGE("AddMeshOnGroup nbGeoms after ="<<myPrsMergerPL->GetNbGeometry());
+ UpdateIcon();
+
return aRetVal;
}
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()
if (MYDEBUG) MESSAGE("return="<<!aAllPoints);
return (!aAllPoints);
}
+
protected:
virtual void DoHook();
+ virtual const char* GetIconName();
+ void UpdateIcon();
void clearMeshList();
VISU_PrsMergerPL* myPrsMergerPL;
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;
}
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;
void
DoHook();
+ virtual
+ const char*
+ GetIconName();
+
VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;
SALOMEDS::Color myColor;
bool myIsColored;
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();
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();
// 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;
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;
}
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;
}
}
+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());
protected:
virtual void DoHook();
+
+ virtual const char* GetIconName();
+
virtual VISU_PipeLine* GetPipeLine();
VISU_VectorsPL *myVectorsPL;