static int MYDEBUG = 0;
#endif
-//#define GENERATE_SUIT_EVENTS
+static bool GENERATE_SUIT_EVENTS = false;
+static bool FOCUS_UNDER_MOUSE = false;
//----------------------------------------------------------------------------
QVTK_RenderWindowInteractor
::mouseMoveEvent( QMouseEvent* event )
{
- if(qApp->focusWidget() != this)
+ if(FOCUS_UNDER_MOUSE && qApp->focusWidget() != this)
setFocus();
GetDevice()->SetEventInformationFlipY(event->x(),
::mouseMoveEvent( QMouseEvent* event )
{
QVTK_RenderWindowInteractor::mouseMoveEvent(event);
-#ifdef GENERATE_SUIT_EVENTS
- emit MouseMove( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit MouseMove( event );
}
::mousePressEvent( QMouseEvent* event )
{
QVTK_RenderWindowInteractor::mousePressEvent(event);
-#ifdef GENERATE_SUIT_EVENTS
- emit MouseButtonPressed( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit MouseButtonPressed( event );
}
::mouseReleaseEvent( QMouseEvent *event )
{
QVTK_RenderWindowInteractor::mouseReleaseEvent(event);
-#ifdef GENERATE_SUIT_EVENTS
- emit MouseButtonReleased( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit MouseButtonReleased( event );
}
::mouseDoubleClickEvent( QMouseEvent* event )
{
QVTK_RenderWindowInteractor::mouseDoubleClickEvent(event);
-#ifdef GENERATE_SUIT_EVENTS
- emit MouseDoubleClicked( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit MouseDoubleClicked( event );
}
GetDevice()->InvokeEvent(SVTK::ZoomInEvent,NULL);
else
GetDevice()->InvokeEvent(SVTK::ZoomOutEvent,NULL);
-#ifdef GENERATE_SUIT_EVENTS
- emit WheelMoved( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit WheelMoved( event );
}
::keyPressEvent( QKeyEvent* event )
{
QVTK_RenderWindowInteractor::keyPressEvent(event);
-#ifdef GENERATE_SUIT_EVENTS
- emit KeyPressed( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit KeyPressed( event );
}
//----------------------------------------------------------------------------
::keyReleaseEvent( QKeyEvent * event )
{
QVTK_RenderWindowInteractor::keyReleaseEvent(event);
-#ifdef GENERATE_SUIT_EVENTS
- emit KeyReleased( event );
-#endif
+
+ if(GENERATE_SUIT_EVENTS)
+ emit KeyReleased( event );
}
//----------------------------------------------------------------------------