]> SALOME platform Git repositories - modules/gui.git/blob - src/SPlot2d/SPlot2d_ViewModel.h
Salome HOME
PAL9828 - regression of Plot2d legend
[modules/gui.git] / src / SPlot2d / SPlot2d_ViewModel.h
1 //  File   : SPlot2d_ViewModel.h
2 //  Author : Sergey RUIN
3 //  Module : SUIT
4
5 #ifndef SPlot2d_ViewModel_H
6 #define SPlot2d_ViewModel_H
7
8 #include "SPlot2d.h"  
9
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"
16
17 class SPLOT2D_EXPORT SPlot2d_Viewer : public Plot2d_Viewer, public SALOME_View
18
19   Q_OBJECT
20
21 public:
22   static QString Type() { return "Plot2d"; }
23
24   /* Construction/destruction */
25   SPlot2d_Viewer( bool theAutoDel = false );
26   virtual ~SPlot2d_Viewer();
27
28 public:
29   virtual QString          getType() const { return Type(); }
30
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)&, const QString&, Plot2d_ViewFrame* = 0 );
35   void renameAll( const Handle(SALOME_InteractiveObject)&, const QString& );
36   bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
37   
38   /* display */         
39   void Display( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
40   void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
41   void Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
42
43   /* Reimplemented from SALOME_View */
44   void                 Display( const SALOME_Prs2d* );
45   void                 Erase( const SALOME_Prs2d*, const bool = false );
46   virtual void         EraseAll(const bool = false);
47   virtual void         Repaint();
48   virtual SALOME_Prs*  CreatePrs( const char* entry = 0 );
49   virtual void         BeforeDisplay( SALOME_Displayer* d );
50   virtual void         AfterDisplay ( SALOME_Displayer* d );
51   virtual bool         isVisible( const Handle(SALOME_InteractiveObject)& IObject );
52
53
54   /* operations */
55   SPlot2d_Curve*                   getCurveByIO( const Handle(SALOME_InteractiveObject)&, Plot2d_ViewFrame* = 0 );
56   Plot2d_ViewFrame*                getActiveViewFrame();
57   Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
58
59 protected slots:
60   virtual void onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* );
61 };
62
63
64 #endif // SPlot2d_ViewModel_H
65
66
67
68