SPlot2d_Viewer Class Reference

#include <SPlot2d_ViewModel.h>

Inheritance diagram for SPlot2d_Viewer:

Inheritance graph

Public Types

typedef QMap< HotOperation,
Qt::ButtonState > 
StatesMap
typedef QMap< HotOperation,
Qt::ButtonState > 
ButtonsMap
enum  HotOperation { PAN, ZOOM, ROTATE, FIT_AREA }

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)
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 void BeforeDisplay (SALOME_Displayer *d)
virtual void AfterDisplay (SALOME_Displayer *d)
virtual bool isVisible (const Handle(SALOME_InteractiveObject)&IObject)
SPlot2d_CurvegetCurveByIO (const Handle(SALOME_InteractiveObject)&, Plot2d_ViewFrame *=0)
Plot2d_ViewFramegetActiveViewFrame ()
 Handle (SALOME_InteractiveObject) FindIObject(const char *Entry)
virtual void setViewManager (SUIT_ViewManager *)
virtual SUIT_ViewWindowcreateView (SUIT_Desktop *theDesktop)
virtual void contextMenuPopup (QPopupMenu *)
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 bool isVisible (const Handle_SALOME_InteractiveObject &)

Static Public Member Functions

static QString Type ()
static void setHotButton (HotOperation theOper, Qt::ButtonState theState, Qt::ButtonState theButton)
static void getHotButton (HotOperation theOper, Qt::ButtonState &theState, Qt::ButtonState &theButton)

Static Public Attributes

static StatesMap myStateMap
static ButtonsMap myButtonMap

Protected Slots

virtual void onCloneView (Plot2d_ViewFrame *, Plot2d_ViewFrame *)
void onChangeBgColor ()
void onDumpView ()
void onShowToolbar ()

Protected Attributes

SUIT_ViewManagermyViewManager

Member Typedef Documentation

typedef QMap<HotOperation, Qt::ButtonState> SUIT_ViewModel.StatesMap [inherited]
 

typedef QMap<HotOperation, Qt::ButtonState> SUIT_ViewModel.ButtonsMap [inherited]
 


Member Enumeration Documentation

enum SUIT_ViewModel::HotOperation [inherited]
 

Enumerator:
PAN 
ZOOM 
ROTATE 
FIT_AREA 


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.

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
 

Renames curve if it is found

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

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

Returns true if interactive object is presented in the viewer

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

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

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>

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

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

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

Display presentation

Reimplemented from SALOME_View.

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

Erase presentation

Reimplemented from SALOME_View.

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

Removes all curves from the view

Reimplemented from SALOME_View.

void SPlot2d_Viewer::Repaint  )  [virtual]
 

Redraws Viewer contents

Reimplemented from SALOME_View.

SALOME_Prs * SPlot2d_Viewer::CreatePrs const char *  entry = 0  )  [virtual]
 

Create presentation by entry

Reimplemented from SALOME_View.

void SPlot2d_Viewer::BeforeDisplay SALOME_Displayer d  )  [virtual]
 

Axiluary method called before displaying of objects

Reimplemented from SALOME_View.

void SPlot2d_Viewer::AfterDisplay SALOME_Displayer d  )  [virtual]
 

Axiluary method called after displaying of objects

Reimplemented from SALOME_View.

bool SPlot2d_Viewer::isVisible const Handle(SALOME_InteractiveObject)&  IObject  )  [virtual]
 

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

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

Plot2d_ViewFrame * SPlot2d_Viewer::getActiveViewFrame  ) 
 

Returns an active Plot2d ViewFrame or NULL

SPlot2d_Viewer.Handle SALOME_InteractiveObject   )  const
 

void SPlot2d_Viewer::onCloneView Plot2d_ViewFrame clonedVF,
Plot2d_ViewFrame newVF
[protected, virtual, slot]
 

SLOT: called when action "Clone view" is activated

Reimplemented from Plot2d_Viewer.

void Plot2d_Viewer::setViewManager SUIT_ViewManager mgr  )  [virtual, inherited]
 

Sets view manager

Parameters:
mgr - new view manager

Reimplemented from SUIT_ViewModel.

SUIT_ViewWindow * Plot2d_Viewer::createView SUIT_Desktop theDesktop  )  [virtual, inherited]
 

Create new instance of view window on desktop theDesktop.

Return values:
SUIT_ViewWindow* - created view window pointer.

Reimplemented from SUIT_ViewModel.

void Plot2d_Viewer::contextMenuPopup QPopupMenu thePopup  )  [virtual, inherited]
 

Adds custom items to popup menu

Parameters:
thePopup - popup menu

Reimplemented from SUIT_ViewModel.

Plot2d_Prs* Plot2d_Viewer.getPrs  )  const [inherited]
 

void Plot2d_Viewer::setPrs Plot2d_Prs thePrs  )  [inherited]
 

Sets presentation of viewer

Parameters:
thePrs - new presentation

void Plot2d_Viewer::update  )  [inherited]
 

Updates current viewer

void Plot2d_Viewer::clearPrs  )  [inherited]
 

Clear viewer presentation

void Plot2d_Viewer::setAutoDel bool  theDel  )  [inherited]
 

Sets "auto delete" state of of presentation

Parameters:
theDel - new state

void Plot2d_Viewer::onChangeBgColor  )  [protected, slot, inherited]
 

SLOT: called when action "Change background" is activated

void Plot2d_Viewer::onDumpView  )  [protected, slot, inherited]
 

SLOT: called when action "Dump view" is activated

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

SLOT: called when action "Show toolbar" is activated

SUIT_ViewManager* SUIT_ViewModel.getViewManager  )  const [inherited]
 

void SUIT_ViewModel::setHotButton HotOperation  theOper,
Qt::ButtonState  theState,
Qt::ButtonState  theButton
[static, inherited]
 

Sets hot button

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

void SUIT_ViewModel::getHotButton HotOperation  theOper,
Qt::ButtonState &  theState,
Qt::ButtonState &  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.

void SALOME_View::Display const SALOME_Prs  )  [inherited]
 

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

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 ,
const   bool = false
[inherited]
 

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

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 ,
const   int
[inherited]
 

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

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.

virtual bool SALOME_View.isVisible const Handle_SALOME_InteractiveObject &   )  [virtual, inherited]
 

Return values:
Return false.


Field Documentation

SUIT_ViewManager* SUIT_ViewModel.myViewManager [protected, inherited]
 

SUIT_ViewModel::StatesMap SUIT_ViewModel::myStateMap [static, inherited]
 

SUIT_ViewModel::ButtonsMap SUIT_ViewModel::myButtonMap [static, inherited]