1 #ifndef VTKVIEWER_VIEWMODEL_H
2 #define VTKVIEWER_VIEWMODEL_H
5 #include "SUIT_ViewModel.h"
12 class VTKVIEWER_EXPORT VTKViewer_Viewer: public SUIT_ViewModel
17 /*!Initialize type of viewer.*/
18 static QString Type() { return "VTKViewer"; }
21 virtual ~VTKViewer_Viewer();
23 virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
25 virtual void setViewManager(SUIT_ViewManager* theViewManager);
26 virtual void contextMenuPopup( QPopupMenu* );
27 /*!Gets type of viewer.*/
28 virtual QString getType() const { return Type(); }
31 void enableSelection(bool isEnabled);
32 /*!Checks: is selection enabled*/
33 bool isSelectionEnabled() const { return mySelectionEnabled; }
35 void enableMultiselection(bool isEnable);
36 /*!Checks: is multi selection enabled*/
37 bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; }
39 int getSelectionCount() const;
41 QColor backgroundColor() const;
42 void setBackgroundColor( const QColor& );
45 void selectionChanged();
48 void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
49 void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
50 void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
54 void onChangeBgColor();
58 bool mySelectionEnabled;
59 bool myMultiSelectionEnabled;