1 #ifndef VVTK_VIEWMODEL_H
2 #define VVTK_VIEWMODEL_H
7 #include "SVTK_ViewModelBase.h"
9 #include "SALOME_Prs.h"
10 #include "SALOME_InteractiveObject.hxx"
12 class VVTK_ViewWindow;
14 //! Extends two interfaces #SVTK_ViewModelBase and #SALOME_View
15 class VVTK_EXPORT VVTK_Viewer : public SVTK_ViewModelBase, public SALOME_View
20 typedef VVTK_ViewWindow TViewWindow;
21 static QString Type() { return "VVTK"; }
24 virtual ~VVTK_Viewer();
26 //! Redefine SUIT_ViewModel::createView
27 virtual SUIT_ViewWindow* createView(SUIT_Desktop*);
29 //! Redefine SUIT_ViewModel::setViewManager
30 virtual void setViewManager(SUIT_ViewManager* theViewManager);
31 //! Redefine SUIT_ViewModel::contextMenuPopup
32 virtual void contextMenuPopup( QPopupMenu* );
33 //! See SUIT_ViewModel::getType
34 virtual QString getType() const { return Type(); }
36 //! Redefine SALOME_View::Repaint
37 virtual void Repaint();
39 //! Redefine SALOME_View::isVisible
40 virtual bool isVisible( const Handle(SALOME_InteractiveObject)& );
42 //! Get background color of the viewer
43 QColor backgroundColor() const;
45 //! Set background color to the viewer
46 void setBackgroundColor( const QColor& );
48 //! Get size of trihedron of the viewer (see SVTK_Renderer::SetTrihedronSize)
49 int trihedronSize() const;
51 //! Set size of trihedron of the viewer (see SVTK_Renderer::SetTrihedronSize)
52 void setTrihedronSize( const int );
55 void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
56 void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
57 void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
61 void onChangeBgColor();
66 bool mySelectionEnabled;
67 bool myMultiSelectionEnabled;