Changeset 610 for trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
- Timestamp:
- Nov 22, 2007, 6:07:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r608 r610 36 36 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER 37 37 38 #define GEANT4_QT_DEBUG 39 38 40 #include "G4OpenGLQtViewer.hh" 39 41 … … 194 196 } 195 197 #endif 198 // FIXME : not tested in Qt4 199 glWidget->reparent(GLWindow,0,QPoint(0,0)); 196 200 197 201 if (found==false) { … … 224 228 GLWindow->resize(300, 300); 225 229 GLWindow->move(900,300); 230 #ifdef GEANT4_QT_DEBUG 231 printf("G4OpenGLQtViewer::Should show glWidget\n"); 232 #endif 226 233 GLWindow->show(); 227 234 … … 229 236 // GLWindow->setAttribute(Qt::WA_DeleteOnClose); 230 237 238 #if QT_VERSION >= 0x040000 231 239 QObject ::connect(GLWindow, 232 240 SIGNAL(rejected()), 233 241 this, 234 242 SLOT(dialogClosed())); 243 #endif 235 244 236 245 WinSize_x = 400; … … 251 260 } 252 261 262 #if QT_VERSION >= 0x040000 253 263 /** Close the dialog and set the pointer to NULL 254 264 */ 255 265 void 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 259 272 260 273 ////////////////////////////////////////////////////////////////////////////// … … 340 353 341 354 QMenu *mRepresentation = mStyle->addMenu("&Representation"); 342 355 QAction *polyhedron = mRepresentation->addAction("Polyhedron"); 343 356 QAction *nurbs = mRepresentation->addAction("NURBS"); 344 357 #endif … … 362 375 fDrawingWireframe = new QPopupMenu(mDrawing); 363 376 mDrawing->insertItem("&Wireframe",fDrawingWireframe); 377 #ifdef GEANT4_QT_DEBUG 378 printf("G4OpenGLQtViewer:: fDrawingWireframe creation\n"); 379 #endif 364 380 365 381 mDrawing->setCheckable(true); … … 410 426 mDrawing->clear(); 411 427 } 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())); 412 450 #else 413 451 if (d_style == G4ViewParameters::wireframe) { … … 422 460 mDrawing->clear(); 423 461 } 424 #endif425 426 462 QObject ::connect(fDrawingWireframe, 427 463 SIGNAL(triggered(bool)), … … 440 476 this, 441 477 SLOT(actionDrawingLineSurfaceRemoval())); 478 #endif 479 442 480 443 481 … … 477 515 exitG4->addTo(mActions); 478 516 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())); 479 529 480 530 #else … … 484 534 QAction *exitG4 = mActions->addAction("Exit to G4Vis >"); 485 535 QAction *createEPS = mActions->addAction("Save as ..."); 486 #endif487 488 536 QObject ::connect(controlPanels, 489 537 SIGNAL(triggered()), … … 498 546 this, 499 547 SLOT(actionCreateEPS())); 548 #endif 549 500 550 501 551 … … 653 703 ((QPopupMenu*)action1->parent())->setItemChecked(1,true); 654 704 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())); 657 708 658 709 QObject ::connect(action1, SIGNAL(toggled(bool)),this, method.c_str());
Note: See TracChangeset
for help on using the changeset viewer.