Ignore:
Timestamp:
Nov 22, 2007, 6:07:00 PM (17 years ago)
Author:
garnier
Message:

r661@mac-90108: laurentgarnier | 2007-11-22 18:10:43 +0100
en debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r608 r610  
    3636#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    3737
     38#define GEANT4_QT_DEBUG
     39
    3840#include "G4OpenGLQtViewer.hh"
    3941
     
    194196    }
    195197#endif
     198    // FIXME : not tested in Qt4
     199    glWidget->reparent(GLWindow,0,QPoint(0,0)); 
    196200
    197201    if (found==false) {
     
    224228  GLWindow->resize(300, 300);
    225229  GLWindow->move(900,300);
     230#ifdef GEANT4_QT_DEBUG
     231  printf("G4OpenGLQtViewer::Should show glWidget\n");
     232#endif
    226233  GLWindow->show();
    227234 
     
    229236  //  GLWindow->setAttribute(Qt::WA_DeleteOnClose);
    230237
     238#if QT_VERSION >= 0x040000
    231239  QObject ::connect(GLWindow,
    232240                    SIGNAL(rejected()),
    233241                    this,
    234242                    SLOT(dialogClosed()));
     243#endif
    235244
    236245  WinSize_x = 400;
     
    251260}
    252261
     262#if QT_VERSION >= 0x040000
    253263/**  Close the dialog and set the pointer to NULL
    254264 */
    255265void G4OpenGLQtViewer::dialogClosed() {
    256   GLWindow = NULL;
    257 }
    258 
     266#ifdef GEANT4_QT_DEBUG
     267  printf("G4OpenGLQtViewer::dialogClosed END\n");
     268#endif
     269  //  GLWindow = NULL;
     270}
     271#endif
    259272
    260273//////////////////////////////////////////////////////////////////////////////
     
    340353
    341354  QMenu *mRepresentation = mStyle->addMenu("&Representation");
    342   QAction *polyhedron = mRepresentation->addAction("Polyhedron");
     355 QAction *polyhedron = mRepresentation->addAction("Polyhedron");
    343356  QAction *nurbs = mRepresentation->addAction("NURBS");
    344357#endif
     
    362375  fDrawingWireframe = new QPopupMenu(mDrawing);
    363376  mDrawing->insertItem("&Wireframe",fDrawingWireframe);
     377#ifdef GEANT4_QT_DEBUG
     378  printf("G4OpenGLQtViewer:: fDrawingWireframe creation\n");
     379#endif
    364380
    365381  mDrawing->setCheckable(true);
     
    410426    mDrawing->clear();
    411427  }
     428#ifdef GEANT4_QT_DEBUG
     429  printf("G4OpenGLQtViewer:: fDrawingWireframe 1\n");
     430#endif
     431  QObject ::connect(fDrawingWireframe,
     432                    SIGNAL(activated(int)),
     433                    this,
     434                    SLOT(actionDrawingWireframe()));
     435#ifdef GEANT4_QT_DEBUG
     436  printf("G4OpenGLQtViewer:: fDrawingWireframe 2\n");
     437#endif
     438  QObject ::connect(fDrawingLineRemoval,
     439                    SIGNAL(activated(int)),
     440                    this,
     441                    SLOT(actionDrawingLineRemoval()));
     442  QObject ::connect(fDrawingSurfaceRemoval,
     443                    SIGNAL(activated(int)),
     444                    this,
     445                    SLOT(actionDrawingSurfaceRemoval()));
     446  QObject ::connect(fDrawingLineSurfaceRemoval,
     447                    SIGNAL(activated(int)),
     448                    this,
     449                    SLOT(actionDrawingLineSurfaceRemoval()));
    412450#else
    413451  if (d_style == G4ViewParameters::wireframe) {
     
    422460    mDrawing->clear();
    423461  }
    424 #endif
    425 
    426462  QObject ::connect(fDrawingWireframe,
    427463                    SIGNAL(triggered(bool)),
     
    440476                    this,
    441477                    SLOT(actionDrawingLineSurfaceRemoval()));
     478#endif
     479
    442480
    443481
     
    477515  exitG4->addTo(mActions);
    478516  createEPS->addTo(mActions);
     517  QObject ::connect(controlPanels,
     518                    SIGNAL(activated()),
     519                    this,
     520                    SLOT(actionControlPanels()));
     521  QObject ::connect(exitG4,
     522                    SIGNAL(activated()),
     523                    this,
     524                    SLOT(actionExitG4()));
     525  QObject ::connect(createEPS,
     526                    SIGNAL(activated()),
     527                    this,
     528                    SLOT(actionCreateEPS()));
    479529
    480530#else
     
    484534  QAction *exitG4 = mActions->addAction("Exit to G4Vis >");
    485535  QAction *createEPS = mActions->addAction("Save as ...");
    486 #endif
    487 
    488536  QObject ::connect(controlPanels,
    489537                    SIGNAL(triggered()),
     
    498546                    this,
    499547                    SLOT(actionCreateEPS()));
     548#endif
     549
    500550
    501551
     
    653703    ((QPopupMenu*)action1->parent())->setItemChecked(1,true);
    654704   
    655   QObject ::connect(action1, SIGNAL(triggered(bool)),action2, SLOT(toggle()));
    656   QObject ::connect(action2, SIGNAL(triggered(bool)),action1, SLOT(toggle()));
     705  //FIXME : Should not work on Qt3
     706  QObject ::connect(action1, SIGNAL(activated()),action2, SLOT(toggle()));
     707  QObject ::connect(action2, SIGNAL(activated()),action1, SLOT(toggle()));
    657708
    658709  QObject ::connect(action1, SIGNAL(toggled(bool)),this, method.c_str());
Note: See TracChangeset for help on using the changeset viewer.