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

SPlot2d_Viewer Class Reference

#include <SPlot2d_ViewModel.h>

Inheritance diagram for SPlot2d_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 legendSelected (const QString &)
void viewCloned (SUIT_ViewWindow *)

Public Member Functions

 SPlot2d_Viewer (bool theAutoDel=false)
virtual ~SPlot2d_Viewer ()
virtual QString getType () const
void highlight (const Handle(SALOME_InteractiveObject)&IObject, bool highlight, bool update=true)
void unHighlightAll ()
void rename (const Handle(SALOME_InteractiveObject)&, const QString &, Plot2d_ViewFrame *=0)
void renameAll (const Handle(SALOME_InteractiveObject)&, const QString &)
bool isInViewer (const Handle(SALOME_InteractiveObject)&IObject)
virtual SUIT_ViewWindowcreateView (SUIT_Desktop *theDesktop)
void Display (const Handle(SALOME_InteractiveObject)&IObject, bool update=true)
void DisplayOnly (const Handle(SALOME_InteractiveObject)&IObject)
void Erase (const Handle(SALOME_InteractiveObject)&IObject, bool update=true)
void Display (const SALOME_Prs2d *)
void Erase (const SALOME_Prs2d *, const bool=false)
virtual void EraseAll (const bool=false)
virtual void Repaint ()
virtual SALOME_PrsCreatePrs (const char *entry=0)
virtual bool isVisible (const Handle(SALOME_InteractiveObject)&IObject)
virtual void GetVisible (SALOME_ListIO &theList)
SPlot2d_CurvegetCurveByIO (const Handle(SALOME_InteractiveObject)&, Plot2d_ViewFrame *=0)
Plot2d_ViewFramegetActiveViewFrame ()
 Handle (SALOME_InteractiveObject) FindIObject(const char *Entry)
virtual void setViewManager (SUIT_ViewManager *)
virtual void contextMenuPopup (QMenu *)
Plot2d_PrsgetPrs () const
void setPrs (Plot2d_Prs *thePrs)
void update ()
void clearPrs ()
void setAutoDel (bool theDel)
SUIT_ViewManagergetViewManager () const
void Display (const SALOME_Prs *)
 This Display() method should be called to display given presentation created anywhere by anybody.
virtual void Display (const SALOME_OCCPrs *)
 Display SALOME_OCCPrs presentation.
virtual void Display (const SALOME_VTKPrs *)
 Display SALOME_VTKPrs presentation.
void Erase (const SALOME_Prs *, const bool=false)
 This Erase() method should be called to erase given presentation created anywhere by anybody.
virtual void Erase (const SALOME_OCCPrs *, const bool=false)
 Erase SALOME_OCCPrs.
virtual void Erase (const SALOME_VTKPrs *, const bool=false)
 Erase SALOME_VTKPrs.
void LocalSelection (const SALOME_Prs *, const int)
 This LocalSelection() method should be called to activate sub-shapes selection created anywhere by anybody.
virtual void LocalSelection (const SALOME_OCCPrs *, const int)
 Local selection SALOME_OCCPrs.
virtual void LocalSelection (const SALOME_VTKPrs *, const int)
 Local selection SALOME_VTKPrs.
virtual void LocalSelection (const SALOME_Prs2d *, const int)
 Local selection SALOME_Prs2d.
virtual void GlobalSelection (const bool=false) const
 Deactivates selection of sub-shapes (must be redefined with OCC viewer)
virtual void BeforeDisplay (SALOME_Displayer *, const SALOME_Prs *)
virtual void AfterDisplay (SALOME_Displayer *, const SALOME_Prs *)
virtual void BeforeErase (SALOME_Displayer *, const SALOME_Prs *)
virtual void AfterErase (SALOME_Displayer *, const SALOME_Prs *)
virtual bool isVisible (const Handle_SALOME_InteractiveObject &)

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

virtual void onLegendClicked (QwtPlotItem *plotItem)
void onChangeBgColor ()
void onDumpView ()
void onShowToolbar ()
virtual void onCloneView (Plot2d_ViewFrame *, Plot2d_ViewFrame *)

Protected Attributes

SUIT_ViewManagermyViewManager

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

SPlot2d_Viewer::SPlot2d_Viewer ( bool  theAutoDel = false)

Constructor

SPlot2d_Viewer::~SPlot2d_Viewer ( ) [virtual]

Destructor


Member Function Documentation

static QString SPlot2d_Viewer.Type ( ) [static]

Reimplemented from Plot2d_Viewer.

virtual QString SPlot2d_Viewer.getType ( ) const [virtual]

Reimplemented from Plot2d_Viewer.

References Plot2d_Viewer.Type().

void SPlot2d_Viewer.highlight ( const Handle(SALOME_InteractiveObject)&  IObject,
bool  highlight,
bool  update = true 
)
void SPlot2d_Viewer.unHighlightAll ( )
void SPlot2d_Viewer::rename ( const Handle(SALOME_InteractiveObject)&  IObject,
const QString &  newName,
Plot2d_ViewFrame fr = 0 
)
void SPlot2d_Viewer::renameAll ( const Handle(SALOME_InteractiveObject)&  IObj,
const QString &  name 
)

Renames all copies of object in all view windows

Parameters:
IObj- object to be renamed
name- new name

References Plot2d_ViewWindow.getViewFrame(), SUIT_ViewModel.getViewManager(), SUIT_ViewManager.getViews(), and rename().

bool SPlot2d_Viewer::isInViewer ( const Handle(SALOME_InteractiveObject)&  IObject)

Returns true if interactive object is presented in the viewer

References getActiveViewFrame(), getCurveByIO(), Plot2d_ViewFrame.getCurves(), and SPlot2d_Curve.hasIO().

SUIT_ViewWindow * SPlot2d_Viewer::createView ( SUIT_Desktop theDesktop) [virtual]
void SPlot2d_Viewer::Display ( const Handle(SALOME_InteractiveObject)&  IObject,
bool  update = true 
)

Actually this method just re-displays curves which refers to the <IObject>

References getActiveViewFrame(), getCurveByIO(), and Plot2d_ViewFrame.updateCurve().

void SPlot2d_Viewer::DisplayOnly ( const Handle(SALOME_InteractiveObject)&  IObject)

Actually this method just erases all curves which don't refer to <IOBject> and re-displays curve which is of <IObject>

References Plot2d_ViewFrame.eraseCurve(), getActiveViewFrame(), getCurveByIO(), Plot2d_ViewFrame.getCurves(), Plot2d_ViewFrame.Repaint(), and Plot2d_ViewFrame.updateCurve().

void SPlot2d_Viewer::Erase ( const Handle(SALOME_InteractiveObject)&  IObject,
bool  update = true 
)

Removes from the viewer the curves which refer to <IObject>

References Plot2d_ViewFrame.eraseCurve(), getActiveViewFrame(), and getCurveByIO().

void SPlot2d_Viewer::Display ( const SALOME_Prs2d prs) [virtual]

Display presentation

Reimplemented from SALOME_View.

References Plot2d_ViewFrame.Display(), and getActiveViewFrame().

void SPlot2d_Viewer::Erase ( const SALOME_Prs2d prs,
const bool  = false 
) [virtual]

Erase presentation

Reimplemented from SALOME_View.

References Plot2d_ViewFrame.Erase(), and getActiveViewFrame().

void SPlot2d_Viewer::EraseAll ( const bool  = false) [virtual]

Removes all curves from the view

Reimplemented from SALOME_View.

References Plot2d_ViewFrame.EraseAll(), and getActiveViewFrame().

void SPlot2d_Viewer::Repaint ( ) [virtual]

Redraws Viewer contents

Reimplemented from SALOME_View.

References getActiveViewFrame(), and Plot2d_ViewFrame.Repaint().

SALOME_Prs * SPlot2d_Viewer::CreatePrs ( const char *  entry = 0) [virtual]
bool SPlot2d_Viewer::isVisible ( const Handle(SALOME_InteractiveObject)&  IObject) [virtual]

Returns true if interactive object is presented in the viewer and displayed

References getActiveViewFrame(), getCurveByIO(), and Plot2d_ViewFrame.isVisible().

void SPlot2d_Viewer::GetVisible ( SALOME_ListIO theList) [virtual]

objects visible in viewer

Parameters:
theList- visible objects collection

Reimplemented from SALOME_View.

References SALOME_ListIO.Append(), getActiveViewFrame(), Plot2d_ViewFrame.getCurves(), SPlot2d_Curve.hasIO(), and Plot2d_ViewFrame.isVisible().

SPlot2d_Curve * SPlot2d_Viewer::getCurveByIO ( const Handle(SALOME_InteractiveObject)&  theIObject,
Plot2d_ViewFrame fr = 0 
)
Returns:
curve by object and viewframe
Parameters:
theIObject- object
fr- viewframe

References getActiveViewFrame(), Plot2d_ViewFrame.getCurves(), and SPlot2d_Curve.hasIO().

Plot2d_ViewFrame * SPlot2d_Viewer::getActiveViewFrame ( )
SPlot2d_Viewer.Handle ( SALOME_InteractiveObject  ) const
void SPlot2d_Viewer::onLegendClicked ( QwtPlotItem plotItem) [protected, virtual, slot]

SLOT: called when action "Legend Clicked" is activated. override "onLegendClicked" method from Plot2d_ViewModel.

Reimplemented from Plot2d_Viewer.

References getActiveViewFrame(), Plot2d_ViewFrame.getPlotObject(), and legendSelected().

void SPlot2d_Viewer.legendSelected ( const QString &  ) [signal]
void Plot2d_Viewer::setViewManager ( SUIT_ViewManager mgr) [virtual, inherited]

Sets view manager

Parameters:
mgr- new view manager

Reimplemented from SUIT_ViewModel.

References Plot2d_Viewer.onCloneView().

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

Sets presentation of viewer

Parameters:
thePrs- new presentation

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

void Plot2d_Viewer::update ( ) [inherited]
void Plot2d_Viewer::clearPrs ( ) [inherited]
void Plot2d_Viewer::setAutoDel ( bool  theDel) [inherited]

Sets "auto delete" state of of presentation

Parameters:
theDel- new state

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

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

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, inherited]

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, inherited]
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.

void SALOME_View::Display ( const SALOME_Prs prs) [inherited]

It simply passes control to SALOME_Prs object so that it could perform double dispatch.

Gives control to SALOME_Prs object, so that it could perform double dispatch

References SALOME_Prs.DisplayIn().

void SALOME_View::Display ( const SALOME_OCCPrs ) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

Reimplemented in SOCC_Viewer.

void SALOME_View::Display ( const SALOME_VTKPrs ) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

Reimplemented in SVTK_Viewer.

void SALOME_View::Erase ( const SALOME_Prs prs,
const bool  forced = false 
) [inherited]

It simply passes control to SALOME_Prs object so that it could perform double dispatch.

Gives control to SALOME_Prs object, so that it could perform double dispatch

References SALOME_Prs.EraseIn().

void SALOME_View::Erase ( const SALOME_OCCPrs ,
const bool  = false 
) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

Reimplemented in SOCC_Viewer.

void SALOME_View::Erase ( const SALOME_VTKPrs ,
const bool  = false 
) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

Reimplemented in SVTK_Viewer.

void SALOME_View::LocalSelection ( const SALOME_Prs prs,
const int  mode 
) [inherited]

It simply passes control to SALOME_Prs object so that it could perform double dispatch.

Gives control to SALOME_Prs object, so that it could perform double dispatch

References SALOME_Prs.LocalSelectionIn().

void SALOME_View::LocalSelection ( const SALOME_OCCPrs ,
const int   
) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

Reimplemented in SOCC_Viewer.

void SALOME_View::LocalSelection ( const SALOME_VTKPrs ,
const int   
) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

void SALOME_View::LocalSelection ( const SALOME_Prs2d ,
const int   
) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

void SALOME_View::GlobalSelection ( const bool  = false) const [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

Reimplemented in SOCC_Viewer.

void SALOME_View::BeforeDisplay ( SALOME_Displayer d,
const SALOME_Prs p 
) [virtual, inherited]
void SALOME_View::AfterDisplay ( SALOME_Displayer d,
const SALOME_Prs p 
) [virtual, inherited]
void SALOME_View::BeforeErase ( SALOME_Displayer d,
const SALOME_Prs p 
) [virtual, inherited]
void SALOME_View::AfterErase ( SALOME_Displayer d,
const SALOME_Prs p 
) [virtual, inherited]
virtual bool SALOME_View.isVisible ( const Handle_SALOME_InteractiveObject &  ) [virtual, inherited]
Return values:
Returnfalse.

Field Documentation

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