1 // File : SPlot2d_ViewModel.h
2 // Author : Sergey RUIN
5 #ifndef SPlot2d_ViewModel_H
6 #define SPlot2d_ViewModel_H
10 #include "SALOME_Prs.h"
11 #include "Plot2d_ViewModel.h"
12 #include "SALOME_InteractiveObject.hxx"
13 #include "Plot2d_ViewFrame.h"
14 #include "Plot2d_ViewWindow.h"
15 #include "SPlot2d_Curve.h"
17 class SPLOT2D_EXPORT SPlot2d_Viewer : public Plot2d_Viewer, public SALOME_View
22 static QString Type() { return "Plot2d"; }
24 /* Construction/destruction */
25 SPlot2d_Viewer( bool theAutoDel = false );
26 virtual ~SPlot2d_Viewer();
29 virtual QString getType() const { return Type(); }
31 /* interactive object management */
32 void highlight( const Handle(SALOME_InteractiveObject)& IObject, bool highlight, bool update = true ) {}
33 void unHighlightAll() {}
34 void rename( const Handle(SALOME_InteractiveObject)& IObject, QString newName );
35 bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
38 void Display( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
39 void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
40 void Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
42 /* Reimplemented from SALOME_View */
43 void Display( const SALOME_Prs2d* );
44 void Erase( const SALOME_Prs2d*, const bool = false );
45 virtual void EraseAll(const bool = false);
46 virtual void Repaint();
47 virtual SALOME_Prs* CreatePrs( const char* entry = 0 );
48 virtual void BeforeDisplay( SALOME_Displayer* d );
49 virtual void AfterDisplay ( SALOME_Displayer* d );
50 virtual bool isVisible( const Handle(SALOME_InteractiveObject)& IObject );
54 SPlot2d_Curve* getCurveByIO( const Handle(SALOME_InteractiveObject)& theIObject );
55 Plot2d_ViewFrame* getActiveViewFrame();
56 Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
59 virtual void onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* );
63 #endif // SPlot2d_ViewModel_H