#include <SPlot2d_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 |
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_ViewWindow * | createView (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_Prs * | CreatePrs (const char *entry=0) |
| virtual bool | isVisible (const Handle(SALOME_InteractiveObject)&IObject) |
| virtual void | GetVisible (SALOME_ListIO &theList) |
| SPlot2d_Curve * | getCurveByIO (const Handle(SALOME_InteractiveObject)&, Plot2d_ViewFrame *=0) |
| Plot2d_ViewFrame * | getActiveViewFrame () |
| Handle (SALOME_InteractiveObject) FindIObject(const char *Entry) | |
| virtual void | setViewManager (SUIT_ViewManager *) |
| virtual void | contextMenuPopup (QMenu *) |
| Plot2d_Prs * | getPrs () const |
| void | setPrs (Plot2d_Prs *thePrs) |
| void | update () |
| void | clearPrs () |
| void | setAutoDel (bool theDel) |
| SUIT_ViewManager * | getViewManager () 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_ViewManager * | myViewManager |
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] |
| SPlot2d_Viewer::SPlot2d_Viewer | ( | bool | theAutoDel = false | ) |
Constructor
| SPlot2d_Viewer::~SPlot2d_Viewer | ( | ) | [virtual] |
Destructor
| 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 |
||
| ) |
Renames curve if it is found
References getActiveViewFrame(), Plot2d_ViewFrame.getCurves(), SPlot2d_Curve.hasIO(), SPlot2d_Curve.hasTableIO(), Plot2d_Object.setName(), Plot2d_Object.setVerTitle(), and Plot2d_ViewFrame.updateTitles().
| void SPlot2d_Viewer::renameAll | ( | const Handle(SALOME_InteractiveObject)& | IObj, |
| const QString & | name | ||
| ) |
Renames all copies of object in all view windows
| 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] |
create SPlot2d_ViewWindow
Reimplemented from Plot2d_Viewer.
References Plot2d_ViewFrame.Display(), Plot2d_Viewer.getPrs(), Plot2d_ViewWindow.getViewFrame(), and Plot2d_ViewWindow.initLayout().
| 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] |
Create presentation by entry
Reimplemented from SALOME_View.
References Plot2d_Prs.AddObject(), getActiveViewFrame(), Plot2d_ViewFrame.getCurves(), SPlot2d_Curve.getOwners(), SPlot2d_Curve.hasIO(), and SPlot2d_Curve.hasTableIO().
| 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
| 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 |
||
| ) |
| theIObject | - object |
| fr | - viewframe |
References getActiveViewFrame(), Plot2d_ViewFrame.getCurves(), and SPlot2d_Curve.hasIO().
| Plot2d_ViewFrame * SPlot2d_Viewer::getActiveViewFrame | ( | ) |
Returns an active Plot2d ViewFrame or NULL
References SUIT_ViewManager.getActiveView(), Plot2d_ViewWindow.getViewFrame(), and SUIT_ViewModel.getViewManager().
| 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
| mgr | - new view manager |
Reimplemented from SUIT_ViewModel.
References Plot2d_Viewer.onCloneView().
| void Plot2d_Viewer::contextMenuPopup | ( | QMenu * | thePopup | ) | [virtual, inherited] |
Adds custom items to popup menu
| thePopup | - popup menu |
Reimplemented from SUIT_ViewModel.
References Plot2d_ViewWindow.contextMenuPopup(), SUIT_ViewManager.getActiveView(), Plot2d_ViewWindow.getToolBar(), SUIT_ViewModel.myViewManager, Plot2d_Viewer.onChangeBgColor(), Plot2d_Viewer.onDumpView(), Plot2d_Viewer.onShowToolbar(), and Plot2d_ViewWindow.RefreshDumpImage().
| Plot2d_Prs* Plot2d_Viewer.getPrs | ( | ) | const [inherited] |
| void Plot2d_Viewer::setPrs | ( | Plot2d_Prs * | thePrs | ) | [inherited] |
Sets presentation of viewer
| thePrs | - new presentation |
References Plot2d_Viewer.clearPrs(), Plot2d_Viewer.myAutoDel, Plot2d_Viewer.myPrs, and Plot2d_Prs.setAutoDel().
| void Plot2d_Viewer::update | ( | ) | [inherited] |
Updates current viewer
References Plot2d_ViewFrame.Display(), Plot2d_ViewWindow.getViewFrame(), SUIT_ViewModel.getViewManager(), SUIT_ViewManager.getViews(), and Plot2d_Viewer.myPrs.
| void Plot2d_Viewer::clearPrs | ( | ) | [inherited] |
Clear viewer presentation
References Plot2d_ViewFrame.Erase(), Plot2d_ViewWindow.getViewFrame(), SUIT_ViewModel.getViewManager(), SUIT_ViewManager.getViews(), Plot2d_Viewer.myAutoDel, and Plot2d_Viewer.myPrs.
| void Plot2d_Viewer::setAutoDel | ( | bool | theDel | ) | [inherited] |
Sets "auto delete" state of of presentation
| 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] |
SLOT: called when action "Change background" is activated
References SUIT_ViewManager.getActiveView(), Plot2d_ViewWindow.getViewFrame(), SUIT_ViewModel.myViewManager, and Plot2d_ViewFrame.onChangeBackground().
| 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] |
SLOT: called when action "Clone view" is activated
References Plot2d_ViewFrame.copyPreferences(), Plot2d_ViewFrame.displayCurve(), Plot2d_ViewFrame.getCurves(), Plot2d_ViewFrame.isVisible(), Plot2d_ViewFrame.Repaint(), and Plot2d_Viewer.viewCloned().
| SUIT_ViewManager * SUIT_ViewModel::getViewManager | ( | ) | const [inherited] |
| 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.
| 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] |
References SALOME_Prs.BeforeDisplayIn().
| void SALOME_View::AfterDisplay | ( | SALOME_Displayer * | d, |
| const SALOME_Prs * | p | ||
| ) | [virtual, inherited] |
References SALOME_Prs.AfterDisplayIn().
| void SALOME_View::BeforeErase | ( | SALOME_Displayer * | d, |
| const SALOME_Prs * | p | ||
| ) | [virtual, inherited] |
References SALOME_Prs.BeforeEraseIn().
| void SALOME_View::AfterErase | ( | SALOME_Displayer * | d, |
| const SALOME_Prs * | p | ||
| ) | [virtual, inherited] |
References SALOME_Prs.AfterEraseIn().
| virtual bool SALOME_View.isVisible | ( | const Handle_SALOME_InteractiveObject & | ) | [virtual, inherited] |
| Return | false. |
SUIT_ViewManager* SUIT_ViewModel.myViewManager [protected, inherited] |
SUIT_ViewModel::InteractionStyle2StatesMap SUIT_ViewModel::myStateMap [static, inherited] |
SUIT_ViewModel::InteractionStyle2ButtonsMap SUIT_ViewModel::myButtonMap [static, inherited] |