]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Alt key kode is inserted in SelectionEvent
authorsln <sln@opencascade.com>
Thu, 29 Nov 2007 17:23:08 +0000 (17:23 +0000)
committersln <sln@opencascade.com>
Thu, 29 Nov 2007 17:23:08 +0000 (17:23 +0000)
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_RenderWindowInteractor.cxx

index 7ba576467f3d96d3679d1553a68d70dd352f6a35..2c713e5d8f309d524e27632b1c268989b7e9226d 100644 (file)
@@ -216,6 +216,7 @@ SVTK_InteractorStyle
 
   mySelectionEvent->myIsCtrl = Interactor->GetControlKey();
   mySelectionEvent->myIsShift = Interactor->GetShiftKey();
+  mySelectionEvent->myKeyCode = Interactor->GetKeyCode();
 
   mySelectionEvent->myLastX = mySelectionEvent->myX;
   mySelectionEvent->myLastY = mySelectionEvent->myY;
index 647fbc5548f9f6f30cba258da30982a255c21bb8..19586728cfea11f0544f9591101013bdaeb6b32b 100644 (file)
@@ -238,10 +238,15 @@ void
 QVTK_RenderWindowInteractor
 ::mouseMoveEvent( QMouseEvent* event ) 
 {
+  int keyCode = 0;
+  if ( event->state() & AltButton )
+    keyCode = Qt::Key_Alt;
+  
   GetDevice()->SetEventInformationFlipY(event->x(), 
                                        event->y(),
                                        event->state() & ControlButton,
-                                       event->state() & ShiftButton);
+                                       event->state() & ShiftButton, 
+                                        keyCode );
   GetDevice()->MouseMoveEvent();
 }
 
@@ -253,16 +258,23 @@ void
 QVTK_RenderWindowInteractor
 ::mousePressEvent( QMouseEvent* event ) 
 {
+  int keyCode = 0;
+  if ( event->state() & AltButton )
+    keyCode = Qt::Key_Alt;
+  
   GetDevice()->SetEventInformationFlipY(event->x(), 
                                        event->y(),
                                        event->state() & ControlButton,
-                                       event->state() & ShiftButton);
+                                       event->state() & ShiftButton, 
+                                        keyCode );
   if( event->button() & LeftButton )
     GetDevice()->LeftButtonPressEvent();
   else if( event->button() & MidButton )
     GetDevice()->MiddleButtonPressEvent();
   else if( event->button() & RightButton )
     GetDevice()->RightButtonPressEvent();
+
+  // QKeyEvent
 }
 
 
@@ -273,10 +285,15 @@ void
 QVTK_RenderWindowInteractor
 ::mouseReleaseEvent( QMouseEvent *event )
 {
+  int keyCode = 0;
+  if ( event->state() & AltButton )
+    keyCode = Qt::Key_Alt;
+
   GetDevice()->SetEventInformationFlipY(event->x(), 
                                        event->y(),
                                        event->state() & ControlButton,
-                                       event->state() & ShiftButton);
+                                       event->state() & ShiftButton,
+                                        keyCode);
 
   if( event->button() & LeftButton )
     GetDevice()->LeftButtonReleaseEvent();