#include <QxGraph_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 | |
| QxGraph_Viewer () | |
| virtual | ~QxGraph_Viewer () |
| virtual SUIT_ViewWindow * | createView (SUIT_Desktop *theDesktop) |
| virtual QString | getType () const |
| virtual void | contextMenuPopup (QPopupMenu *) |
| QxGraph_Canvas * | getCanvas () const |
| void | setCanvas (QxGraph_Canvas *theCanvas) |
| QPtrList< QxGraph_CanvasView > | getCanvasViews () |
| void | setCanvasViews (QPtrList< QxGraph_CanvasView > theViews) |
| void | addView (QxGraph_CanvasView *theView) |
| void | removeView (QxGraph_CanvasView *theView) |
| QxGraph_CanvasView * | getCurrentView () const |
| void | setCurrentView (QxGraph_CanvasView *theView) |
| void | setCurrentView (int theIndex) |
| virtual void | setViewManager (SUIT_ViewManager *theViewManager) |
| SUIT_ViewManager * | getViewManager () const |
| virtual void | contextMenuPopup (QMenu *) |
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 | onShowToolbar () |
| void | onChangeBgColor () |
Protected Member Functions | |
| void | initView (QxGraph_ViewWindow *view) |
Protected Attributes | |
| SUIT_ViewManager * | myViewManager |
Private Attributes | |
| QxGraph_Canvas * | myCanvas |
| QPtrList< QxGraph_CanvasView > | myCanvasViews |
| QxGraph_CanvasView * | myCurrentView |
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] |
| QxGraph_Viewer::QxGraph_Viewer | ( | ) |
Constructor
| QxGraph_Viewer::~QxGraph_Viewer | ( | ) | [virtual] |
Destructor
References myCanvas, myCanvasViews, and myCurrentView.
| static QString QxGraph_Viewer.Type | ( | ) | [static] |
| SUIT_ViewWindow * QxGraph_Viewer::createView | ( | SUIT_Desktop * | theDesktop | ) | [virtual] |
Creates new view window
| theDesktop | - main window of application |
Reimplemented from SUIT_ViewModel.
References initView().
| virtual QString QxGraph_Viewer.getType | ( | ) | const [virtual] |
Reimplemented from SUIT_ViewModel.
| void QxGraph_Viewer::contextMenuPopup | ( | QPopupMenu * | thePopup | ) | [virtual] |
Builds popup for QxGraph viewer
References SUIT_ViewManager.getActiveView(), QxGraph_ViewWindow.getToolBar(), SUIT_ViewModel.myViewManager, onChangeBgColor(), and onShowToolbar().
| QxGraph_Canvas* QxGraph_Viewer.getCanvas | ( | ) | const |
| void QxGraph_Viewer.setCanvas | ( | QxGraph_Canvas * | theCanvas | ) |
| QPtrList<QxGraph_CanvasView> QxGraph_Viewer.getCanvasViews | ( | ) |
| void QxGraph_Viewer.setCanvasViews | ( | QPtrList< QxGraph_CanvasView > | theViews | ) |
| void QxGraph_Viewer.addView | ( | QxGraph_CanvasView * | theView | ) |
| void QxGraph_Viewer.removeView | ( | QxGraph_CanvasView * | theView | ) |
| QxGraph_CanvasView* QxGraph_Viewer.getCurrentView | ( | ) | const |
| void QxGraph_Viewer.setCurrentView | ( | QxGraph_CanvasView * | theView | ) |
| void QxGraph_Viewer::setCurrentView | ( | int | theIndex | ) |
Set view with index theIndex from myCanvasViews as current view
| theIndex | - the index of the view in the list |
References SUIT_ViewManager.getActiveView(), myCanvasViews, myCurrentView, and SUIT_ViewModel.myViewManager.
| void QxGraph_Viewer::initView | ( | QxGraph_ViewWindow * | view | ) | [protected] |
Start initialization of view window
| view | - view window to be initialized |
References QxGraph_ViewWindow.initLayout().
| void QxGraph_Viewer::onShowToolbar | ( | ) | [protected, slot] |
SLOT: called when popup item "Show toolbar" is activated, shows toolbar of active view window
References SUIT_ViewManager.getActiveView(), QxGraph_ViewWindow.getToolBar(), and SUIT_ViewModel.myViewManager.
| void QxGraph_Viewer::onChangeBgColor | ( | ) | [protected, slot] |
SLOT: called if background color is to be changed changed, passes new color to current canvas view
References QxGraph_ViewWindow.backgroundColor(), SUIT_ViewManager.getActiveView(), SUIT_ViewModel.myViewManager, and QxGraph_ViewWindow.setBackgroundColor().
| void SUIT_ViewModel::setViewManager | ( | SUIT_ViewManager * | theViewManager | ) | [virtual, inherited] |
Set view manager.
| theViewManager | view manager |
Reimplemented in GLViewer_Viewer, OCCViewer_Viewer, Plot2d_Viewer, QxScene_Viewer, SVTK_Viewer, and VTKViewer_Viewer.
References SUIT_ViewModel.myViewManager.
| SUIT_ViewManager * SUIT_ViewModel::getViewManager | ( | ) | const [inherited] |
| virtual void SUIT_ViewModel.contextMenuPopup | ( | QMenu * | ) | [virtual, inherited] |
Reimplemented in GLViewer_Viewer, OCCViewer_Viewer, Plot2d_Viewer, QxScene_Viewer, SVTK_Viewer, and VTKViewer_Viewer.
| 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.
QxGraph_Canvas* QxGraph_Viewer.myCanvas [private] |
QPtrList<QxGraph_CanvasView> QxGraph_Viewer.myCanvasViews [private] |
QxGraph_CanvasView* QxGraph_Viewer.myCurrentView [private] |
SUIT_ViewManager* SUIT_ViewModel.myViewManager [protected, inherited] |
SUIT_ViewModel::InteractionStyle2StatesMap SUIT_ViewModel::myStateMap [static, inherited] |
SUIT_ViewModel::InteractionStyle2ButtonsMap SUIT_ViewModel::myButtonMap [static, inherited] |