Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SVTK_View Class Reference

This class is introduced just for compatibility with old code. More...

#include <SVTK_View.h>

Inheritance diagram for SVTK_View:
Inheritance graph

Public Member Functions

 SVTK_View (SVTK_ViewWindow *theMainWindow)
 
virtual ~SVTK_View ()
 
void highlight (const Handle(SALOME_InteractiveObject)&IObject, bool highlight, bool immediatly=true)
 To highlight a VTK presentation with the same SALOME_InteractiveObject. More...
 
void unHighlightAll ()
 To unhighlight all VTK presentations. More...
 
 Handle (SALOME_InteractiveObject) FindIObject(const char *Entry)
 Try to find a SALOME_InteractiveObject in the view that corresponds to the entry. More...
 
bool isInViewer (const Handle(SALOME_InteractiveObject)&IObject)
 Check, if the viewer contains a presentatin with defined SALOME_InteractiveObject. More...
 
bool isVisible (const Handle(SALOME_InteractiveObject)&IObject)
 Check, if a presentatin with defined SALOME_InteractiveObject is visible. More...
 
void rename (const Handle(SALOME_InteractiveObject)&IObject, const QString &newName)
 
int GetDisplayMode ()
 Get current display mode (obsolete) More...
 
void SetDisplayMode (int)
 Set current display mode. More...
 
void SetDisplayMode (const Handle(SALOME_InteractiveObject)&IObject, int theMode)
 Switch representation wireframe/shading. More...
 
void ChangeRepresentationToWireframe ()
 Change all actors to wireframe. More...
 
void ChangeRepresentationToSurface ()
 Change all actors to surface. More...
 
void ChangeRepresentationToSurfaceWithEdges ()
 Change all actors to surface with edges. More...
 
void ChangeRepresentationToWireframe (vtkActorCollection *theListofActors)
 Change to wireframe a list of vtkactor. More...
 
void ChangeRepresentationToSurface (vtkActorCollection *theListofActors)
 Change to surface a list of vtkactor. More...
 
void ChangeRepresentationToSurfaceWithEdges (vtkActorCollection *theListofActors)
 Change to surface with edges a list of vtkactor. More...
 
void SetTransparency (const Handle(SALOME_InteractiveObject)&theIObject, float trans)
 Change transparency. More...
 
float GetTransparency (const Handle(SALOME_InteractiveObject)&theIObject)
 Get current transparency. More...
 
void SetColor (const Handle(SALOME_InteractiveObject)&theIObject, const QColor &theColor)
 Change color. More...
 
QColor GetColor (const Handle(SALOME_InteractiveObject)&theIObject)
 Get current color. More...
 
void SetMaterial (const Handle(SALOME_InteractiveObject)&theIObject, vtkProperty *thePropF, vtkProperty *thePropB)
 Change material. More...
 
vtkProperty * GetFrontMaterial (const Handle(SALOME_InteractiveObject)&theIObject)
 Get current front material. More...
 
vtkProperty * GetBackMaterial (const Handle(SALOME_InteractiveObject)&theIObject)
 Get current back material. More...
 
void EraseAll ()
 To erase all existing VTK presentations. More...
 
void DisplayAll ()
 To display all existing VTK presentations. More...
 
void RemoveAll (const bool immediatly)
 To remove from the view all existing VTK presentations. More...
 
void Erase (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true)
 To erase VTK presentation with defined SALOME_InteractiveObject. More...
 
void Remove (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true)
 
void Display (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true)
 To display VTK presentation with defined SALOME_InteractiveObject. More...
 
void DisplayOnly (const Handle(SALOME_InteractiveObject)&IObject)
 To display VTK presentation with defined SALOME_InteractiveObject and erase all anothers. More...
 
void Display (SALOME_Actor *SActor, bool immediatly=true)
 To display the VTK presentation. More...
 
void Erase (SALOME_Actor *SActor, bool immediatly=true)
 To erase the VTK presentation. More...
 
void Remove (SALOME_Actor *SActor, bool updateViewer=true)
 To remove the VTK presentation. More...
 
void GetVisible (SALOME_ListIO &theList)
 Collect objects visible in viewer. More...
 
void SetSelectionProp (const double &theRed=1, const double &theGreen=1, const double &theBlue=0, const int &theWidth=5)
 Redirect the request to SVTK_Renderer::SetPreselectionProp. More...
 
void SetPreselectionProp (const double &theRed=0, const double &theGreen=1, const double &theBlue=1, const int &theWidth=5)
 Redirect the request to SVTK_Renderer::SetPreselectionProp. More...
 
void SetSelectionTolerance (const double &theTolNodes=0.025, const double &theTolCell=0.001, const double &theTolObjects=0.025)
 Redirect the request to SVTK_Renderer::SetPreselectionProp. More...
 
- Public Member Functions inherited from SVTK_SignalHandler
 SVTK_SignalHandler (SVTK_ViewWindow *theMainWindow)
 
virtual ~SVTK_SignalHandler ()
 
SVTK_ViewWindowGetMainWindow ()
 Get reference to its SVTK_ViewWindow. More...
 
void Repaint (bool theUpdateTrihedron=true)
 Redirect the request to SVTK_ViewWindow::Repaint (just for flexibility) More...
 
SVTK_RendererGetRenderer ()
 Redirect the request to SVTK_ViewWindow::GetRenderer (just for flexibility) More...
 
vtkRenderer * getRenderer ()
 Redirect the request to SVTK_ViewWindow::getRenderer (just for flexibility) More...
 

Protected Attributes

int myDisplayMode
 
- Protected Attributes inherited from SVTK_SignalHandler
SVTK_ViewWindowmyMainWindow
 

Additional Inherited Members

- Public Slots inherited from SVTK_SignalHandler
void onSelectionChanged ()
 
- Signals inherited from SVTK_SignalHandler
void MouseMove (QMouseEvent *)
 
void MouseButtonPressed (QMouseEvent *)
 
void MouseButtonReleased (QMouseEvent *)
 
void MouseDoubleClicked (QMouseEvent *)
 
void ButtonPressed (const QMouseEvent *event)
 
void ButtonReleased (const QMouseEvent *event)
 
void WheelMoved (QWheelEvent *)
 
void KeyPressed (QKeyEvent *)
 
void KeyReleased (QKeyEvent *)
 
void contextMenuRequested (QContextMenuEvent *e)
 
void selectionChanged ()
 

Detailed Description

This class contains frequantly used functionality in old code. Now, you are supposed to extend existing functionality through writing corresponding functors (see SVTK_Functor.h for example).

Constructor & Destructor Documentation

SVTK_View::SVTK_View ( SVTK_ViewWindow theMainWindow)

Constructor

SVTK_View::~SVTK_View ( )
virtual

Destructor

Member Function Documentation

void SVTK_View::ChangeRepresentationToSurface ( )

Change all actors to shading

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::ChangeRepresentationToSurface ( vtkActorCollection *  theCollection)

Change to shading a list of vtkactor theCollection - list of vtkactor

References VTKViewer_Actor::setDisplayMode().

void SVTK_View::ChangeRepresentationToSurfaceWithEdges ( )

Change all actors to shading with edges

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::ChangeRepresentationToSurfaceWithEdges ( vtkActorCollection *  theCollection)

Change to shading with edges a list of vtkactor theCollection - list of vtkactor

References VTKViewer_Actor::setDisplayMode().

void SVTK_View::ChangeRepresentationToWireframe ( )

Change all actors to wireframe

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::ChangeRepresentationToWireframe ( vtkActorCollection *  theCollection)

Change to wireframe a list of vtkactor theCollection - list of vtkactor

References VTKViewer_Actor::setDisplayMode().

void SVTK_View::Display ( const Handle(SALOME_InteractiveObject)&  theIObject,
bool  theIsUpdate = true 
)

To display the VTK presentation

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::Display ( SALOME_Actor theActor,
bool  theIsUpdate = true 
)

To display the VTK presentation

References SALOME_Actor::SetVisibility().

void SVTK_View::DisplayAll ( )

To display all existing VTK presentations

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::DisplayOnly ( const Handle(SALOME_InteractiveObject)&  theIObject)

To display VTK presentation with defined SALOME_InteractiveObject and erase all others

void SVTK_View::Erase ( const Handle(SALOME_InteractiveObject)&  theIObject,
bool  theIsUpdate = true 
)

To erase VTK presentation

Parameters
theIObject- object
theIsUpdate- updates current viewer

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::Erase ( SALOME_Actor theActor,
bool  theIsUpdate = true 
)

To erase VTK presentation

Parameters
theActor- actor
theIsUpdate- updates current viewer
void SVTK_View::EraseAll ( )

To erase all existing VTK presentations

References VTK::ActorCollectionCopy::GetActors().

vtkProperty * SVTK_View::GetBackMaterial ( const Handle(SALOME_InteractiveObject)&  theIObject)

Get current back material

Parameters
theIObject- object
Returns
property contained back material properties of the given object

References VTK::ActorCollectionCopy::GetActors().

QColor SVTK_View::GetColor ( const Handle(SALOME_InteractiveObject)&  theIObject)
Returns
object color
Parameters
theIObject- object

References VTK::ActorCollectionCopy::GetActors().

int SVTK_View::GetDisplayMode ( )
Returns
current display mode (obsolete)
vtkProperty * SVTK_View::GetFrontMaterial ( const Handle(SALOME_InteractiveObject)&  theIObject)

Get current front material

Parameters
theIObject- object
Returns
property contained front material properties of the given object

References VTK::ActorCollectionCopy::GetActors().

float SVTK_View::GetTransparency ( const Handle(SALOME_InteractiveObject)&  theIObject)
Returns
current transparency
Parameters
theIObject- object

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::GetVisible ( SALOME_ListIO theList)

objects visible in viewer

Parameters
theList- visible objects collection

References VTK::ActorCollectionCopy::GetActors(), and SVTK_SignalHandler::getRenderer().

SVTK_View::Handle ( SALOME_InteractiveObject  ) const
void SVTK_View::highlight ( const Handle(SALOME_InteractiveObject)&  theIO,
bool  theIsHighlight,
bool  theIsUpdate = true 
)

Hilights/unhilights object in viewer

Parameters
theIO- object to be updated
theIsHighlight- if it is true, object will be hilighted, otherwise it will be unhilighted
theIsUpdate- update current viewer

References VTK::ActorCollectionCopy::GetActors().

bool SVTK_View::isInViewer ( const Handle(SALOME_InteractiveObject)&  theIObject)
Returns
true if object is in viewer or in collector
Parameters
theIO- object to be checked

References VTK::ActorCollectionCopy::GetActors().

bool SVTK_View::isVisible ( const Handle(SALOME_InteractiveObject)&  theIObject)
Returns
true if object is displayed in viewer
Parameters
theIO- object to be checked

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::Remove ( const Handle(SALOME_InteractiveObject)&  theIObject,
bool  theIsUpdate = true 
)

To remove the VTK presentation

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::Remove ( SALOME_Actor theActor,
bool  theIsUpdate = true 
)

To remove the VTK presentation

void SVTK_View::RemoveAll ( const bool  immediatly)

To remove all VTK presentations

References VTK::ActorCollectionCopy::GetActors().

void SVTK_View::rename ( const Handle(SALOME_InteractiveObject)&  theIObject,
const QString &  theName 
)

Changes name of object

Parameters
theIObject- object to be renamed
theName- new name

References VTK::ActorCollectionCopy::GetActors(), and SALOME_Actor::setName().

void SVTK_View::SetColor ( const Handle(SALOME_InteractiveObject)&  theIObject,
const QColor &  theColor 
)

Change color

Parameters
theIObject- object
theColor- new color

References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::SetColor().

void SVTK_View::SetDisplayMode ( int  theMode)

Set current display mode

Parameters
theMode- new display mode
void SVTK_View::SetDisplayMode ( const Handle(SALOME_InteractiveObject)&  theIObject,
int  theMode 
)

Set current display mode

Parameters
theIObject- object
theMode- new display mode

References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::setDisplayMode().

void SVTK_View::SetMaterial ( const Handle(SALOME_InteractiveObject)&  theIObject,
vtkProperty *  thePropF,
vtkProperty *  thePropB 
)

Change material

Parameters
theIObject- object
thePropF- property contained new properties of front material
thePropB- property contained new properties of back material

References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::SetMaterial().

void SVTK_View::SetPreselectionProp ( const double &  theRed = 0,
const double &  theGreen = 1,
const double &  theBlue = 1,
const int &  theWidth = 5 
)

Redirect the request to SVTK_Renderer::SetPreselectionProp

void SVTK_View::SetSelectionProp ( const double &  theRed = 1,
const double &  theGreen = 1,
const double &  theBlue = 0,
const int &  theWidth = 5 
)

Redirect the request to SVTK_Renderer::SetPreselectionProp

void SVTK_View::SetSelectionTolerance ( const double &  theTolNodes = 0.025,
const double &  theTolCell = 0.001,
const double &  theTolObjects = 0.025 
)

Redirect the request to SVTK_Renderer::SetPreselectionProp

void SVTK_View::SetTransparency ( const Handle(SALOME_InteractiveObject)&  theIObject,
float  theTrans 
)

Sets current transparency

Parameters
theIObject- object
theTrans- new transparency

References VTK::ActorCollectionCopy::GetActors(), and VTKViewer_Actor::SetOpacity().

void SVTK_View::unHighlightAll ( )

Unhilights all objects in viewer

References VTK::ActorCollectionCopy::GetActors().

Member Data Documentation

int SVTK_View::myDisplayMode
protected

The documentation for this class was generated from the following files: