Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

GEOM_Displayer Class Reference

#include <GEOM_Displayer.h>

Inheritance diagram for GEOM_Displayer:
Inheritance graph

Public Member Functions

 GEOM_Displayer (SalomeApp_Study *app)
virtual ~GEOM_Displayer ()
virtual bool canBeDisplayed (const QString &, const QString &) const
void Display (const Handle(SALOME_InteractiveObject)&theIO, const bool updateViewer=true, SALOME_View *theViewFrame=0)
void Display (GEOM::GEOM_Object_ptr theObj, const bool updateViewer=true)
void Redisplay (const Handle(SALOME_InteractiveObject)&theIO, const bool updateViewer=true)
void Erase (const Handle(SALOME_InteractiveObject)&theIO, const bool forced=false, const bool updateViewer=true, SALOME_View *theViewFrame=0)
void Erase (GEOM::GEOM_Object_ptr theObj, const bool forced=false, const bool updateViewer=true)
void EraseWithChildren (const Handle(SALOME_InteractiveObject)&theIO, const bool eraseOnlyChildren=false)
void Display (const SALOME_ListIO &theIOList, const bool updateViewer=true)
void Erase (const SALOME_ListIO &theIOList, const bool forced=false, const bool updateViewer=true)
void Redisplay (const SALOME_ListIO &theIOList, const bool updateViewer=true)
SALOME_Prs * BuildPrs (GEOM::GEOM_Object_ptr)
SALOME_Prs * BuildPrs (const TopoDS_Shape &)
void SetColor (const int)
void UnsetColor ()
int GetColor () const
bool HasColor () const
void SetWidth (const double)
void UnsetWidth ()
double GetWidth () const
bool HasWidth () const
int SetDisplayMode (const int)
int GetDisplayMode () const
int UnsetDisplayMode ()
void SetName (const char *theName)
void UnsetName ()
virtual void Update (SALOME_OCCPrs *)
virtual void Update (SALOME_VTKPrs *)
virtual void BeforeDisplay (SALOME_View *, const SALOME_OCCPrs *)
virtual void AfterDisplay (SALOME_View *, const SALOME_OCCPrs *)
void SetToActivate (const bool)
bool ToActivate () const
void LocalSelection (const Handle(SALOME_InteractiveObject)&, const int)
void LocalSelection (const SALOME_ListIO &theIOList, const int)
void GlobalSelection (const int=GEOM_ALLOBJECTS, const bool=false)
void GlobalSelection (const TColStd_MapOfInteger &, const bool=false, const QList< int > *=0)
SalomeApp_Study * getStudy () const
virtual SALOME_Prs * buildSubshapePresentation (const TopoDS_Shape &aShape, const QString &, SALOME_View *=0)

Static Public Member Functions

static SALOMEDS::Color getUniqueColor (const QList< SALOMEDS::Color > &)
static PropMap getDefaultPropertyMap (const QString &viewer_type)
static bool MergePropertyMaps (PropMap &theOrigin, PropMap &theDefault)
static SALOMEDS::Color getColor (GEOM::GEOM_Object_var aGeomObject, bool &hasColor)
static int getMinMaxShapeType (const TopoDS_Shape &shape, bool ismin)
static bool isCompoundOfVertices (const TopoDS_Shape &theShape)

Protected Member Functions

virtual SALOME_Prs * buildPresentation (const QString &, SALOME_View *=0)
void setIO (const Handle(SALOME_InteractiveObject)&theIO)
void setShape (const TopoDS_Shape &theShape)
void internalReset ()
void clearTemporary (LightApp_SelectionMgr *theSelMgr)
SUIT_SelectionFiltergetFilter (const int theMode)
SUIT_SelectionFiltergetComplexFilter (const QList< int > *)
 Handle (SALOME_InteractiveObject) myIO

Protected Attributes

TopoDS_Shape myShape
std::string myName
int myType
SALOME_View * myViewFrame
Quantity_Color myShadingColor
int myColor
double myWidth
bool myToActivate
int myDisplayMode
Aspect_TypeOfMarker myTypeOfMarker
double myScaleOfMarker

Private Attributes

SalomeApp_Application * myApp

Constructor & Destructor Documentation

GEOM_Displayer::GEOM_Displayer ( SalomeApp_Study *  st)
GEOM_Displayer::~GEOM_Displayer ( ) [virtual]

Member Function Documentation

bool GEOM_Displayer::canBeDisplayed ( const QString &  entry,
const QString &  viewer_type 
) const [virtual]
void GEOM_Displayer::Display ( const Handle(SALOME_InteractiveObject)&  theIO,
const bool  updateViewer = true,
SALOME_View *  theViewFrame = 0 
)

GEOM_Displayer.Display Display interactive object in the current viewer

References buildPresentation(), getStudy(), getViewManagerId(), and VISIBILITY_PROP.

void GEOM_Displayer::Display ( GEOM::GEOM_Object_ptr  theObj,
const bool  updateViewer = true 
)

GEOM_Displayer.Display This overloaded Display() method can be useful for operations not using dialog boxes.

References Display(), getEntry(), and getName().

void GEOM_Displayer::Redisplay ( const Handle(SALOME_InteractiveObject)&  theIO,
const bool  updateViewer = true 
)

GEOM_Displayer.Redisplay Redisplay (erase and then display again) interactive object in the current viewer

References Display(), and Erase().

void GEOM_Displayer::Erase ( const Handle(SALOME_InteractiveObject)&  theIO,
const bool  forced = false,
const bool  updateViewer = true,
SALOME_View *  theViewFrame = 0 
)

GEOM_Displayer.Erase Erase interactive object in the current viewer

References getStudy(), getViewManagerId(), and VISIBILITY_PROP.

void GEOM_Displayer::Erase ( GEOM::GEOM_Object_ptr  theObj,
const bool  forced = false,
const bool  updateViewer = true 
)

GEOM_Displayer.Erase Erase geometry object in the current viewer

References Erase(), getEntry(), and getName().

void GEOM_Displayer::EraseWithChildren ( const Handle(SALOME_InteractiveObject)&  theIO,
const bool  eraseOnlyChildren = false 
)

References Erase(), and Handle().

void GEOM_Displayer::Display ( const SALOME_ListIO &  theIOList,
const bool  updateViewer = true 
)

GEOM_Displayer.Display Calls Display() method for each object in the given list

References Display().

void GEOM_Displayer::Erase ( const SALOME_ListIO &  theIOList,
const bool  forced = false,
const bool  updateViewer = true 
)

GEOM_Displayer.Erase Calls Erase() method for each object in the given list

References Erase().

void GEOM_Displayer::Redisplay ( const SALOME_ListIO &  theIOList,
const bool  updateViewer = true 
)

GEOM_Displayer.Redisplay Calls Redisplay() method for each object in the given list

References Redisplay().

SALOME_Prs * GEOM_Displayer::BuildPrs ( GEOM::GEOM_Object_ptr  theObj)

GEOM_Displayer.BuildPrs Build presentation accordint to the current viewer type

References GEOM_Client.get_client(), GeometryGUI.GetGeomGen(), internalReset(), myType, myViewFrame, and setShape().

SALOME_Prs * GEOM_Displayer::BuildPrs ( const TopoDS_Shape &  theShape)

GEOM_Displayer.BuildPrs Build presentation accordint to the current viewer type

References internalReset(), myType, myViewFrame, and setShape().

void GEOM_Displayer::SetColor ( const int  color)

GEOM_Displayer.SetColor Set color for shape displaying. If it is equal -1 then default color is used. Available values are from Quantity_NameOfColor enumeration

References myColor, myShadingColor, and UnsetColor().

void GEOM_Displayer::UnsetColor ( )

References myColor, and myShadingColor.

int GEOM_Displayer::GetColor ( ) const

References myColor.

bool GEOM_Displayer::HasColor ( ) const

References myColor.

void GEOM_Displayer::SetWidth ( const double  width)

GEOM_Displayer.SetWidth Set width of shape displaying. If it is equal -1 then default width is used.

References myWidth.

void GEOM_Displayer::UnsetWidth ( )

References myWidth.

double GEOM_Displayer::GetWidth ( ) const

References myWidth.

bool GEOM_Displayer::HasWidth ( ) const

References myWidth.

int GEOM_Displayer::SetDisplayMode ( const int  theMode)

References myDisplayMode.

int GEOM_Displayer::GetDisplayMode ( ) const

References myDisplayMode.

int GEOM_Displayer::UnsetDisplayMode ( )

References myDisplayMode.

void GEOM_Displayer::SetName ( const char *  theName)

References myName.

void GEOM_Displayer::UnsetName ( )

References myName.

void GEOM_Displayer::Update ( SALOME_OCCPrs *  prs) [virtual]
void GEOM_Displayer::Update ( SALOME_VTKPrs *  prs) [virtual]
void GEOM_Displayer::BeforeDisplay ( SALOME_View *  v,
const SALOME_OCCPrs *   
) [virtual]

GEOM_Displayer.BeforeDisplay Called before displaying of pars. Close local context [ Reimplemented from SALOME_Displayer ]

References Handle().

void GEOM_Displayer::AfterDisplay ( SALOME_View *  v,
const SALOME_OCCPrs *  p 
) [virtual]
void GEOM_Displayer::SetToActivate ( const bool  toActivate)

GEOM_Displayer.SetToActivate This method is used for activisation/deactivisation of objects to be displayed

References myToActivate.

bool GEOM_Displayer::ToActivate ( ) const

References myToActivate.

void GEOM_Displayer::LocalSelection ( const Handle(SALOME_InteractiveObject)&  theIO,
const int  theMode 
)

GEOM_Displayer.LocalSelection Activate selection of CAD shapes with activisation of selection of their sub-shapes (with opened local context for OCC viewer)

References Display().

void GEOM_Displayer::LocalSelection ( const SALOME_ListIO &  theIOList,
const int  theMode 
)

GEOM_Displayer.LocalSelection Activate selection of CAD shapes with activisation of selection of their sub-shapes (with opened local context for OCC viewer)

References LocalSelection().

void GEOM_Displayer::GlobalSelection ( const int  theMode = GEOM_ALLOBJECTS,
const bool  update = false 
)

GEOM_Displayer.globalSelection Activate selection of CAD shapes without activisation of selection of their sub-shapes (without opened local context for OCC viewer)

void GEOM_Displayer::GlobalSelection ( const TColStd_MapOfInteger &  theModes,
const bool  update = false,
const QList< int > *  theSubShapes = 0 
)

GEOM_Displayer.globalSelection Activate selection of CAD shapes without activisation of selection of their sub-shapes (without opened local context for OCC viewer)

References clearTemporary(), GEOM_ALLOBJECTS, GEOM_COMPOUNDFILTER, GEOM_PREVIEW, getComplexFilter(), getFilter(), Handle(), and GEOM_LogicalFilter.LO_OR.

SalomeApp_Study * GEOM_Displayer::getStudy ( ) const

References myApp.

SALOMEDS::Color GEOM_Displayer::getUniqueColor ( const QList< SALOMEDS::Color > &  theReservedColors) [static]
PropMap GEOM_Displayer::getDefaultPropertyMap ( const QString &  viewer_type) [static]
bool GEOM_Displayer::MergePropertyMaps ( PropMap &  theOrigin,
PropMap &  theDefault 
) [static]
SALOMEDS::Color GEOM_Displayer::getColor ( GEOM::GEOM_Object_var  aGeomObject,
bool &  hasColor 
) [static]
int GEOM_Displayer::getMinMaxShapeType ( const TopoDS_Shape &  shape,
bool  ismin 
) [static]
bool GEOM_Displayer::isCompoundOfVertices ( const TopoDS_Shape &  theShape) [static]

References getMinMaxShapeType().

SALOME_Prs * GEOM_Displayer::buildSubshapePresentation ( const TopoDS_Shape &  aShape,
const QString &  entry,
SALOME_View *  theViewFrame = 0 
) [virtual]

GEOM_Displayer.buildSubshapePresentation Builds/finds object's presentation for the current viewer Calls corresponding Update() method by means of double dispatch For not published objects (for Mantis issue 0020435)

References buildPresentation(), GEOM_SUBSHAPE, Handle(), internalReset(), myType, myViewFrame, setIO(), and setShape().

SALOME_Prs * GEOM_Displayer::buildPresentation ( const QString &  entry,
SALOME_View *  theViewFrame = 0 
) [protected, virtual]

GEOM_Displayer.buildPresentation Builds/finds object's presentation for the current viewer Calls corresponding Update() method by means of double dispatch [ internal ]

References GeometryGUI.ClientSObjectToObject(), GEOM_Client.get_client(), GeometryGUI.GetGeomGen(), Handle(), internalReset(), myType, myViewFrame, setIO(), and setShape().

void GEOM_Displayer::setIO ( const Handle(SALOME_InteractiveObject)&  theIO) [protected]
void GEOM_Displayer::setShape ( const TopoDS_Shape &  theShape) [protected]

References myShape.

void GEOM_Displayer::internalReset ( ) [protected]

GEOM_Displayer.internalReset Resets internal data [internal]

References myShape.

void GEOM_Displayer::clearTemporary ( LightApp_SelectionMgr *  theSelMgr) [protected]

GEOM_Displayer.clearTemporary Removes from selection temporary objects

References Handle().

SUIT_SelectionFilter * GEOM_Displayer::getFilter ( const int  theMode) [protected]
SUIT_SelectionFilter * GEOM_Displayer::getComplexFilter ( const QList< int > *  aSubShapes) [protected]
GEOM_Displayer.Handle ( SALOME_InteractiveObject  ) [protected]

Field Documentation

TopoDS_Shape GEOM_Displayer.myShape [protected]
std::string GEOM_Displayer.myName [protected]
int GEOM_Displayer.myType [protected]
SALOME_View* GEOM_Displayer.myViewFrame [protected]
Quantity_Color GEOM_Displayer.myShadingColor [protected]
int GEOM_Displayer.myColor [protected]
double GEOM_Displayer.myWidth [protected]
bool GEOM_Displayer.myToActivate [protected]
Aspect_TypeOfMarker GEOM_Displayer.myTypeOfMarker [protected]
double GEOM_Displayer.myScaleOfMarker [protected]
SalomeApp_Application* GEOM_Displayer.myApp [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS