Ignore:
Timestamp:
Oct 7, 2008, 5:35:57 AM (16 years ago)
Author:
garnier
Message:

add picking for Qt

Location:
trunk/source/visualization/OpenGL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh

    r857 r863  
    2525//
    2626//
    27 // $Id: G4OpenGLQtMovieDialog.hh,v 1.1 2008/03/10 16:57:04 lgarnier Exp $
     27// $Id: G4OpenGLQtMovieDialog.hh,v 1.3 2008/10/07 01:03:04 lgarnier Exp $
    2828// GEANT4 tag $Name:
    2929//
  • trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r858 r863  
    15311531  fLastPos3 = fLastPos2;
    15321532  fLastEventTime->start();
    1533   if (fMouseAction == STYLE2){  // pick
     1533  if (fMouseAction == STYLE3){  // pick
    15341534    Pick(p.x(),p.y());
    15351535  }
  • trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc

    r858 r863  
    5151  G4OpenGLStoredViewer (sceneHandler)             // FIXME : gerer le pb du parent !
    5252{
    53 #if QT_VERSION < 0x040000
    54   setFocusPolicy(QWidget::StrongFocus); // enable keybord events
    55 #else
    56   setFocusPolicy(Qt::StrongFocus); // enable keybord events
    57 #endif
    58   nbPaint =0;
    59   hasToRepaint =false;
    60 
    6153  // if no scene...
    6254  if (fSceneHandler.GetScene() == 0) {
     
    6557    return;
    6658  }
     59
     60  //set true to picking
     61  fVP.SetPicking(true);
     62#if QT_VERSION < 0x040000
     63  setFocusPolicy(QWidget::StrongFocus); // enable keybord events
     64#else
     65  setFocusPolicy(Qt::StrongFocus); // enable keybord events
     66#endif
     67  nbPaint =0;
     68  hasToRepaint =false;
     69
    6770  if (fViewId < 0) return;  // In case error in base class instantiation.
    6871}
Note: See TracChangeset for help on using the changeset viewer.