Version: 6.3.1
Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Slots | Protected Attributes | Private Attributes

Plot2d_Viewer Class Reference

#include <Plot2d_ViewModel.h>

Inheritance diagram for Plot2d_Viewer:
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

Signals

void viewCloned (SUIT_ViewWindow *)

Public Member Functions

 Plot2d_Viewer (bool theAutoDel=false)
 ~Plot2d_Viewer ()
virtual void setViewManager (SUIT_ViewManager *)
virtual SUIT_ViewWindowcreateView (SUIT_Desktop *theDesktop)
virtual QString getType () const
virtual void contextMenuPopup (QMenu *)
Plot2d_PrsgetPrs () const
void setPrs (Plot2d_Prs *thePrs)
void update ()
void clearPrs ()
void setAutoDel (bool theDel)
SUIT_ViewManagergetViewManager () 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 onChangeBgColor ()
void onDumpView ()
void onShowToolbar ()
virtual void onCloneView (Plot2d_ViewFrame *, Plot2d_ViewFrame *)
virtual void onLegendClicked (QwtPlotItem *)

Protected Attributes

SUIT_ViewManagermyViewManager

Private Attributes

Plot2d_PrsmyPrs
bool myAutoDel

Member Typedef Documentation

typedef QMap<HotOperation, Qt::KeyboardModifiers> SUIT_ViewModel.StatesMap [inherited]
typedef QMap<HotOperation, Qt::MouseButtons> SUIT_ViewModel.ButtonsMap [inherited]

Member Enumeration Documentation

enum SUIT_ViewModel::HotOperation [inherited]
Enumerator:
PAN 
ZOOM 
ROTATE 
FIT_AREA 
Enumerator:
STANDARD 
KEY_FREE 

Constructor & Destructor Documentation

Plot2d_Viewer::Plot2d_Viewer ( bool  theAutoDel = false)

Constructor

References myAutoDel, and myPrs.

Plot2d_Viewer::~Plot2d_Viewer ( )

Destructor

References clearPrs(), and myPrs.


Member Function Documentation

static QString Plot2d_Viewer.Type ( ) [static]

Reimplemented in SPlot2d_Viewer.

void Plot2d_Viewer::setViewManager ( SUIT_ViewManager mgr) [virtual]

Sets view manager

Parameters:
mgr- new view manager

Reimplemented from SUIT_ViewModel.

References onCloneView().

SUIT_ViewWindow * Plot2d_Viewer::createView ( SUIT_Desktop theDesktop) [virtual]

Create new instance of view window on desktop theDesktop.

Return values:
SUIT_ViewWindow*- created view window pointer.

Reimplemented from SUIT_ViewModel.

Reimplemented in SPlot2d_Viewer.

References Plot2d_ViewFrame.Display(), Plot2d_ViewWindow.getViewFrame(), Plot2d_ViewWindow.initLayout(), and myPrs.

virtual QString Plot2d_Viewer.getType ( ) const [virtual]

Reimplemented from SUIT_ViewModel.

Reimplemented in SPlot2d_Viewer.

void Plot2d_Viewer::contextMenuPopup ( QMenu thePopup) [virtual]
Plot2d_Prs* Plot2d_Viewer.getPrs ( ) const
void Plot2d_Viewer::setPrs ( Plot2d_Prs thePrs)

Sets presentation of viewer

Parameters:
thePrs- new presentation

References clearPrs(), myAutoDel, myPrs, and Plot2d_Prs.setAutoDel().

void Plot2d_Viewer::update ( )
void Plot2d_Viewer::clearPrs ( )
void Plot2d_Viewer::setAutoDel ( bool  theDel)

Sets "auto delete" state of of presentation

Parameters:
theDel- new state

References myAutoDel, myPrs, and Plot2d_Prs.setAutoDel().

void Plot2d_Viewer.viewCloned ( SUIT_ViewWindow ) [signal]
void Plot2d_Viewer::onChangeBgColor ( ) [protected, slot]
void Plot2d_Viewer::onDumpView ( ) [protected, slot]

SLOT: called when action "Dump view" is activated

References SUIT_ViewManager.getActiveView(), SUIT_ViewModel.myViewManager, and Plot2d_ViewWindow.onDumpView().

void Plot2d_Viewer::onShowToolbar ( ) [protected, slot]

SLOT: called when action "Show toolbar" is activated

References SUIT_ViewManager.getActiveView(), Plot2d_ViewWindow.getToolBar(), and SUIT_ViewModel.myViewManager.

void Plot2d_Viewer::onCloneView ( Plot2d_ViewFrame clonedVF,
Plot2d_ViewFrame newVF 
) [protected, virtual, slot]
void Plot2d_Viewer::onLegendClicked ( QwtPlotItem plotItem) [protected, virtual, slot]

Reimplemented in SPlot2d_Viewer.

SUIT_ViewManager * SUIT_ViewModel::getViewManager ( ) const [inherited]

Get view manager.

Returns:
view manager

References SUIT_ViewModel.myViewManager.

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

Sets hot button

Parameters:
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.

Parameters:
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.


Field Documentation

bool Plot2d_Viewer.myAutoDel [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS