1 #ifndef SVTK_VIEWMODEL_H
2 #define SVTK_VIEWMODEL_H
5 #include "VTKViewer_ViewModel.h"
7 #include "SALOME_Prs.h"
8 #include "SALOME_InteractiveObject.hxx"
12 class SVTK_EXPORT SVTK_Viewer : public SUIT_ViewModel, public SALOME_View
17 static QString Type() { return "VTKViewer"; }
20 virtual ~SVTK_Viewer();
22 virtual SUIT_ViewWindow* createView(SUIT_Desktop*);
24 virtual void setViewManager(SUIT_ViewManager* theViewManager);
25 virtual void contextMenuPopup( QPopupMenu* );
26 virtual QString getType() const { return Type(); }
28 QColor backgroundColor() const;
29 void setBackgroundColor( const QColor& );
31 int trihedronSize() const;
32 void setTrihedronSize( const int );
35 void enableSelection(bool isEnabled);
36 bool isSelectionEnabled() const { return mySelectionEnabled; }
38 void enableMultiselection(bool isEnable);
39 bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; }
41 int getSelectionCount() const;
43 /* Reimplemented from SALOME_View */
44 void Display( const SALOME_VTKPrs* );
45 void Erase( const SALOME_VTKPrs*, const bool = false );
46 void EraseAll( const bool = false );
47 SALOME_Prs* CreatePrs( const char* entry = 0 );
48 virtual void BeforeDisplay( SALOME_Displayer* d );
49 virtual void AfterDisplay ( SALOME_Displayer* d );
50 virtual bool isVisible( const Handle(SALOME_InteractiveObject)& );
51 virtual void Repaint();
53 //implemented in SOCC, but were not found in VTKVIEwer_ViewFrame, so not implemented here..
54 //?virtual void LocalSelection( const SALOME_OCCPrs*, const int );
55 //?virtual void GlobalSelection( const bool = false ) const;
58 void onSelectionChanged();
61 void selectionChanged();
64 void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
65 void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
66 void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
70 void onChangeBgColor();
75 bool mySelectionEnabled;
76 bool myMultiSelectionEnabled;