Salome HOME
1f52c8933855530404ea64808b0b245c480611ba
[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
7 class SUIT_ViewWindow;
8 class SUIT_Desktop;
9 class Plot2d_ViewFrame;
10 class Plot2d_Prs;
11 class QString;
12 class QPopupMenu;
13
14 class PLOT2D_EXPORT Plot2d_Viewer: public SUIT_ViewModel
15 {
16   Q_OBJECT
17
18 public:
19   static QString Type() { return "Plot2d"; }
20
21   Plot2d_Viewer(bool theAutoDel = false);
22   ~Plot2d_Viewer();
23
24   virtual void             setViewManager( SUIT_ViewManager* );
25   virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
26   virtual QString getType() const { return Type(); }
27   virtual void contextMenuPopup(QPopupMenu*);
28   Plot2d_Prs*  getPrs() const { return myPrs; };
29   void         setPrs(Plot2d_Prs* thePrs);
30   void         update();
31   void         clearPrs();
32   void         setAutoDel(bool theDel);
33
34 protected slots:
35   void onChangeBgColor();
36   void onDumpView();
37   void onShowToolbar();
38   virtual void onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* );
39
40 private:
41   Plot2d_Prs* myPrs;
42   bool        myAutoDel;
43 };
44
45 #endif // !defined(_PLOT2D_VIEWMODEL_H)
46