Version: 6.3.1
Public Slots | Signals | Public Member Functions | Protected Attributes

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 Slots

void onSelectionChanged ()

Signals

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 ()

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.
void unHighlightAll ()
 To unhighlight all VTK presentations.
 Handle (SALOME_InteractiveObject) FindIObject(const char *Entry)
 Try to find a SALOME_InteractiveObject in the view that corresponds to the entry.
bool isInViewer (const Handle(SALOME_InteractiveObject)&IObject)
 Check, if the viewer contains a presentatin with defined SALOME_InteractiveObject.
bool isVisible (const Handle(SALOME_InteractiveObject)&IObject)
 Check, if a presentatin with defined SALOME_InteractiveObject is visible.
void rename (const Handle(SALOME_InteractiveObject)&IObject, const QString &newName)
int GetDisplayMode ()
 Get current display mode (obsolete)
void SetDisplayMode (int)
 Set current display mode.
void SetDisplayMode (const Handle(SALOME_InteractiveObject)&IObject, int theMode)
 Switch representation wireframe/shading.
void ChangeRepresentationToWireframe ()
 Change all actors to wireframe.
void ChangeRepresentationToSurface ()
 Change all actors to surface.
void ChangeRepresentationToWireframe (vtkActorCollection *theListofActors)
 Change to wireframe a list of vtkactor.
void ChangeRepresentationToSurface (vtkActorCollection *theListofActors)
 Change to surface a list of vtkactor.
void SetTransparency (const Handle(SALOME_InteractiveObject)&theIObject, float trans)
 Change transparency.
float GetTransparency (const Handle(SALOME_InteractiveObject)&theIObject)
 Get current transparency.
void SetColor (const Handle(SALOME_InteractiveObject)&theIObject, const QColor &theColor)
 Change color.
QColor GetColor (const Handle(SALOME_InteractiveObject)&theIObject)
 Get current color.
void EraseAll ()
 To erase all existing VTK presentations.
void DisplayAll ()
 To display all existing VTK presentations.
void RemoveAll (const bool immediatly)
 To remove from the view all existing VTK presentations.
void Erase (const Handle(SALOME_InteractiveObject)&IObject, bool immediatly=true)
 To erase VTK presentation with defined SALOME_InteractiveObject.
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.
void DisplayOnly (const Handle(SALOME_InteractiveObject)&IObject)
 To display VTK presentation with defined SALOME_InteractiveObject and erase all anothers.
void Display (SALOME_Actor *SActor, bool immediatly=true)
 To display the VTK presentation.
void Erase (SALOME_Actor *SActor, bool immediatly=true)
 To erase the VTK presentation.
void Remove (SALOME_Actor *SActor, bool updateViewer=true)
 To remove the VTK presentation.
void GetVisible (SALOME_ListIO &theList)
 Collect objects visible in viewer.
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.
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.
void SetSelectionTolerance (const double &theTolNodes=0.025, const double &theTolCell=0.001, const double &theTolObjects=0.025)
 Redirect the request to #SVTK_Renderer::SetPreselectionProp.
SVTK_ViewWindowGetMainWindow ()
 Get reference to its SVTK_ViewWindow.
void Repaint (bool theUpdateTrihedron=true)
 Redirect the request to #SVTK_ViewWindow::Repaint (just for flexibility)
SVTK_RendererGetRenderer ()
 Redirect the request to #SVTK_ViewWindow::GetRenderer (just for flexibility)
vtkRenderer * getRenderer ()
 Redirect the request to #SVTK_ViewWindow::getRenderer (just for flexibility)

Protected Attributes

int myDisplayMode
SVTK_ViewWindowmyMainWindow

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::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().

void SVTK_View::unHighlightAll ( )

Unhilights all objects in viewer

References VTK.ActorCollectionCopy.GetActors().

SVTK_View.Handle ( SALOME_InteractiveObject  ) const
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::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().

int SVTK_View::GetDisplayMode ( )
Returns:
current display mode (obsolete)
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::ChangeRepresentationToWireframe ( )

Change all actors to wireframe

References VTK.ActorCollectionCopy.GetActors().

void SVTK_View::ChangeRepresentationToSurface ( )

Change all actors to shading

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::ChangeRepresentationToSurface ( vtkActorCollection *  theCollection)

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

References VTKViewer_Actor.setDisplayMode().

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().

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

References VTK.ActorCollectionCopy.GetActors().

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().

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

References VTK.ActorCollectionCopy.GetActors().

void SVTK_View::EraseAll ( )

To erase all existing VTK presentations

References VTK.ActorCollectionCopy.GetActors().

void SVTK_View::DisplayAll ( )

To display all existing VTK presentations

References VTK.ActorCollectionCopy.GetActors().

void SVTK_View::RemoveAll ( const bool  immediatly)

To remove all VTK presentations

References VTK.ActorCollectionCopy.GetActors().

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::Remove ( const Handle(SALOME_InteractiveObject)&  theIObject,
bool  theIsUpdate = true 
)

To remove the VTK presentation

References VTK.ActorCollectionCopy.GetActors().

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

To display the VTK presentation

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::Display ( SALOME_Actor theActor,
bool  theIsUpdate = true 
)

To display the VTK presentation

References SALOME_Actor.SetVisibility().

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

To erase VTK presentation

Parameters:
theActor- actor
theIsUpdate- updates current viewer
void SVTK_View::Remove ( SALOME_Actor theActor,
bool  theIsUpdate = true 
)

To remove the VTK presentation

void SVTK_View::GetVisible ( SALOME_ListIO theList)

objects visible in viewer

Parameters:
theList- visible objects collection

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

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::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::SetSelectionTolerance ( const double &  theTolNodes = 0.025,
const double &  theTolCell = 0.001,
const double &  theTolObjects = 0.025 
)

Redirect the request to #SVTK_Renderer::SetPreselectionProp

SVTK_ViewWindow * SVTK_SignalHandler::GetMainWindow ( ) [inherited]
Returns:
corresponding svtk main window
void SVTK_SignalHandler::Repaint ( bool  theUpdateTrihedron = true) [inherited]
SVTK_Renderer * SVTK_SignalHandler::GetRenderer ( ) [inherited]
vtkRenderer * SVTK_SignalHandler::getRenderer ( ) [inherited]
void SVTK_SignalHandler::onSelectionChanged ( ) [slot, inherited]
void SVTK_SignalHandler.MouseMove ( QMouseEvent *  ) [signal, inherited]
void SVTK_SignalHandler.MouseButtonPressed ( QMouseEvent *  ) [signal, inherited]
void SVTK_SignalHandler.MouseButtonReleased ( QMouseEvent *  ) [signal, inherited]
void SVTK_SignalHandler.MouseDoubleClicked ( QMouseEvent *  ) [signal, inherited]
void SVTK_SignalHandler.ButtonPressed ( const QMouseEvent *  event) [signal, inherited]
void SVTK_SignalHandler.ButtonReleased ( const QMouseEvent *  event) [signal, inherited]
void SVTK_SignalHandler.WheelMoved ( QWheelEvent *  ) [signal, inherited]
void SVTK_SignalHandler.KeyPressed ( QKeyEvent *  ) [signal, inherited]
void SVTK_SignalHandler.KeyReleased ( QKeyEvent *  ) [signal, inherited]
void SVTK_SignalHandler.contextMenuRequested ( QContextMenuEvent *  e) [signal, inherited]
void SVTK_SignalHandler.selectionChanged ( ) [signal, inherited]

Field Documentation

int SVTK_View.myDisplayMode [protected]
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