Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SUIT_ViewModel Class Reference

#include <SUIT_ViewModel.h>

Inheritance diagram for SUIT_ViewModel:
Inheritance graph

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_ViewWindowcreateView (SUIT_Desktop *theDesktop)
 
virtual void setViewManager (SUIT_ViewManager *theViewManager)
 
SUIT_ViewManagergetViewManager () 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_ViewManagermyViewManager
 

Detailed Description

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.

Member Typedef Documentation

typedef QMap<HotOperation, Qt::MouseButtons> SUIT_ViewModel::ButtonsMap
typedef QMap<HotOperation, Qt::KeyboardModifiers> SUIT_ViewModel::StatesMap

Member Enumeration Documentation

Enumerator
PAN 
ZOOM 
ROTATE 
FIT_AREA 
Enumerator
STANDARD 
KEY_FREE 

Constructor & Destructor Documentation

SUIT_ViewModel::SUIT_ViewModel ( )
SUIT_ViewModel::~SUIT_ViewModel ( )
virtual

Destructor..

Member Function Documentation

virtual void SUIT_ViewModel::contextMenuPopup ( QMenu )
inlinevirtual
SUIT_ViewWindow * SUIT_ViewModel::createView ( SUIT_Desktop theDesktop)
virtual

Create new instance of view window on desktop theDesktop.

Return values
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.

void SUIT_ViewModel::getHotButton ( InteractionStyle  theInteractionStyle,
HotOperation  theOper,
Qt::KeyboardModifiers &  theState,
Qt::MouseButtons &  theButton 
)
static

Gets hot button for operation theOper.

Parameters
theOper- input hot operation
theState- output state from state map operations.
theButton- output state from button map operations.

References myButtonMap, and myStateMap.

SUIT_ViewManager * SUIT_ViewModel::getViewManager ( ) const

Get view manager.

Returns
view manager

References myViewManager.

void SUIT_ViewModel::setHotButton ( InteractionStyle  theInteractionStyle,
HotOperation  theOper,
Qt::KeyboardModifiers  theState,
Qt::MouseButtons  theButton 
)
static

Sets hot button

Parameters
theOper- hot operation
theState- adding state to state map operations.
theButton- adding state to button map operations.

References myButtonMap, and myStateMap.

void SUIT_ViewModel::setViewManager ( SUIT_ViewManager theViewManager)
virtual

Set view manager.

Parameters
theViewManagerview manager

Reimplemented in OCCViewer_Viewer, SVTK_Viewer, GLViewer_Viewer, VTKViewer_Viewer, Plot2d_Viewer, and QxScene_Viewer.

References myViewManager.

Member Data Documentation

SUIT_ViewModel::InteractionStyle2ButtonsMap SUIT_ViewModel::myButtonMap
static
SUIT_ViewModel::InteractionStyle2StatesMap SUIT_ViewModel::myStateMap
static
SUIT_ViewManager* SUIT_ViewModel::myViewManager
protected

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