#include <SUIT_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 |
Public Member Functions | |
SUIT_ViewModel () | |
virtual | ~SUIT_ViewModel () |
virtual SUIT_ViewWindow * | createView (SUIT_Desktop *theDesktop) |
virtual void | setViewManager (SUIT_ViewManager *theViewManager) |
SUIT_ViewManager * | getViewManager () const |
virtual QString | getType () const |
virtual void | contextMenuPopup (QMenu *) |
Static Public Member Functions | |
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 Attributes | |
SUIT_ViewManager * | myViewManager |
This object manages the definition and behaviour of a View Window.
In case of definition of this object in an external lib that lib must
have an exported function "createViewModel" which returns newly created
instance of SUIT_ViewModel.
typedef QMap<HotOperation, Qt::MouseButtons> SUIT_ViewModel::ButtonsMap |
typedef QMap<InteractionStyle, StatesMap> SUIT_ViewModel::InteractionStyle2StatesMap |
typedef QMap<HotOperation, Qt::KeyboardModifiers> SUIT_ViewModel::StatesMap |
SUIT_ViewModel::SUIT_ViewModel | ( | ) |
Constructor.
References FIT_AREA, isInitialized, KEY_FREE, myButtonMap, myStateMap, myViewManager, PAN, ROTATE, STANDARD, and ZOOM.
|
virtual |
Destructor..
|
inlinevirtual |
Reimplemented in OCCViewer_Viewer, SVTK_Viewer, GLViewer_Viewer, VTKViewer_Viewer, GraphicsView_Viewer, Plot2d_Viewer, and QxScene_Viewer.
|
virtual |
Create new instance of view window on desktop theDesktop.
SUIT_ViewWindow* | - created view window pointer. |
Reimplemented in GLViewer_Viewer2d, OCCViewer_Viewer, SVTK_Viewer, VTKViewer_Viewer, SPlot2d_Viewer, GraphicsView_Viewer, Plot2d_Viewer, PyViewer_Viewer, PVViewer_Viewer, QxScene_Viewer, and LightApp_WgViewModel.
|
static |
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 myButtonMap, and myStateMap.
|
inlinevirtual |
Reimplemented in OCCViewer_Viewer, SVTK_Viewer, GLViewer_Viewer, VTKViewer_Viewer, GraphicsView_Viewer, SPlot2d_Viewer, Plot2d_Viewer, PyViewer_Viewer, PVViewer_Viewer, QxScene_Viewer, and LightApp_WgViewModel.
SUIT_ViewManager * SUIT_ViewModel::getViewManager | ( | ) | const |
|
static |
Sets hot button
theOper | - hot operation |
theState | - adding state to state map operations. |
theButton | - adding state to button map operations. |
References myButtonMap, and myStateMap.
|
virtual |
Set view manager.
theViewManager | view manager |
Reimplemented in OCCViewer_Viewer, SVTK_Viewer, GLViewer_Viewer, VTKViewer_Viewer, Plot2d_Viewer, and QxScene_Viewer.
References myViewManager.
|
static |
|
static |
|
protected |