Changeset 569 for trunk/geant4/visualization
- Timestamp:
- Aug 17, 2007, 5:27:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r568 r569 47 47 48 48 #include "G4Qt.hh" 49 #include "G4UIManager.hh" 49 #include "G4UIsession.hh" 50 #include "G4UImanager.hh" 50 51 #include <QtGui/qboxlayout.h> 51 52 #include <QtGui/qdialog.h> … … 86 87 // fWindow->resize(100, 300); 87 88 glFlush (); 89 GLWindow->show(); 88 90 printf("G4OpenGLQtViewer::ShowView -----------------------\n"); 89 91 … … 127 129 128 130 // create window 129 if (qApp) { 130 GLWindow = new QDialog();//qApp->mainWidget()); 131 if (((QApplication*)interactorManager->GetMainInteractor())) { 132 // look for the main window 133 bool found = false; 134 foreach (QWidget *widget, QApplication::allWidgets()) { 135 if ((found== false) && (widget->inherits("QMainWindow"))) { 136 GLWindow = new QDialog(widget); 137 found = true; 138 } 139 } 140 if (found==false) { 141 GLWindow = new QDialog(); 142 } 131 143 } else { 132 144 GLWindow = new QDialog(); … … 176 188 { 177 189 printf("G4OpenGLQtViewer::~G4OpenGLQtViewer \n"); 190 delete GLWindow; 178 191 delete fContextMenu; 179 192 } … … 618 631 619 632 void G4OpenGLQtViewer::actionCreateEPS() { 633 //QString QFileDialog::getSaveFileName ( QWidget * parent = 0, 634 // const QString & caption = QString(), 635 // const QString & dir = QString(), 636 // const QString & filter = QString(), 637 // QString * selectedFilter = 0, Options options = 0 ) 620 638 QString nomFich = QFileDialog::getSaveFileName(GLWindow, 621 639 "Choose a file", 622 ".", "Images (*.BMP *.GIF *.JPG *.JPEG *.PNG *.PBM *.PGM *.PPM *.TIFF *.XBM *.XPM)");640 ".", tr("Images (*.BMP *.GIF *.JPG *.JPEG *.PNG *.PBM *.PGM *.PPM *.TIFF *.XBM *.XPM)") ); 623 641 624 642 if(!nomFich.endsWith(".eps")) {
Note:
See TracChangeset
for help on using the changeset viewer.
