Changeset 617
- Timestamp:
- Nov 26, 2007, 6:10:35 PM (17 years ago)
- Location:
- trunk/geant4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/interfaces/basic/src/G4UIQt.cc
r615 r617 109 109 printf("G4UIQt::Initialise %d %s\n",argc,argv[0]); 110 110 #endif 111 printf("G4UIQt::Initialise ******\n");112 111 G4Qt* interactorManager = G4Qt::getInstance (argc,argv,(char*)"Qt"); 113 112 G4UImanager* UI = G4UImanager::GetUIpointer(); … … 129 128 #endif 130 129 131 QSplitter *splitter = new QSplitter(Qt::Vertical );130 QSplitter *splitter = new QSplitter(Qt::Vertical,fMainWindow); 132 131 133 132 // Set layouts … … 488 487 ) 489 488 { 489 #ifdef GEANT4_QT_DEBUG 490 printf("G4UIQt::AddMenu 1\n"); 491 #endif 490 492 if (aName == NULL) return; 491 493 if (aLabel == NULL) return; 492 494 495 #ifdef GEANT4_QT_DEBUG 496 printf("G4UIQt::AddMenu 2 %s %s\n",aName,aLabel); 497 #endif 493 498 #if QT_VERSION < 0x040000 494 499 QPopupMenu *fileMenu = new QPopupMenu( fMainWindow); … … 529 534 QSignalMapper *signalMapper = new QSignalMapper(this); 530 535 #if QT_VERSION < 0x040000 536 #if QT_VERSION < 0x030200 537 QAction *action = new QAction(QString(aLabel),QString(aLabel),QKeySequence::QKeySequence (),signalMapper, SLOT(map())); 538 #else 531 539 QAction *action = new QAction(QString(aLabel),QKeySequence::QKeySequence (),signalMapper, SLOT(map())); 540 #endif 532 541 action->addTo(parent); 533 542 #else … … 556 565 #if QT_VERSION < 0x040000 557 566 fHelpDialog = new QDialog(fMainWindow,0,FALSE,Qt::WStyle_Title | Qt::WStyle_SysMenu | Qt::WStyle_MinMax ); 558 #else 567 QVBoxLayout *vLayout = new QVBoxLayout(fHelpDialog); 568 QWidget* global = new QWidget(fHelpDialog); 569 #else 570 QVBoxLayout *vLayout = new QVBoxLayout(); 559 571 fHelpDialog = new QDialog(fMainWindow,Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint); 560 572 #endif 561 QSplitter *splitter = new QSplitter(Qt::Horizontal); 573 QSplitter *splitter = new QSplitter(Qt::Horizontal,fHelpDialog); 574 562 575 QPushButton *exitButton = new QPushButton("Exit",fMainWindow); 563 576 connect(exitButton, SIGNAL(clicked()), fHelpDialog,SLOT(close())); … … 574 587 fHelpTreeWidget->addColumn("Command"); 575 588 fHelpTreeWidget->addColumn("Description"); 576 fHelpTreeWidget-> hideColumn(1);589 fHelpTreeWidget->setColumnWidth (1,0); 577 590 fHelpTreeWidget->header()->setResizeEnabled(FALSE,1); 578 591 // QList<QListViewItem *> items; … … 643 656 // Set layouts 644 657 645 #if QT_VERSION < 0x040000 646 QVBoxLayout *vLayout = new QVBoxLayout(fHelpDialog); 647 #else 648 QVBoxLayout *vLayout = new QVBoxLayout; 658 #if QT_VERSION >= 0x040000 649 659 splitter->addWidget(fHelpTreeWidget); 650 660 splitter->addWidget(fHelpArea); … … 652 662 653 663 664 #if QT_VERSION < 0x040000 665 vLayout->addWidget(global); 666 #else 654 667 vLayout->addWidget(splitter); 668 #endif 655 669 vLayout->addWidget(exitButton); 656 670 #if QT_VERSION >= 0x040000 … … 1186 1200 ) 1187 1201 { 1188 #ifdef GEANT4_QT_DEBUG 1189 printf("G4UIQt::HelpTreeClicCallback"); 1190 #endif 1202 // printf("G4UIQt::HelpTreeClicCallback"); 1191 1203 #if QT_VERSION < 0x040000 1192 1204 QListViewItem* item = NULL; … … 1254 1266 QTreeWidgetItem* item 1255 1267 #endif 1256 ,int nb1268 ,int 1257 1269 ) 1258 1270 { -
trunk/geant4/interfaces/common/src/G4Qt.cc
r615 r617 29 29 // 30 30 // L. Garnier 31 32 #define GEANT4_QT_DEBUG33 31 34 32 #if defined(G4INTY_BUILD_QT) || defined(G4INTY_USE_QT) … … 101 99 #endif 102 100 #if QT_VERSION < 0x040000 103 // EN TESTqApp = new QApplication (a_argn, a_args);101 qApp = new QApplication (a_argn, a_args); 104 102 // QApplication qApp(a_argn, a_args); 105 103 // if(&qApp == NULL) { … … 124 122 } 125 123 #ifdef GEANT4_QT_DEBUG 126 //if (qApp) {124 if (qApp) { 127 125 printf("G4Qt::qApp exist\n"); 128 // =================== EN TEST ============== 129 new QApplication ( a_argn, a_args ); 130 131 QPushButton hello( "Hello world!", 0 ); 132 hello.resize( 100, 30 ); 133 134 qApp->setMainWidget( &hello ); 135 hello.show(); 136 qApp->exec(); 137 printf("G4Qt::qApp exist END\n"); 138 // =================== EN TEST ============== 139 // } else { 140 // printf("G4Qt::qApp not exist\n"); 141 // } 126 } else { 127 printf("G4Qt::qApp not exist\n"); 128 } 142 129 #endif 143 130 // AddDispatcher ((G4DispatchFunction)XtDispatchEvent); -
trunk/geant4/specific-geant4-dev.sh
r610 r617 27 27 export G4RADIOACTIVEDATA=$G4DATA/RadiativeDecay 28 28 export G4LEDATA=$G4DATA/G4EMLOW3.0 29 export QTHOME=/usr/local/Qt/3.3.8 29 # export QTHOME=/usr/local/Qt/3.3.8 30 export QTHOME=/usr/local/Qt/4.2.2 30 31 #////////////////////////////////////////////////////////// 31 32 # GUI, Visualization : -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r612 r617 320 320 Q_CHECK_PTR( mMouseAction ); 321 321 322 #if QT_VERSION < 0x030200 323 QAction *rotate = new QAction("&Rotate scene","&Rotate scene",CTRL+Key_N,mMouseAction); 324 QAction *move = new QAction("&Move scene","&Move scene",CTRL+Key_M,mMouseAction); 325 #else 322 326 QAction *rotate = new QAction("&Rotate scene",CTRL+Key_N,mMouseAction); 323 327 QAction *move = new QAction("&Move scene",CTRL+Key_M,mMouseAction); 328 #endif 324 329 rotate->addTo(mMouseAction); 325 330 move->addTo(mMouseAction); … … 344 349 QPopupMenu *mRepresentation = new QPopupMenu(fContextMenu); 345 350 351 #if QT_VERSION < 0x030200 352 QAction *polyhedron = new QAction("&Polyhedron","&Polyhedron",CTRL+Key_P,mRepresentation); 353 QAction *nurbs = new QAction("&NURBS","&NURBS",CTRL+Key_N,mRepresentation); 354 #else 346 355 QAction *polyhedron = new QAction("&Polyhedron",CTRL+Key_P,mRepresentation); 347 356 QAction *nurbs = new QAction("&NURBS",CTRL+Key_N,mRepresentation); 357 #endif 348 358 polyhedron->addTo(mRepresentation); 349 359 nurbs->addTo(mRepresentation); … … 488 498 mStyle->insertItem("&Background color",mBackground); 489 499 500 #if QT_VERSION < 0x030200 501 QAction *white = new QAction("&White","&White",CTRL+Key_W,mBackground); 502 QAction *black = new QAction("&Black","&Black",CTRL+Key_B,mBackground); 503 #else 490 504 QAction *white = new QAction("&White",CTRL+Key_W,mBackground); 491 505 QAction *black = new QAction("&Black",CTRL+Key_B,mBackground); 506 #endif 492 507 white->addTo(mBackground); 493 508 black->addTo(mBackground); … … 513 528 fContextMenu->insertItem("&Actions",mActions); 514 529 530 #if QT_VERSION < 0x030200 531 QAction *controlPanels = new QAction("&Control panels","&Control panels",CTRL+Key_C,mActions); 532 QAction *exitG4 = new QAction("&Exit to G4Vis >","&Exit to G4Vis >",CTRL+Key_E,mActions); 533 QAction *createEPS = new QAction("&Save as ...","&Save as ...",CTRL+Key_S,mActions); 534 #else 515 535 QAction *controlPanels = new QAction("&Control panels",CTRL+Key_C,mActions); 516 536 QAction *exitG4 = new QAction("&Exit to G4Vis >",CTRL+Key_E,mActions); 517 537 QAction *createEPS = new QAction("&Save as ...",CTRL+Key_S,mActions); 538 #endif 518 539 controlPanels->addTo(mActions); 519 540 exitG4->addTo(mActions); … … 562 583 mSpecial->insertItem("Transparency",mTransparency); 563 584 585 #if QT_VERSION < 0x030200 586 QAction *transparencyOn = new QAction("&On","&On",CTRL+Key_O,mTransparency); 587 QAction *transparencyOff = new QAction("&Off","&Off",CTRL+Key_F,mTransparency); 588 #else 564 589 QAction *transparencyOn = new QAction("&On",CTRL+Key_O,mTransparency); 565 590 QAction *transparencyOff = new QAction("&Off",CTRL+Key_F,mTransparency); 591 #endif 566 592 transparencyOn->addTo(mTransparency); 567 593 transparencyOff->addTo(mTransparency); … … 588 614 mSpecial->insertItem("Antialiasing",mAntialiasing); 589 615 616 #if QT_VERSION < 0x030200 617 QAction *antialiasingOn = new QAction("&On","&On",CTRL+Key_O,mAntialiasing); 618 QAction *antialiasingOff = new QAction("&Off","&Off",CTRL+Key_F,mAntialiasing); 619 #else 590 620 QAction *antialiasingOn = new QAction("&On",CTRL+Key_O,mAntialiasing); 591 621 QAction *antialiasingOff = new QAction("&Off",CTRL+Key_F,mAntialiasing); 622 #endif 592 623 antialiasingOn->addTo(mAntialiasing); 593 624 antialiasingOff->addTo(mAntialiasing); … … 611 642 mSpecial->insertItem("Haloing",mHaloing); 612 643 644 #if QT_VERSION < 0x030200 645 QAction *haloingOn = new QAction("&On","&On",CTRL+Key_O,mHaloing); 646 QAction *haloingOff = new QAction("&Off","&Off",CTRL+Key_F,mHaloing); 647 #else 613 648 QAction *haloingOn = new QAction("&On",CTRL+Key_O,mHaloing); 614 649 QAction *haloingOff = new QAction("&Off",CTRL+Key_F,mHaloing); 650 #endif 615 651 haloingOn->addTo(mHaloing); 616 652 haloingOff->addTo(mHaloing); … … 632 668 mSpecial->insertItem("Auxiliairy edges",mAux); 633 669 670 #if QT_VERSION < 0x030200 671 QAction *auxOn = new QAction("&On","&On",CTRL+Key_O,mAux); 672 QAction *auxOff = new QAction("&Off","&Off",CTRL+Key_F,mAux); 673 #else 634 674 QAction *auxOn = new QAction("&On",CTRL+Key_O,mAux); 635 675 QAction *auxOff = new QAction("&Off",CTRL+Key_F,mAux); 676 #endif 636 677 auxOn->addTo(mAux); 637 678 auxOff->addTo(mAux); … … 649 690 650 691 692 #if QT_VERSION >= 0x030200 651 693 #if QT_VERSION < 0x040000 652 694 QPopupMenu *mFullScreen = new QPopupMenu(mSpecial); … … 663 705 #endif 664 706 createRadioAction(fullOn,fullOff,SLOT(toggleFullScreen(bool)),2); 707 #endif 665 708 666 709 } … … 976 1019 */ 977 1020 void G4OpenGLQtViewer::toggleFullScreen(bool check) { 1021 #if QT_VERSION >= 0x030200 978 1022 GLWindow->setWindowState(GLWindow->windowState() ^ Qt::WindowFullScreen); 979 1023 #else 1024 G4cerr << "This version of G4UI Could not generate the selected format" << G4endl; 1025 #endif 980 1026 #ifdef GEANT4_QT_DEBUG 981 1027 printf("G4OpenGLQtViewer::toggleRepresentation %d\n",check); -
trunk/geant4/visualization/management/src/G4VisCommandsSceneHandler.cc
r593 r617 68 68 69 69 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 70 printf("G4VisCommandSceneHandlerCreate::SetNewValue 2\n"); 70 71 71 72 G4String& sceneName = newValue; … … 209 210 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 210 211 212 printf("G4VisCommandSceneHandlerCreate::SetNewValue 1\n"); 213 211 214 G4String graphicsSystem, newName; 212 215 std::istringstream is (newValue); … … 326 329 G4String newValue) { 327 330 G4String name, verbosityString; 331 printf("G4VisCommandSceneHandlerCreate::SetNewValue 3\n"); 328 332 std::istringstream is (newValue); 329 333 is >> name >> verbosityString; … … 390 394 391 395 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 396 printf("G4VisCommandSceneHandlerCreate::SetNewValue 4\n"); 392 397 393 398 G4String& selectName = newValue;
Note: See TracChangeset
for help on using the changeset viewer.