Salome HOME
Popup item "Dump view"
[modules/gui.git] / src / VTKViewer / VTKViewer_ViewModel.h
1 #ifndef VTKVIEWER_VIEWMODEL_H
2 #define VTKVIEWER_VIEWMODEL_H
3
4 #include "VTKViewer.h"
5 #include "SUIT_ViewModel.h"
6
7 class SUIT_ViewWindow;
8 class SUIT_Desktop;
9
10 class VTKVIEWER_EXPORT VTKViewer_Viewer: public SUIT_ViewModel
11 {
12   Q_OBJECT
13
14 public:
15   static QString Type() { return "VTKViewer"; }
16
17   VTKViewer_Viewer();
18   virtual ~VTKViewer_Viewer();
19
20   virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
21
22   virtual void             setViewManager(SUIT_ViewManager* theViewManager);
23   virtual void             contextMenuPopup( QPopupMenu* );
24   virtual QString          getType() const { return Type(); }
25
26 public:
27   void enableSelection(bool isEnabled);
28   bool isSelectionEnabled() const { return mySelectionEnabled; }
29
30   void enableMultiselection(bool isEnable);
31   bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; }
32
33   int  getSelectionCount() const;
34
35 signals:
36   void selectionChanged();
37
38 protected slots:
39   void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
40   void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
41   void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
42
43   void onDumpView();
44   void onShowToolbar();
45   void onChangeBgColor();
46
47 private:
48   bool mySelectionEnabled;
49   bool myMultiSelectionEnabled;
50 };
51
52 #endif