SVTK_RenderWindowInteractor.h \
SVTK_Selector.h \
SVTK_Selection.h \
- SVTK_SelectionEvent.h
+ SVTK_SelectionEvent.h \
+ SVTK_ViewModelBase.h
# Libraries targets
LIB = libSVTK.la
SVTK_View.h \
SVTK_ViewWindow.h \
SVTK_ViewModel.h \
- SVTK_ViewManager.h
+ SVTK_ViewManager.h \
+ SVTK_ViewModelBase.h
LIB_CLIENT_IDL = SALOMEDS.idl \
SALOME_Exception.idl \
#include "SVTK_RenderWindowInteractor.h"
#include "SVTK_RenderWindow.h"
+#include "VTKViewer_ViewModel.h"
+
#include "ToolsGUI.h"
#include "SALOME_Actor.h"
if(SVTK_RenderWindow* aRW = aView->getView())
aRW->update();
}
-
-void
-SVTK_Viewer
-::onSelectionChanged()
-{
- emit selectionChanged();
-}
-
#define SVTK_VIEWMODEL_H
#include "SVTK.h"
+#include "SVTK_ViewModelBase.h"
+
#include "VTKViewer_ViewModel.h"
#include "SALOME_Prs.h"
#include <qcolor.h>
-class SVTK_EXPORT SVTK_Viewer : public SUIT_ViewModel, public SALOME_View
+class SVTK_ViewWindow;
+
+class SVTK_EXPORT SVTK_Viewer : public SVTK_ViewModelBase, public SALOME_View
{
Q_OBJECT;
public:
+ typedef SVTK_ViewWindow TViewWindow;
static QString Type() { return "VTKViewer"; }
SVTK_Viewer();
virtual bool isVisible( const Handle(SALOME_InteractiveObject)& );
virtual void Repaint();
- //implemented in SOCC, but were not found in VTKVIEwer_ViewFrame, so not implemented here..
- //?virtual void LocalSelection( const SALOME_OCCPrs*, const int );
- //?virtual void GlobalSelection( const bool = false ) const;
-
-public slots:
- void onSelectionChanged();
-
- signals:
- void selectionChanged();
-
protected slots:
void onMousePress(SUIT_ViewWindow*, QMouseEvent*);
void onMouseMove(SUIT_ViewWindow*, QMouseEvent*);
--- /dev/null
+#ifndef SVTK_SELECTIONCHANGED_H
+#define SVTK_SELECTIONCHANGED_H
+
+#include <qobject.h>
+
+#include "SVTK.h"
+#include "SUIT_ViewModel.h"
+
+class SVTK_EXPORT SVTK_ViewModelBase: public SUIT_ViewModel
+{
+ Q_OBJECT;
+
+public slots:
+ void onSelectionChanged()
+ {
+ emit selectionChanged();
+ }
+
+ signals:
+ void selectionChanged();
+};
+
+#endif
//#include "SVTK_View.h"
#include "SVTK_ViewWindow.h"
-#include "SVTK_ViewModel.h"
+#include "SVTK_ViewModelBase.h"
#include "SVTK_RenderWindowInteractor.h"
#include "SVTK_InteractorStyle.h"
//----------------------------------------------------------------------------
SVTK_ViewWindow
::SVTK_ViewWindow( SUIT_Desktop* theDesktop,
- SVTK_Viewer* theModel)
+ SVTK_ViewModelBase* theModel)
: SUIT_ViewWindow( theDesktop )
{
- myModel = theModel;
mySelector = new SVTK_SelectorDef();
connect(this,SIGNAL(selectionChanged()),theModel,SLOT(onSelectionChanged()));
class VTKViewer_Actor;
class VTKViewer_Trihedron;
-class SVTK_Viewer;
+class SVTK_ViewModelBase;
class SVTK_Selector;
//class SVTK_View;
Q_OBJECT
public:
- SVTK_ViewWindow( SUIT_Desktop*, SVTK_Viewer* );
+ SVTK_ViewWindow( SUIT_Desktop*, SVTK_ViewModelBase* );
virtual ~SVTK_ViewWindow();
void setBackgroundColor( const QColor& );
//void MoveActor( VTKViewer_Actor* theActor );
private:
- SVTK_Viewer* myModel;
SVTK_Selector* mySelector;
SVTK_View* myView;