Version: 9.15.0
VTKViewer_ViewWindow Class Reference

#include <VTKViewer_ViewWindow.h>

Inheritance diagram for VTKViewer_ViewWindow:
Inheritance graph

Public Slots

void onFrontView ()
 
void onBackView ()
 
void onTopView ()
 
void onBottomView ()
 
void onLeftView ()
 
void onRightView ()
 
void onClockWiseView ()
 Rotate view 90 degrees clockwise. More...
 
void onAntiClockWiseView ()
 Rotate view 90 degrees conterclockwise. More...
 
void onResetView ()
 
void onFitAll ()
 
void onFitSelection ()
 
void activateZoom ()
 
void activateWindowFit ()
 
void activateRotation ()
 
void activatePanning ()
 
void activateGlobalPanning ()
 
void onTrihedronShow ()
 
- Public Slots inherited from SUIT_ViewWindow
virtual void onDumpView ()
 
void setVisible (bool)
 

Public Member Functions

 VTKViewer_ViewWindow (SUIT_Desktop *, VTKViewer_Viewer *, VTKViewer_InteractorStyle *=0, VTKViewer_RenderWindowInteractor *=0)
 
virtual ~VTKViewer_ViewWindow ()
 
QToolBargetToolBar ()
 
void setBackgroundColor (const QColor &)
 
QColor backgroundColor () const
 
void setBackground (const Qtx::BackgroundData &)
 
Qtx::BackgroundData background () const
 
vtkRenderer * getRenderer ()
 
VTKViewer_RenderWindowgetRenderWindow ()
 
VTKViewer_RenderWindowInteractorgetRWInteractor ()
 
bool isTrihedronDisplayed ()
 
void Repaint (bool theUpdateTrihedron=true)
 
void onAdjustTrihedron ()
 
void GetScale (double theScale[3])
 
void SetScale (double theScale[3])
 
void AddActor (VTKViewer_Actor *, bool update=false)
 
void RemoveActor (VTKViewer_Actor *, bool update=false)
 
virtual QString getVisualParameters ()
 
virtual void setVisualParameters (const QString &parameters)
 
- Public Member Functions inherited from SUIT_ViewWindow
 SUIT_ViewWindow (SUIT_Desktop *)
 
virtual ~SUIT_ViewWindow ()
 
virtual void setViewManager (SUIT_ViewManager *)
 
SUIT_ViewManagergetViewManager () const
 
bool event (QEvent *)
 
bool dumpViewToFormat (const QString &fileName, const QString &format)
 
bool onAccelAction (int)
 
bool closable () const
 
bool setClosable (const bool)
 
void setDestructiveClose (const bool)
 
int getId () const
 
QtxActionToolMgrtoolMgr () const
 
virtual void setDropDownButtons (bool)
 Set buttons mode to drop-down (on = true) or ligned (on = false) More...
 
bool dropDownButtons () const
 Get current buttons mode. More...
 
virtual void enableAutoRotation (const bool)
 
virtual bool isAutoRotationEnabled () const
 
virtual SUIT_CameraProperties cameraProperties ()
 

Protected Slots

void onKeyPressed (QKeyEvent *event)
 
void onKeyReleased (QKeyEvent *event)
 
void onMousePressed (QMouseEvent *event)
 
void onMouseDoubleClicked (QMouseEvent *event)
 
void onMouseReleased (QMouseEvent *event)
 
void onMouseMoving (QMouseEvent *event)
 
- Protected Slots inherited from SUIT_ViewWindow
void updateSyncViews ()
 
void onSynchronizeView (bool)
 
virtual void synchronize (SUIT_ViewWindow *)
 
void emitViewModified ()
 

Protected Member Functions

QImage dumpView ()
 
- Protected Member Functions inherited from SUIT_ViewWindow
void closeEvent (QCloseEvent *)
 
virtual void contextMenuEvent (QContextMenuEvent *)
 
virtual QString filter () const
 
virtual bool action (const int)
 
virtual bool dumpViewToFormat (const QImage &, const QString &fileName, const QString &format)
 
virtual QActionsynchronizeAction ()
 

Private Types

enum  {
  DumpId , FitAllId , FitRectId , FitSelectionId ,
  ZoomId , PanId , GlobalPanId , RotationId ,
  FrontId , BackId , TopId , BottomId ,
  LeftId , RightId , ClockWiseId , AntiClockWiseId ,
  ResetId , TrihedronShowId
}
 
typedef QMap< int, QtxAction * > ActionsMap
 

Private Member Functions

void InsertActor (VTKViewer_Actor *theActor, bool theMoveInternalActors=false)
 
void MoveActor (VTKViewer_Actor *theActor)
 
void createActions ()
 
void createToolBar ()
 

Private Attributes

VTKViewer_ViewermyModel
 
vtkRenderer * myRenderer
 
VTKViewer_RenderWindowmyRenderWindow
 
VTKViewer_RenderWindowInteractormyRWInteractor
 
VTKViewer_TrihedronmyTrihedron
 
VTKViewer_TransformmyTransform
 
QToolBarmyToolBar
 
ActionsMap myActionsMap
 
double myCurScale
 
Qtx::BackgroundData myBackground
 

Friends

class VTKViewer_RenderWindowInteractor
 

Additional Inherited Members

- Signals inherited from SUIT_ViewWindow
void tryClosing (SUIT_ViewWindow *)
 
void closing (SUIT_ViewWindow *)
 
void mousePressed (SUIT_ViewWindow *, QMouseEvent *)
 
void mouseReleased (SUIT_ViewWindow *, QMouseEvent *)
 
void mouseDoubleClicked (SUIT_ViewWindow *, QMouseEvent *)
 
void mouseMoving (SUIT_ViewWindow *, QMouseEvent *)
 
void wheeling (SUIT_ViewWindow *, QWheelEvent *)
 
void keyPressed (SUIT_ViewWindow *, QKeyEvent *)
 
void keyReleased (SUIT_ViewWindow *, QKeyEvent *)
 
void contextMenuRequested (QContextMenuEvent *e)
 
void viewModified (SUIT_ViewWindow *)
 
void vpStartRotate (int, int, qint64)
 
void vpRotate (int, int, qint64)
 
void vpEndRotate (int, int, qint64)
 
- Static Protected Member Functions inherited from SUIT_ViewWindow
static void synchronizeView (SUIT_ViewWindow *viewWindow, int id)
 
- Protected Attributes inherited from SUIT_ViewWindow
SUIT_DesktopmyDesktop
 
SUIT_ViewManagermyManager
 

Member Typedef Documentation

◆ ActionsMap

typedef QMap<int, QtxAction*> VTKViewer_ViewWindow::ActionsMap
private

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
DumpId 
FitAllId 
FitRectId 
FitSelectionId 
ZoomId 
PanId 
GlobalPanId 
RotationId 
FrontId 
BackId 
TopId 
BottomId 
LeftId 
RightId 
ClockWiseId 
AntiClockWiseId 
ResetId 
TrihedronShowId 

Constructor & Destructor Documentation

◆ VTKViewer_ViewWindow()

◆ ~VTKViewer_ViewWindow()

VTKViewer_ViewWindow::~VTKViewer_ViewWindow ( )
virtual

Destructor.

References myRenderer, myRWInteractor, myTransform, and myTrihedron.

Member Function Documentation

◆ activateGlobalPanning

void VTKViewer_ViewWindow::activateGlobalPanning ( )
slot

◆ activatePanning

void VTKViewer_ViewWindow::activatePanning ( )
slot

◆ activateRotation

void VTKViewer_ViewWindow::activateRotation ( )
slot

◆ activateWindowFit

void VTKViewer_ViewWindow::activateWindowFit ( )
slot

◆ activateZoom

void VTKViewer_ViewWindow::activateZoom ( )
slot

◆ AddActor()

void VTKViewer_ViewWindow::AddActor ( VTKViewer_Actor theActor,
bool  theUpdate = false 
)

Add actor.Repaint window if theUpdate is true.

See also
InsertActor( VTKViewer_Actor* theActor, bool theMoveInternalActors )

References InsertActor(), and Repaint().

◆ background()

Qtx::BackgroundData VTKViewer_ViewWindow::background ( ) const

Returns background of the viewport

References myBackground.

◆ backgroundColor()

QColor VTKViewer_ViewWindow::backgroundColor ( ) const

Returns background color of the viewport [obsolete]

References background(), and Qtx::BackgroundData::color().

◆ createActions()

◆ createToolBar()

◆ dumpView()

QImage VTKViewer_ViewWindow::dumpView ( )
protectedvirtual

Dump view.

Reimplemented from SUIT_ViewWindow.

References myRenderWindow, and px().

◆ getRenderer()

vtkRenderer* VTKViewer_ViewWindow::getRenderer ( )
inline

Gets renderer.

◆ getRenderWindow()

VTKViewer_RenderWindow* VTKViewer_ViewWindow::getRenderWindow ( )
inline

Gets render window.

◆ getRWInteractor()

VTKViewer_RenderWindowInteractor* VTKViewer_ViewWindow::getRWInteractor ( )
inline

Gets render window interactor.

◆ GetScale()

void VTKViewer_ViewWindow::GetScale ( double  theScale[3])

Get scale of transformation filter.

References myTransform, and theScale.

◆ getToolBar()

QToolBar* VTKViewer_ViewWindow::getToolBar ( )
inline

Gets tool bar.

◆ getVisualParameters()

QString VTKViewer_ViewWindow::getVisualParameters ( )
virtual

The method returns the visual parameters of this view as a formated string

Reimplemented from SUIT_ViewWindow.

References GetScale(), and myRenderer.

◆ InsertActor()

void VTKViewer_ViewWindow::InsertActor ( VTKViewer_Actor theActor,
bool  theMoveInternalActors = false 
)
private

Insert actor to renderer and transformation filter. Move Internal actors, if theMoveInternalActors is true.

References VTKViewer_Actor::AddToRender(), VTKViewer_RenderWindowInteractor::MoveInternalActors(), myRenderer, myRWInteractor, myTransform, and VTKViewer_Actor::SetTransform().

◆ isTrihedronDisplayed()

bool VTKViewer_ViewWindow::isTrihedronDisplayed ( )

Checks: is trihedron displayed.

References VTKViewer_Trihedron::eOn, VTKViewer_Trihedron::GetVisibility(), and myTrihedron.

◆ MoveActor()

void VTKViewer_ViewWindow::MoveActor ( VTKViewer_Actor theActor)
private
See also
RemoveActor() and InsertActor().

References InsertActor(), and RemoveActor().

◆ onAdjustTrihedron()

◆ onAntiClockWiseView

void VTKViewer_ViewWindow::onAntiClockWiseView ( )
slot

Rotate view 90 degrees conterclockwise.

References myRenderer, and Repaint().

◆ onBackView

void VTKViewer_ViewWindow::onBackView ( )
slot

On back view slot.

References myRenderer, and onFitAll().

◆ onBottomView

void VTKViewer_ViewWindow::onBottomView ( )
slot

On bottom view slot.

References myRenderer, and onFitAll().

◆ onClockWiseView

void VTKViewer_ViewWindow::onClockWiseView ( )
slot

Rotate view 90 degrees clockwise.

References myRenderer, and Repaint().

◆ onFitAll

void VTKViewer_ViewWindow::onFitAll ( )
slot

◆ onFitSelection

void VTKViewer_ViewWindow::onFitSelection ( )
slot

◆ onFrontView

void VTKViewer_ViewWindow::onFrontView ( )
slot

On front view event.

References myRenderer, and onFitAll().

◆ onKeyPressed

void VTKViewer_ViewWindow::onKeyPressed ( QKeyEvent *  event)
protectedslot

Emit key pressed.

References SUIT_ViewWindow::event(), and SUIT_ViewWindow::keyPressed().

◆ onKeyReleased

void VTKViewer_ViewWindow::onKeyReleased ( QKeyEvent *  event)
protectedslot

Emit key released.

References SUIT_ViewWindow::event(), and SUIT_ViewWindow::keyReleased().

◆ onLeftView

void VTKViewer_ViewWindow::onLeftView ( )
slot

On left view slot.

References myRenderer, and onFitAll().

◆ onMouseDoubleClicked

void VTKViewer_ViewWindow::onMouseDoubleClicked ( QMouseEvent *  event)
protectedslot

Emit mouse double clicked.

References SUIT_ViewWindow::event(), and SUIT_ViewWindow::mouseDoubleClicked().

◆ onMouseMoving

void VTKViewer_ViewWindow::onMouseMoving ( QMouseEvent *  event)
protectedslot

Emit mouse moving.

References SUIT_ViewWindow::event(), and SUIT_ViewWindow::mouseMoving().

◆ onMousePressed

void VTKViewer_ViewWindow::onMousePressed ( QMouseEvent *  event)
protectedslot

Emit key pressed.

References SUIT_ViewWindow::event(), and SUIT_ViewWindow::mousePressed().

◆ onMouseReleased

void VTKViewer_ViewWindow::onMouseReleased ( QMouseEvent *  event)
protectedslot

Emit mouse released.

References SUIT_ViewWindow::event(), and SUIT_ViewWindow::mouseReleased().

◆ onResetView

◆ onRightView

void VTKViewer_ViewWindow::onRightView ( )
slot

On right view slot.

References myRenderer, and onFitAll().

◆ onTopView

void VTKViewer_ViewWindow::onTopView ( )
slot

On back view slot.

References myRenderer, and onFitAll().

◆ onTrihedronShow

void VTKViewer_ViewWindow::onTrihedronShow ( )
slot

◆ RemoveActor()

void VTKViewer_ViewWindow::RemoveActor ( VTKViewer_Actor theActor,
bool  theUpdate = false 
)

Remove theActor from renderer and pepaint, if theUpdate is true.

References myRenderer, VTKViewer_Actor::RemoveFromRender(), and Repaint().

◆ Repaint()

void VTKViewer_ViewWindow::Repaint ( bool  theUpdateTrihedron = true)

Repaint window. If theUpdateTrihedron is true - recalculate trihedron.

References myRenderWindow, and onAdjustTrihedron().

◆ setBackground()

◆ setBackgroundColor()

void VTKViewer_ViewWindow::setBackgroundColor ( const QColor &  c)

Set background color of the viewport [obsolete]

References background(), setBackground(), and Qtx::BackgroundData::setColor().

◆ SetScale()

void VTKViewer_ViewWindow::SetScale ( double  theScale[3])

Set scale of transformation filter and repaint window.

References myRWInteractor, myTransform, Repaint(), VTKViewer_Transform::SetMatrixScale(), and theScale.

◆ setVisualParameters()

void VTKViewer_ViewWindow::setVisualParameters ( const QString &  parameters)
virtual

The method restors visual parameters of this view from a formated string

Reimplemented from SUIT_ViewWindow.

References myRenderer, myRWInteractor, myTransform, and VTKViewer_Transform::SetMatrixScale().

Friends And Related Function Documentation

◆ VTKViewer_RenderWindowInteractor

friend class VTKViewer_RenderWindowInteractor
friend

Member Data Documentation

◆ myActionsMap

ActionsMap VTKViewer_ViewWindow::myActionsMap
private

◆ myBackground

Qtx::BackgroundData VTKViewer_ViewWindow::myBackground
private

◆ myCurScale

double VTKViewer_ViewWindow::myCurScale
private

◆ myModel

VTKViewer_Viewer* VTKViewer_ViewWindow::myModel
private

◆ myRenderer

vtkRenderer* VTKViewer_ViewWindow::myRenderer
private

◆ myRenderWindow

VTKViewer_RenderWindow* VTKViewer_ViewWindow::myRenderWindow
private

◆ myRWInteractor

VTKViewer_RenderWindowInteractor* VTKViewer_ViewWindow::myRWInteractor
private

◆ myToolBar

QToolBar* VTKViewer_ViewWindow::myToolBar
private

◆ myTransform

VTKViewer_Transform* VTKViewer_ViewWindow::myTransform
private

◆ myTrihedron

VTKViewer_Trihedron* VTKViewer_ViewWindow::myTrihedron
private

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