#include <VTKViewer_ViewWindow.h>

Public Slots | |
| void | onFrontView () |
| void | onBackView () |
| void | onTopView () |
| void | onBottomView () |
| void | onLeftView () |
| void | onRightView () |
| void | onClockWiseView () |
| Rotate view 90 degrees clockwise. | |
| void | onAntiClockWiseView () |
| Rotate view 90 degrees conterclockwise. | |
| void | onResetView () |
| void | onFitAll () |
| void | activateZoom () |
| void | activateWindowFit () |
| void | activateRotation () |
| void | activatePanning () |
| void | activateGlobalPanning () |
| void | onTrihedronShow () |
| virtual void | onDumpView () |
Signals | |
| 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) |
Public Member Functions | |
| VTKViewer_ViewWindow (SUIT_Desktop *, VTKViewer_Viewer *, VTKViewer_InteractorStyle *=0, VTKViewer_RenderWindowInteractor *=0) | |
| virtual | ~VTKViewer_ViewWindow () |
| QToolBar * | getToolBar () |
| void | setBackgroundColor (const QColor &) |
| QColor | backgroundColor () const |
| vtkRenderer * | getRenderer () |
| VTKViewer_RenderWindow * | getRenderWindow () |
| VTKViewer_RenderWindowInteractor * | getRWInteractor () |
| 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 ¶meters) |
| virtual void | setViewManager (SUIT_ViewManager *) |
| SUIT_ViewManager * | getViewManager () 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 |
| QtxActionToolMgr * | toolMgr () const |
| virtual void | setDropDownButtons (bool) |
Set buttons mode to drop-down (on = true) or ligned (on = false) | |
| bool | dropDownButtons () const |
| Get current buttons mode. | |
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 Member Functions | |
| QImage | dumpView () |
| virtual bool | dumpViewToFormat (const QImage &, const QString &fileName, const QString &format) |
| void | closeEvent (QCloseEvent *) |
| virtual void | contextMenuEvent (QContextMenuEvent *) |
| virtual QString | filter () const |
| virtual bool | action (const int) |
Protected Attributes | |
| SUIT_Desktop * | myDesktop |
| SUIT_ViewManager * | myManager |
Private Types | |
| enum | { DumpId, FitAllId, FitRectId, 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_Viewer * | myModel |
| vtkRenderer * | myRenderer |
| VTKViewer_RenderWindow * | myRenderWindow |
| VTKViewer_RenderWindowInteractor * | myRWInteractor |
| VTKViewer_Trihedron * | myTrihedron |
| VTKViewer_Transform * | myTransform |
| QToolBar * | myToolBar |
| ActionsMap | myActionsMap |
| double | myCurScale |
Friends | |
| class | VTKViewer_RenderWindowInteractor |
typedef QMap<int, QtxAction*> VTKViewer_ViewWindow.ActionsMap [private] |
Reimplemented from SUIT_ViewWindow.
anonymous enum [private] |
| VTKViewer_ViewWindow::VTKViewer_ViewWindow | ( | SUIT_Desktop * | theDesktop, |
| VTKViewer_Viewer * | theModel, | ||
| VTKViewer_InteractorStyle * | iStyle = 0, |
||
| VTKViewer_RenderWindowInteractor * | rw = 0 |
||
| ) |
Construction
References VTKViewer_Trihedron.AddToRender(), SUIT_ViewWindow.contextMenuRequested(), createActions(), createToolBar(), VTKViewer_RenderWindow.getRenderWindow(), VTKViewer_RenderWindowInteractor.Initialize(), myModel, myRenderer, myRenderWindow, myRWInteractor, myToolBar, myTransform, myTrihedron, VTKViewer_InteractorStyle.New(), VTKViewer_RenderWindowInteractor.New(), VTKViewer_Transform.New(), VTKViewer_Trihedron.New(), onKeyPressed(), onKeyReleased(), onMouseDoubleClicked(), onMouseMoving(), onMousePressed(), onMouseReleased(), onResetView(), VTKViewer_InteractorStyle.setGUIWindow(), VTKViewer_RenderWindowInteractor.SetInteractorStyle(), and VTKViewer_InteractorStyle.setTriedron().
| VTKViewer_ViewWindow::~VTKViewer_ViewWindow | ( | ) | [virtual] |
Destructor.
References myRenderer, myRWInteractor, myTransform, and myTrihedron.
| QToolBar* VTKViewer_ViewWindow.getToolBar | ( | ) |
Gets tool bar.
| void VTKViewer_ViewWindow::setBackgroundColor | ( | const QColor & | color | ) |
Set background of the viewport
References myRenderer.
| QColor VTKViewer_ViewWindow::backgroundColor | ( | ) | const |
Returns background of the viewport
References myRenderer.
| vtkRenderer* VTKViewer_ViewWindow.getRenderer | ( | ) |
Gets renderer.
| VTKViewer_RenderWindow* VTKViewer_ViewWindow.getRenderWindow | ( | ) |
Gets render window.
| VTKViewer_RenderWindowInteractor* VTKViewer_ViewWindow.getRWInteractor | ( | ) |
Gets render window interactor.
| bool VTKViewer_ViewWindow::isTrihedronDisplayed | ( | ) |
Checks: is trihedron displayed.
References VTKViewer_Trihedron.eOn, VTKViewer_Trihedron.GetVisibility(), and myTrihedron.
| void VTKViewer_ViewWindow::Repaint | ( | bool | theUpdateTrihedron = true | ) |
Repaint window. If theUpdateTrihedron is true - recalculate trihedron.
References myRenderWindow, and onAdjustTrihedron().
| void VTKViewer_ViewWindow::onAdjustTrihedron | ( | ) |
Calculation trihedron size.
References ComputeVisiblePropBounds(), VTKViewer_Trihedron.GetSize(), VTKViewer_Trihedron.GetVisibleActorCount(), isTrihedronDisplayed(), myRenderer, myTrihedron, ResetCameraClippingRange(), VTKViewer_Trihedron.SetSize(), VTKViewer_Trihedron.VisibilityOff(), and VTKViewer_Trihedron.VisibilityOn().
| void VTKViewer_ViewWindow::GetScale | ( | double | theScale[3] | ) |
Get scale of transformation filter.
References myTransform.
| 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::AddActor | ( | VTKViewer_Actor * | theActor, |
| bool | theUpdate = false |
||
| ) |
Add actor.Repaint window if theUpdate is true.
References InsertActor(), and Repaint().
| 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().
| 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::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().
| void VTKViewer_ViewWindow::onFrontView | ( | ) | [slot] |
On front view event.
References myRenderer, and onFitAll().
| void VTKViewer_ViewWindow::onBackView | ( | ) | [slot] |
On back view slot.
References myRenderer, and onFitAll().
| void VTKViewer_ViewWindow::onTopView | ( | ) | [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::onLeftView | ( | ) | [slot] |
On left view slot.
References myRenderer, and onFitAll().
| void VTKViewer_ViewWindow::onRightView | ( | ) | [slot] |
On right view slot.
References myRenderer, and onFitAll().
| void VTKViewer_ViewWindow::onClockWiseView | ( | ) | [slot] |
References myRenderer, and Repaint().
| void VTKViewer_ViewWindow::onAntiClockWiseView | ( | ) | [slot] |
References myRenderer, and Repaint().
| void VTKViewer_ViewWindow::onResetView | ( | ) | [slot] |
On reset view slot.
References VTKViewer_Trihedron.eOnlyLineOn, isTrihedronDisplayed(), myRenderer, myTrihedron, Repaint(), ResetCamera(), VTKViewer_Trihedron.SetVisibility(), VTKViewer_Trihedron.VisibilityOff(), and VTKViewer_Trihedron.VisibilityOn().
| void VTKViewer_ViewWindow::onFitAll | ( | ) | [slot] |
On fit all slot.
References VTKViewer_RenderWindowInteractor.GetInteractorStyle(), myRWInteractor, Repaint(), and VTKViewer_InteractorStyle.ViewFitAll().
| void VTKViewer_ViewWindow::activateZoom | ( | ) | [slot] |
Activates 'zooming' transformation
References VTKViewer_RenderWindowInteractor.GetInteractorStyle(), myRWInteractor, and VTKViewer_InteractorStyle.startZoom().
| void VTKViewer_ViewWindow::activateWindowFit | ( | ) | [slot] |
Activates 'fit area' transformation
References VTKViewer_RenderWindowInteractor.GetInteractorStyle(), myRWInteractor, and VTKViewer_InteractorStyle.startFitArea().
| void VTKViewer_ViewWindow::activateRotation | ( | ) | [slot] |
Activates 'rotation' transformation
References VTKViewer_RenderWindowInteractor.GetInteractorStyle(), myRWInteractor, and VTKViewer_InteractorStyle.startRotate().
| void VTKViewer_ViewWindow::activatePanning | ( | ) | [slot] |
Activates 'panning' transformation
References VTKViewer_RenderWindowInteractor.GetInteractorStyle(), myRWInteractor, and VTKViewer_InteractorStyle.startPan().
| void VTKViewer_ViewWindow::activateGlobalPanning | ( | ) | [slot] |
Activate global panning.
References VTKViewer_RenderWindowInteractor.GetInteractorStyle(), myRWInteractor, and VTKViewer_InteractorStyle.startGlobalPan().
| void VTKViewer_ViewWindow::onTrihedronShow | ( | ) | [slot] |
On trihedron show slot.
References isTrihedronDisplayed(), myRenderWindow, myTrihedron, VTKViewer_Trihedron.VisibilityOff(), and VTKViewer_Trihedron.VisibilityOn().
| QImage VTKViewer_ViewWindow::dumpView | ( | ) | [protected, virtual] |
| void VTKViewer_ViewWindow::onKeyPressed | ( | QKeyEvent * | event | ) | [protected, slot] |
Emit key pressed.
References SUIT_ViewWindow.keyPressed().
| void VTKViewer_ViewWindow::onKeyReleased | ( | QKeyEvent * | event | ) | [protected, slot] |
Emit key released.
References SUIT_ViewWindow.keyReleased().
| void VTKViewer_ViewWindow::onMousePressed | ( | QMouseEvent * | event | ) | [protected, slot] |
Emit key pressed.
References SUIT_ViewWindow.mousePressed().
| void VTKViewer_ViewWindow::onMouseDoubleClicked | ( | QMouseEvent * | event | ) | [protected, slot] |
Emit mouse double clicked.
References SUIT_ViewWindow.mouseDoubleClicked().
| void VTKViewer_ViewWindow::onMouseReleased | ( | QMouseEvent * | event | ) | [protected, slot] |
Emit mouse released.
References SUIT_ViewWindow.mouseReleased().
| void VTKViewer_ViewWindow::onMouseMoving | ( | QMouseEvent * | event | ) | [protected, slot] |
Emit mouse moving.
References SUIT_ViewWindow.mouseMoving().
| 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().
| void VTKViewer_ViewWindow::MoveActor | ( | VTKViewer_Actor * | theActor | ) | [private] |
References InsertActor(), and RemoveActor().
| void VTKViewer_ViewWindow::createActions | ( | ) | [private] |
Create actions:
References activateGlobalPanning(), activatePanning(), activateRotation(), activateWindowFit(), activateZoom(), AntiClockWiseId, BackId, BottomId, ClockWiseId, DumpId, FitAllId, FitRectId, FrontId, GlobalPanId, LeftId, QtxResourceMgr.loadPixmap(), myActionsMap, onAntiClockWiseView(), onBackView(), onBottomView(), onClockWiseView(), SUIT_ViewWindow.onDumpView(), onFitAll(), onFrontView(), onLeftView(), onResetView(), onRightView(), onTopView(), onTrihedronShow(), PanId, ResetId, SUIT_Session.resourceMgr(), RightId, RotationId, SUIT_Session.session(), TopId, TrihedronShowId, and ZoomId.
| void VTKViewer_ViewWindow::createToolBar | ( | ) | [private] |
Create tool bar.
References AntiClockWiseId, BackId, BottomId, ClockWiseId, DumpId, FitAllId, FitRectId, FrontId, GlobalPanId, QtxActionSet.insertAction(), LeftId, myActionsMap, myToolBar, PanId, ResetId, RightId, RotationId, TopId, TrihedronShowId, and ZoomId.
| void SUIT_ViewWindow::setViewManager | ( | SUIT_ViewManager * | theManager | ) | [virtual, inherited] |
Sets new view manager for window
| theManager | - new view manager |
Reimplemented in OCCViewer_ViewFrame.
References SUIT_ViewWindow.myManager.
| SUIT_ViewManager * SUIT_ViewWindow::getViewManager | ( | ) | const [inherited] |
References SUIT_ViewWindow.myManager.
| bool SUIT_ViewWindow::event | ( | QEvent * | e | ) | [inherited] |
Reaction view window on event e.
References SUIT_Study.application(), SUIT_MessageBox.critical(), DUMP_EVENT, SUIT_ViewWindow.dumpView(), SUIT_ViewWindow.dumpViewToFormat(), Qtx.extension(), SUIT_ViewWindow.filter(), SUIT_Application.getFileName(), SUIT_ViewWindow.myManager, and SUIT_ViewManager.study().
| bool SUIT_ViewWindow::dumpViewToFormat | ( | const QString & | fileName, |
| const QString & | format | ||
| ) | [inherited] |
Saves scene rendering in window to file
| fileName | - name of file |
| format | - string contains name of format (for example, "BMP"(default) or "JPEG", "JPG") |
References SUIT_ViewWindow.dumpView().
| bool SUIT_ViewWindow::dumpViewToFormat | ( | const QImage & | img, |
| const QString & | fileName, | ||
| const QString & | format | ||
| ) | [protected, virtual, inherited] |
Saves image to file according to the format
| image | - image |
| fileName | - name of file |
| format | - string contains name of format (for example, "BMP"(default) or "JPEG", "JPG") |
Reimplemented in OCCViewer_ViewFrame, OCCViewer_ViewWindow, Plot2d_ViewWindow, and SVTK_ViewWindow.
| bool SUIT_ViewWindow::onAccelAction | ( | int | _action | ) | [inherited] |
Called by SUIT_Accel.onActivated() when a key accelerator was activated and this window was active
References SUIT_ViewWindow.action().
| bool SUIT_ViewWindow::closable | ( | ) | const [inherited] |
Returns true if view window can be closed by the user
| bool SUIT_ViewWindow::setClosable | ( | const bool | on | ) | [inherited] |
Set / reset "closable" option of the view window
References SUIT_ViewWindow.closable().
| void SUIT_ViewWindow::setDestructiveClose | ( | const bool | on | ) | [inherited] |
Set or clear flag Qt.WDestructiveClose
| int SUIT_ViewWindow::getId | ( | ) | const [inherited] |
| QtxActionToolMgr * SUIT_ViewWindow::toolMgr | ( | ) | const [inherited] |
References SUIT_ViewWindow.myToolMgr.
| void SUIT_ViewWindow::setDropDownButtons | ( | bool | on | ) | [virtual, inherited] |
| on | new buttons mode |
Reimplemented in OCCViewer_ViewFrame.
References test_table.a, QtxActionMgr.action(), QtxActionSet.actions(), QtxActionMgr.idList(), QtxActionToolMgr.index(), QtxActionToolMgr.insert(), SUIT_ViewWindow.myIsDropDown, SUIT_ViewWindow.myMultiActions, QtxActionToolMgr.remove(), QtxActionToolMgr.toolBarsIds(), and SUIT_ViewWindow.toolMgr().
| bool SUIT_ViewWindow::dropDownButtons | ( | ) | const [inherited] |
| void SUIT_ViewWindow::onDumpView | ( | ) | [virtual, slot, inherited] |
Post events on dump view.
Reimplemented in OCCViewer_ViewFrame, and Plot2d_ViewWindow.
References DUMP_EVENT.
| void SUIT_ViewWindow.tryClosing | ( | SUIT_ViewWindow * | ) | [signal, inherited] |
| void SUIT_ViewWindow.closing | ( | SUIT_ViewWindow * | ) | [signal, inherited] |
| void SUIT_ViewWindow.mousePressed | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.mouseReleased | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.mouseDoubleClicked | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.mouseMoving | ( | SUIT_ViewWindow * | , |
| QMouseEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.wheeling | ( | SUIT_ViewWindow * | , |
| QWheelEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.keyPressed | ( | SUIT_ViewWindow * | , |
| QKeyEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.keyReleased | ( | SUIT_ViewWindow * | , |
| QKeyEvent * | |||
| ) | [signal, inherited] |
| void SUIT_ViewWindow.contextMenuRequested | ( | QContextMenuEvent * | e | ) | [signal, inherited] |
| void SUIT_ViewWindow::closeEvent | ( | QCloseEvent * | e | ) | [protected, inherited] |
Close event theEvent.
References SUIT_ViewWindow.closable(), SUIT_ViewWindow.closing(), and SUIT_ViewWindow.tryClosing().
| void SUIT_ViewWindow::contextMenuEvent | ( | QContextMenuEvent * | e | ) | [protected, virtual, inherited] |
Context menu requested for event e.
References SUIT_ViewWindow.contextMenuRequested().
| QString SUIT_ViewWindow::filter | ( | ) | const [protected, virtual, inherited] |
Reimplemented in OCCViewer_ViewWindow, Plot2d_ViewWindow, and SVTK_ViewWindow.
| bool SUIT_ViewWindow::action | ( | const int | ) | [protected, virtual, inherited] |
action handle standard action (zoom, pan) or custom action. to be redefined in successors.
Reimplemented in SOCC_ViewWindow, SPlot2d_ViewWindow, and SVTK_ViewWindow.
friend class VTKViewer_RenderWindowInteractor [friend] |
VTKViewer_Viewer* VTKViewer_ViewWindow.myModel [private] |
vtkRenderer* VTKViewer_ViewWindow.myRenderer [private] |
QToolBar* VTKViewer_ViewWindow.myToolBar [private] |
ActionsMap VTKViewer_ViewWindow.myActionsMap [private] |
double VTKViewer_ViewWindow.myCurScale [private] |
SUIT_Desktop* SUIT_ViewWindow.myDesktop [protected, inherited] |
SUIT_ViewManager* SUIT_ViewWindow.myManager [protected, inherited] |