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"
10 class SVTK_EXPORT SVTK_Viewer : public SUIT_ViewModel, public SALOME_View
15 static QString Type() { return "VTKViewer"; }
18 virtual ~SVTK_Viewer();
20 virtual SUIT_ViewWindow* createView(SUIT_Desktop*);
22 virtual void setViewManager(SUIT_ViewManager* theViewManager);
23 virtual void contextMenuPopup( QPopupMenu* );
24 virtual QString getType() const { return Type(); }
27 void enableSelection(bool isEnabled);
28 bool isSelectionEnabled() const { return mySelectionEnabled; }
30 void enableMultiselection(bool isEnable);
31 bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; }
33 int getSelectionCount() const;
35 /* Reimplemented from SALOME_View */
36 void Display( const SALOME_VTKPrs* );
37 void Erase( const SALOME_VTKPrs*, const bool = false );
38 void EraseAll( const bool = false );
39 SALOME_Prs* CreatePrs( const char* entry = 0 );
40 virtual void BeforeDisplay( SALOME_Displayer* d );
41 virtual void AfterDisplay ( SALOME_Displayer* d );
42 virtual bool isVisible( const Handle(SALOME_InteractiveObject)& );
43 virtual void Repaint();
45 //implemented in SOCC, but were not found in VTKVIEwer_ViewFrame, so not implemented here..
46 //?virtual void LocalSelection( const SALOME_OCCPrs*, const int );
47 //?virtual void GlobalSelection( const bool = false ) const;
50 void onSelectionChanged();
53 void selectionChanged();
56 void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
57 void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
58 void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
62 void onChangeBgColor();
65 bool mySelectionEnabled;
66 bool myMultiSelectionEnabled;