class SALOME_Actor;
//----------------------------------------------------------------------------
+//! Main purpose of the class is to provide a way to customize #SVTK_MainWindow.
+/*!
+ This class is initialized by #SVTK_MainWindow and just pass Qt signals from
+ corresponding #SVTK_RenderWindowInteractor of the #SVTK_MainWindow.
+ Its main purpose is to provide a simple and flexible way to customize the #SVTK_MainWindow.
+ So, in your own viewer it is possible to derive new #SVTK_MainWindow and
+ use existing functionality without any modifications.
+ */
class SVTK_EXPORT SVTK_SignalHandler : public QObject
{
Q_OBJECT;
virtual
~SVTK_SignalHandler();
+ //! Get reference to its #SVTK_MainWindow
SVTK_MainWindow*
GetMainWindow();
//----------------------------------------------------------------------------
- void
- Repaint();
-
+ //! Redirect the request to #SVTK_MainWindow::Repaint (just for flexibility)
void
Repaint(bool theUpdateTrihedron);
//----------------------------------------------------------------------------
+ //! Redirect the request to #SVTK_MainWindow::GetRenderer (just for flexibility)
SVTK_Renderer*
GetRenderer();
+ //! Redirect the request to #SVTK_MainWindow::getRenderer (just for flexibility)
vtkRenderer*
getRenderer();
//----------------------------------------------------------------------------
+//! This class is introduced just for compatibility with old code.
+/*!
+ 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).
+ */
class SVTK_EXPORT SVTK_View : public SVTK_SignalHandler
{
Q_OBJECT;
~SVTK_View();
/* interactive object management */
+ //! To highlight a VTK presentation with the same #SALOME_InteractiveObject
void
highlight(const Handle(SALOME_InteractiveObject)& IObject,
bool highlight,
bool immediatly = true);
+
+ //! To unhighlight all VTK presentations
void
unHighlightAll();
Handle(SALOME_InteractiveObject)
FindIObject(const char* Entry);
+ //! Check, if the viewer contains a presentatin with defined #SALOME_InteractiveObject
bool
isInViewer(const Handle(SALOME_InteractiveObject)& IObject);
+ //! Check, if a presentatin with defined #SALOME_InteractiveObject is visible
bool
isVisible(const Handle(SALOME_InteractiveObject)& IObject);
//----------------------------------------------------------------------------
// Displaymode management
+ //! Get current display mode (obsolete)
int
GetDisplayMode();
+ //! Set current display mode
void
SetDisplayMode(int);
- // Switch representation wireframe/shading
+ //! Switch representation wireframe/shading
void
SetDisplayMode(const Handle(SALOME_InteractiveObject)& IObject,
int theMode);
- // Change all actors to wireframe or surface
+ //! Change all actors to wireframe
void
ChangeRepresentationToWireframe();
+ //! Change all actors to surface
void
ChangeRepresentationToSurface();
- // Change to wireframe or surface a list of vtkactor
+ //! Change to wireframe a list of vtkactor
void
ChangeRepresentationToWireframe(vtkActorCollection* theListofActors);
+
+ //! Change to surface a list of vtkactor
void
ChangeRepresentationToSurface(vtkActorCollection* theListofActors);
- // Transparency
+ //! Change transparency
void
SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject,
float trans);
+
+ //! Get current transparency
float
GetTransparency(const Handle(SALOME_InteractiveObject)& theIObject);
- // Color
+ //! Change color
void
SetColor(const Handle(SALOME_InteractiveObject)& theIObject,
const QColor& theColor);
+ //! Get current color
QColor
GetColor(const Handle(SALOME_InteractiveObject)& theIObject);
//----------------------------------------------------------------------------
// Erase Display functions
+ //! To erase all existing VTK presentations
void
EraseAll();
+ //! To display all existing VTK presentations
void
DisplayAll();
+ //! To remove from the view all existing VTK presentations
void
RemoveAll( const bool immediatly );
+ //! To erase VTK presentation with defined #SALOME_InteractiveObject
void
Erase(const Handle(SALOME_InteractiveObject)& IObject,
bool immediatly = true);
Remove(const Handle(SALOME_InteractiveObject)& IObject,
bool immediatly = true);
+ //! To display VTK presentation with defined #SALOME_InteractiveObject
void
Display(const Handle(SALOME_InteractiveObject)& IObject,
bool immediatly = true);
+ //! To display VTK presentation with defined #SALOME_InteractiveObject and erase all anothers
void
DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject);
+ //! To display the VTK presentation
void
Display(SALOME_Actor* SActor,
bool immediatly = true);
+ //! To erase the VTK presentation
void
Erase(SALOME_Actor* SActor,
bool immediatly = true);
+ //! To remove the VTK presentation
void
Remove(SALOME_Actor* SActor,
bool updateViewer = true);
//----------------------------------------------------------------------------
+ //! Redirect the request to #SVTK_Renderer::SetPreselectionProp
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);
isCubeAxesDisplayed();
/* interactive object management */
- //! To highlight a VTK presentation with the same #SALOME_InteractiveObject
+ //! Redirect the request to #SVTK_View::highlight (to support old code)
virtual
void
highlight(const Handle(SALOME_InteractiveObject)& theIO,
bool theIsHighlight = true,
bool theIsUpdate = true);
- //! To unhighlight all VTK presentations
+ //! Redirect the request to #SVTK_View::unHighlightAll (to support old code)
virtual
void
unHighlightAll();
- //! Check, if the viewer contains a presentatin with defined #SALOME_InteractiveObject
+ //! Redirect the request to #SVTK_View::isInViewer (to support old code)
bool
isInViewer(const Handle(SALOME_InteractiveObject)& theIObject);
- //! Check, if a presentatin with defined #SALOME_InteractiveObject is visible
+ //! Redirect the request to #SVTK_View::isVisible (to support old code)
bool
isVisible(const Handle(SALOME_InteractiveObject)& theIObject);
/* display */
//----------------------------------------------------------------------------
- //! To display VTK presentation with defined #SALOME_InteractiveObject
+ //! Redirect the request to #SVTK_View::Display (to support old code)
virtual
void
Display(const Handle(SALOME_InteractiveObject)& theIObject,
bool theImmediatly = true);
- //! To display VTK presentation with defined #SALOME_InteractiveObject and erase all anothers
+ //! Redirect the request to #SVTK_View::DisplayOnly (to support old code)
virtual
void
DisplayOnly(const Handle(SALOME_InteractiveObject)& theIObject);
- //! To erase VTK presentation with defined #SALOME_InteractiveObject
+ //! Redirect the request to #SVTK_View::Erase (to support old code)
virtual
void
Erase(const Handle(SALOME_InteractiveObject)& theIObject,
bool theImmediatly = true);
- //! To display all existing VTK presentations
+ //! Redirect the request to #SVTK_View::DisplayAll (to support old code)
virtual
void
DisplayAll();
- //! To erase all existing VTK presentations
+ //! Redirect the request to #SVTK_View::EraseAll (to support old code)
virtual
void
EraseAll();