Salome HOME
View type definition
[modules/gui.git] / src / Plot2d / Plot2d_ViewModel.h
1 #if !defined(_PLOT2D_VIEWMODEL_H)
2 #define _PLOT2D_VIEWMODEL_H
3
4 #include "Plot2d.h"
5 #include "SUIT_ViewModel.h"
6 #include "SUIT_ViewWindow.h"
7 #include "SUIT_Desktop.h"
8 #include "SUIT_ViewManager.h"
9 #include "Plot2d_Prs.h"
10
11 #include <qstring.h>
12 #include <qpopupmenu.h>
13
14 class SUIT_ViewWindow;
15 class SUIT_Desktop;
16
17 class PLOT2D_EXPORT Plot2d_Viewer: public SUIT_ViewModel
18 {
19   Q_OBJECT
20
21 public:
22   static QString Type() { return "Plot2d"; }
23
24   Plot2d_Viewer(bool theAutoDel = false);
25   ~Plot2d_Viewer();
26
27   virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
28   virtual QString getType() const { return Type(); }
29   virtual void contextMenuPopup(QPopupMenu*);
30   Plot2d_Prs*  getPrs() const { return myPrs; };
31   void         setPrs(Plot2d_Prs* thePrs);
32   void         update();
33   void         clearPrs();
34   void         setAutoDel(bool theDel);
35
36 protected slots:
37   void onChangeBgColor();
38   void onDumpView();
39   void onShowToolbar();
40
41 private:
42   Plot2d_Prs* myPrs;
43   bool        myAutoDel;
44 };
45
46 #endif // !defined(_PLOT2D_VIEWMODEL_H)
47