Changeset 602 for trunk/geant4/interfaces
- Timestamp:
- Nov 15, 2007, 11:55:45 AM (17 years ago)
- Location:
- trunk/geant4/interfaces
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/interfaces/basic/include/G4UIQt.hh
r595 r602 25 25 // 26 26 // 27 // $Id: G4UIQt.hh,v 1. 2 2007/11/08 17:00:09lgarnier Exp $27 // $Id: G4UIQt.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/geant4/interfaces/basic/src/G4UIQt.cc
r595 r602 25 25 // 26 26 // 27 // $Id: G4UIQt.cc,v 1. 3 2007/11/08 17:00:09lgarnier Exp $27 // $Id: G4UIQt.cc,v 1.4 2007/11/09 15:03:21 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 50 50 #include <qlineedit.h> 51 51 #include <qwidget.h> 52 #if QT_VERSION >= 0x040000 52 53 #include <qmenu.h> 54 #else 55 #include <qpopupmenu.h> 56 #endif 53 57 #include <qmenubar.h> 54 #include <q boxlayout.h>58 #include <qlayout.h> 55 59 #include <qpushbutton.h> 56 60 #include <qlabel.h> … … 717 721 } 718 722 } else if (e->key() == (Qt::Key_Tab)) { 723 #if QT_VERSION < 0x040000 724 G4String ss = Complete(fCommandArea->text().ascii()); 725 #else 719 726 G4String ss = Complete(fCommandArea->text().toStdString().c_str()); 727 #endif 720 728 fCommandArea->setText((char*)(ss.data())); 721 729 … … 762 770 ) 763 771 { 772 #if QT_VERSION < 0x040000 773 G4String command (fCommandArea->text().ascii()); 774 #else 764 775 G4String command (fCommandArea->text().toStdString().c_str()); 776 #endif 765 777 if (fCommandArea->text().trimmed() != "") { 766 778 fCommandHistoryArea->addItem(fCommandArea->text()); … … 793 805 ) 794 806 { 807 #if QT_VERSION < 0x040000 808 G4String ss = G4String(aCommand.ascii()); 809 #else 795 810 G4String ss = G4String(aCommand.toStdString().c_str()); 811 #endif 796 812 ApplyShellCommand(ss,exitSession,exitPause); 797 813 if(exitSession==true) … … 824 840 if(UI==NULL) return; 825 841 G4UIcommandTree * treeTop = UI->GetTree(); 842 #if QT_VERSION < 0x040000 843 G4UIcommand* command = treeTop->FindPath(item->text (1).ascii()); 844 #else 826 845 G4UIcommand* command = treeTop->FindPath(item->text (1).toStdString().c_str()); 846 #endif 827 847 if (command) { 828 848 fHelpArea->setText(GetCommandList(command)); … … 830 850 // this is not a command, this is a sub directory 831 851 // We display the Title 852 #if QT_VERSION < 0x040000 853 fHelpArea->setText(item->text (1).ascii()); 854 #else 832 855 fHelpArea->setText(item->text (1).toStdString().c_str()); 856 #endif 833 857 } 834 858 } -
trunk/geant4/interfaces/common/src/G4Qt.cc
r595 r602 25 25 // 26 26 // 27 // $Id: G4Qt.cc,v 1. 3 2007/11/08 17:00:09lgarnier Exp $27 // $Id: G4Qt.cc,v 1.4 2007/11/09 15:03:21 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 //
Note: See TracChangeset
for help on using the changeset viewer.