static int MYDEBUG = 0;
#endif
+//#define GENERATE_SUIT_EVENTS
//----------------------------------------------------------------------------
vtkStandardNewMacro(QtRenderWindowInteractor);
//
// Start a one-shot timer for 10ms.
//
- myTimer->start(10, TRUE) ;
- return 1 ;
+ myTimer->start(1,TRUE);
+ return 1;
}
int
// the models in low-res mode after the mouse stops
// moving.
//
- return 1 ;
+ return 1;
}
myInteractor->UpdateSize(width(),height());
- if(true || aWidth && aHeight){
+ if(aWidth && aHeight){
if( aWidth != width() || aHeight != height() ) {
vtkRendererCollection * aRenderers = GetRenderWindow()->GetRenderers();
aRenderers->InitTraversal();
::InitInteractorStyle(SVTK_InteractorStyle* theStyle)
{
GetDevice()->SetInteractorStyle(theStyle);
- theStyle->FindPokedRenderer(0,0);
theStyle->SetSelector(GetSelector());
theStyle->SetRenderWidget(this);
::mouseMoveEvent( QMouseEvent* event )
{
QVTK_RenderWindowInteractor::mouseMoveEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit MouseMove( event );
+#endif
}
::mousePressEvent( QMouseEvent* event )
{
QVTK_RenderWindowInteractor::mousePressEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit MouseButtonPressed( event );
+#endif
}
::mouseReleaseEvent( QMouseEvent *event )
{
QVTK_RenderWindowInteractor::mouseReleaseEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit MouseButtonReleased( event );
+#endif
}
::mouseDoubleClickEvent( QMouseEvent* event )
{
QVTK_RenderWindowInteractor::mouseDoubleClickEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit MouseDoubleClicked( event );
+#endif
}
::wheelEvent( QWheelEvent* event )
{
QVTK_RenderWindowInteractor::wheelEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit WheelMoved( event );
+#endif
}
::keyPressEvent( QKeyEvent* event )
{
QVTK_RenderWindowInteractor::keyPressEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit KeyPressed( event );
+#endif
}
//----------------------------------------------------------------------------
::keyReleaseEvent( QKeyEvent * event )
{
QVTK_RenderWindowInteractor::keyReleaseEvent(event);
-
+#ifdef GENERATE_SUIT_EVENTS
emit KeyReleased( event );
+#endif
}
//----------------------------------------------------------------------------