Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 

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

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

Member Enumeration Documentation

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

Destructor.

References myRenderer, myRWInteractor, myTransform, and myTrihedron.

Member Function Documentation

void VTKViewer_ViewWindow::activateGlobalPanning ( )
slot
void VTKViewer_ViewWindow::activatePanning ( )
slot
void VTKViewer_ViewWindow::activateRotation ( )
slot
void VTKViewer_ViewWindow::activateWindowFit ( )
slot
void VTKViewer_ViewWindow::activateZoom ( )
slot
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().

Qtx::BackgroundData VTKViewer_ViewWindow::background ( ) const

Returns background of the viewport

References myBackground.

QColor VTKViewer_ViewWindow::backgroundColor ( ) const

Returns background color of the viewport [obsolete]

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

QImage VTKViewer_ViewWindow::dumpView ( )
protectedvirtual

Dump view.

Reimplemented from SUIT_ViewWindow.

References myRenderWindow, and px().

vtkRenderer* VTKViewer_ViewWindow::getRenderer ( )
inline

Gets renderer.

VTKViewer_RenderWindow* VTKViewer_ViewWindow::getRenderWindow ( )
inline

Gets render window.

VTKViewer_RenderWindowInteractor* VTKViewer_ViewWindow::getRWInteractor ( )
inline

Gets render window interactor.

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

Get scale of transformation filter.

References myTransform.

QToolBar* VTKViewer_ViewWindow::getToolBar ( )
inline

Gets tool bar.

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.

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

bool VTKViewer_ViewWindow::isTrihedronDisplayed ( )

Checks: is trihedron displayed.

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

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

References InsertActor(), and RemoveActor().

void VTKViewer_ViewWindow::onAntiClockWiseView ( )
slot

References myRenderer, and Repaint().

void VTKViewer_ViewWindow::onBackView ( )
slot

On back view slot.

References myRenderer, and onFitAll().

void VTKViewer_ViewWindow::onBottomView ( )
slot

On bottom view slot.

References myRenderer, and onFitAll().

void VTKViewer_ViewWindow::onClockWiseView ( )
slot

References myRenderer, and Repaint().

void VTKViewer_ViewWindow::onFitAll ( )
slot
void VTKViewer_ViewWindow::onFitSelection ( )
slot
void VTKViewer_ViewWindow::onFrontView ( )
slot

On front view event.

References myRenderer, and onFitAll().

void VTKViewer_ViewWindow::onKeyPressed ( QKeyEvent *  event)
protectedslot

Emit key pressed.

References SUIT_ViewWindow::keyPressed().

void VTKViewer_ViewWindow::onKeyReleased ( QKeyEvent *  event)
protectedslot

Emit key released.

References SUIT_ViewWindow::keyReleased().

void VTKViewer_ViewWindow::onLeftView ( )
slot

On left view slot.

References myRenderer, and onFitAll().

void VTKViewer_ViewWindow::onMouseDoubleClicked ( QMouseEvent *  event)
protectedslot

Emit mouse double clicked.

References SUIT_ViewWindow::mouseDoubleClicked().

void VTKViewer_ViewWindow::onMouseMoving ( QMouseEvent *  event)
protectedslot

Emit mouse moving.

References SUIT_ViewWindow::mouseMoving().

void VTKViewer_ViewWindow::onMousePressed ( QMouseEvent *  event)
protectedslot

Emit key pressed.

References SUIT_ViewWindow::mousePressed().

void VTKViewer_ViewWindow::onMouseReleased ( QMouseEvent *  event)
protectedslot

Emit mouse released.

References SUIT_ViewWindow::mouseReleased().

void VTKViewer_ViewWindow::onRightView ( )
slot

On right view slot.

References myRenderer, and onFitAll().

void VTKViewer_ViewWindow::onTopView ( )
slot

On back view slot.

References myRenderer, and onFitAll().

void VTKViewer_ViewWindow::onTrihedronShow ( )
slot
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().

void VTKViewer_ViewWindow::Repaint ( bool  theUpdateTrihedron = true)

Repaint window. If theUpdateTrihedron is true - recalculate trihedron.

References myRenderWindow, and onAdjustTrihedron().

void VTKViewer_ViewWindow::setBackgroundColor ( const QColor &  c)

Set background color of the viewport [obsolete]

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

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

Set scale of transformation filter and repaint window.

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

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

friend class VTKViewer_RenderWindowInteractor
friend

Member Data Documentation

ActionsMap VTKViewer_ViewWindow::myActionsMap
private
Qtx::BackgroundData VTKViewer_ViewWindow::myBackground
private
double VTKViewer_ViewWindow::myCurScale
private
VTKViewer_Viewer* VTKViewer_ViewWindow::myModel
private
vtkRenderer* VTKViewer_ViewWindow::myRenderer
private
VTKViewer_RenderWindow* VTKViewer_ViewWindow::myRenderWindow
private
VTKViewer_RenderWindowInteractor* VTKViewer_ViewWindow::myRWInteractor
private
QToolBar* VTKViewer_ViewWindow::myToolBar
private
VTKViewer_Transform* VTKViewer_ViewWindow::myTransform
private
VTKViewer_Trihedron* VTKViewer_ViewWindow::myTrihedron
private

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