#include <VTKViewer_ViewModel.h>

Public Types | |
| enum | HotOperation { PAN, ZOOM, ROTATE, FIT_AREA } |
| enum | InteractionStyle { STANDARD, KEY_FREE } |
| typedef QMap< HotOperation, Qt::KeyboardModifiers > | StatesMap |
| typedef QMap< HotOperation, Qt::MouseButtons > | ButtonsMap |
| typedef QMap< InteractionStyle, StatesMap > | InteractionStyle2StatesMap |
| typedef QMap< InteractionStyle, ButtonsMap > | InteractionStyle2ButtonsMap |
Signals | |
| void | selectionChanged () |
Public Member Functions | |
| VTKViewer_Viewer () | |
| virtual | ~VTKViewer_Viewer () |
| virtual SUIT_ViewWindow * | createView (SUIT_Desktop *theDesktop) |
| virtual void | setViewManager (SUIT_ViewManager *theViewManager) |
| virtual void | contextMenuPopup (QMenu *) |
| virtual QString | getType () const |
| void | enableSelection (bool isEnabled) |
| bool | isSelectionEnabled () const |
| void | enableMultiselection (bool isEnable) |
| bool | isMultiSelectionEnabled () const |
| int | getSelectionCount () const |
| QColor | backgroundColor () const |
| void | setBackgroundColor (const QColor &) |
| SUIT_ViewManager * | getViewManager () const |
Static Public Member Functions | |
| static QString | Type () |
| static void | setHotButton (InteractionStyle theInteractionStyle, HotOperation theOper, Qt::KeyboardModifiers theState, Qt::MouseButtons theButton) |
| static void | getHotButton (InteractionStyle theInteractionStyle, HotOperation theOper, Qt::KeyboardModifiers &theState, Qt::MouseButtons &theButton) |
Static Public Attributes | |
| static InteractionStyle2StatesMap | myStateMap |
| static InteractionStyle2ButtonsMap | myButtonMap |
Protected Slots | |
| void | onMousePress (SUIT_ViewWindow *, QMouseEvent *) |
| void | onMouseMove (SUIT_ViewWindow *, QMouseEvent *) |
| void | onMouseRelease (SUIT_ViewWindow *, QMouseEvent *) |
| void | onDumpView () |
| void | onShowToolbar () |
| void | onChangeBgColor () |
Protected Attributes | |
| SUIT_ViewManager * | myViewManager |
Private Attributes | |
| QColor | myBgColor |
| bool | mySelectionEnabled |
| bool | myMultiSelectionEnabled |
typedef QMap<HotOperation, Qt::KeyboardModifiers> SUIT_ViewModel.StatesMap [inherited] |
typedef QMap<HotOperation, Qt::MouseButtons> SUIT_ViewModel.ButtonsMap [inherited] |
typedef QMap<InteractionStyle, StatesMap> SUIT_ViewModel.InteractionStyle2StatesMap [inherited] |
typedef QMap<InteractionStyle, ButtonsMap> SUIT_ViewModel.InteractionStyle2ButtonsMap [inherited] |
enum SUIT_ViewModel::HotOperation [inherited] |
enum SUIT_ViewModel::InteractionStyle [inherited] |
| VTKViewer_Viewer::VTKViewer_Viewer | ( | ) |
Constructor.Sets background color to black.
| VTKViewer_Viewer::~VTKViewer_Viewer | ( | ) | [virtual] |
Destructor.
| static QString VTKViewer_Viewer.Type | ( | ) | [static] |
Initialize type of viewer.
| SUIT_ViewWindow * VTKViewer_Viewer::createView | ( | SUIT_Desktop * | theDesktop | ) | [virtual] |
Create new instance of VTKViewer_ViewWindow, sets background color and return pointer to it.
Reimplemented from SUIT_ViewModel.
References myBgColor, and VTKViewer_ViewWindow.setBackgroundColor().
| void VTKViewer_Viewer::setViewManager | ( | SUIT_ViewManager * | theViewManager | ) | [virtual] |
Sets view manager and connect slots.
Reimplemented from SUIT_ViewModel.
References onMouseMove(), onMousePress(), and onMouseRelease().
| void VTKViewer_Viewer::contextMenuPopup | ( | QMenu * | thePopup | ) | [virtual] |
Insert context into popup menu.
Reimplemented from SUIT_ViewModel.
References SUIT_ViewManager.getActiveView(), VTKViewer_ViewWindow.getToolBar(), SUIT_ViewModel.myViewManager, onChangeBgColor(), onDumpView(), and onShowToolbar().
| virtual QString VTKViewer_Viewer.getType | ( | ) | const [virtual] |
Gets type of viewer.
Reimplemented from SUIT_ViewModel.
| void VTKViewer_Viewer::enableSelection | ( | bool | isEnabled | ) |
Sets flag to enable selection isEnable.
! To be done for view windows
References mySelectionEnabled.
| bool VTKViewer_Viewer.isSelectionEnabled | ( | ) | const |
Checks: is selection enabled
| void VTKViewer_Viewer::enableMultiselection | ( | bool | isEnable | ) |
Sets flag to multi selection enable isEnable.
! To be done for view windows
References myMultiSelectionEnabled.
| bool VTKViewer_Viewer.isMultiSelectionEnabled | ( | ) | const |
Checks: is multi selection enabled
| int VTKViewer_Viewer.getSelectionCount | ( | ) | const |
| QColor VTKViewer_Viewer::backgroundColor | ( | ) | const |
Gets background color.
References myBgColor.
| void VTKViewer_Viewer::setBackgroundColor | ( | const QColor & | c | ) |
Sets background color.
References myBgColor.
| void VTKViewer_Viewer.selectionChanged | ( | ) | [signal] |
| void VTKViewer_Viewer::onMousePress | ( | SUIT_ViewWindow * | vw, |
| QMouseEvent * | event | ||
| ) | [protected, slot] |
On mouse press event.
References VTKViewer_RenderWindowInteractor.LeftButtonPressed(), VTKViewer_RenderWindowInteractor.MiddleButtonPressed(), and VTKViewer_RenderWindowInteractor.RightButtonPressed().
| void VTKViewer_Viewer::onMouseMove | ( | SUIT_ViewWindow * | vw, |
| QMouseEvent * | event | ||
| ) | [protected, slot] |
On mouse move event.
References VTKViewer_RenderWindowInteractor.MouseMove().
| void VTKViewer_Viewer::onMouseRelease | ( | SUIT_ViewWindow * | vw, |
| QMouseEvent * | event | ||
| ) | [protected, slot] |
On mouse release event.
References VTKViewer_RenderWindowInteractor.LeftButtonReleased(), VTKViewer_RenderWindowInteractor.MiddleButtonReleased(), and VTKViewer_RenderWindowInteractor.RightButtonReleased().
| void VTKViewer_Viewer::onDumpView | ( | ) | [protected, slot] |
On dump view event.
References SUIT_ViewManager.getActiveView(), SUIT_ViewModel.myViewManager, and SUIT_ViewWindow.onDumpView().
| void VTKViewer_Viewer::onShowToolbar | ( | ) | [protected, slot] |
On show tool bar event.
References SUIT_ViewManager.getActiveView(), VTKViewer_ViewWindow.getToolBar(), and SUIT_ViewModel.myViewManager.
| void VTKViewer_Viewer::onChangeBgColor | ( | ) | [protected, slot] |
On change back ground color event.
References VTKViewer_ViewWindow.backgroundColor(), SUIT_ViewManager.getActiveView(), SUIT_ViewModel.myViewManager, and VTKViewer_ViewWindow.setBackgroundColor().
| SUIT_ViewManager * SUIT_ViewModel::getViewManager | ( | ) | const [inherited] |
| void SUIT_ViewModel::setHotButton | ( | InteractionStyle | theInteractionStyle, |
| HotOperation | theOper, | ||
| Qt::KeyboardModifiers | theState, | ||
| Qt::MouseButtons | theButton | ||
| ) | [static, inherited] |
Sets hot button
| theOper | - hot operation |
| theState | - adding state to state map operations. |
| theButton | - adding state to button map operations. |
References SUIT_ViewModel.myButtonMap, and SUIT_ViewModel.myStateMap.
| void SUIT_ViewModel::getHotButton | ( | InteractionStyle | theInteractionStyle, |
| HotOperation | theOper, | ||
| Qt::KeyboardModifiers & | theState, | ||
| Qt::MouseButtons & | theButton | ||
| ) | [static, inherited] |
Gets hot button for operation theOper.
| theOper | - input hot operation |
| theState | - output state from state map operations. |
| theButton | - output state from button map operations. |
References SUIT_ViewModel.myButtonMap, and SUIT_ViewModel.myStateMap.
QColor VTKViewer_Viewer.myBgColor [private] |
bool VTKViewer_Viewer.mySelectionEnabled [private] |
bool VTKViewer_Viewer.myMultiSelectionEnabled [private] |
SUIT_ViewManager* SUIT_ViewModel.myViewManager [protected, inherited] |
SUIT_ViewModel::InteractionStyle2StatesMap SUIT_ViewModel::myStateMap [static, inherited] |
SUIT_ViewModel::InteractionStyle2ButtonsMap SUIT_ViewModel::myButtonMap [static, inherited] |