Changeset 648
- Timestamp:
- Dec 7, 2007, 5:13:09 PM (17 years ago)
- Location:
- trunk/geant4
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/interfaces/GNUmakefile
r476 r648 13 13 14 14 GLOBLIBS = libG4intercoms.lib libG4global.lib 15 16 # Definition of macro for moc files (for Qt use only) 17 MOC_MACRO = -D G4UI_BUILD_QT_SESSION 15 18 16 19 include $(G4INSTALL)/config/architecture.gmk -
trunk/geant4/interfaces/basic/GNUmakefile
r609 r648 8 8 G4INSTALL = ../../.. 9 9 endif 10 11 # Definition of macro for moc files (for Qt use only) 12 MOC_MACRO = -D G4UI_BUILD_QT_SESSION 10 13 11 14 include $(G4INSTALL)/config/architecture.gmk -
trunk/geant4/interfaces/basic/include/G4UIArrayString.hh
r631 r648 26 26 // 27 27 // $Id: G4UIArrayString.hh,v 1.3 2006/06/29 19:09:27 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/interfaces/basic/include/G4UIQt.hh
r633 r648 149 149 void ButtonCallback(const QString&); 150 150 void HelpTreeClicCallback(); 151 #if QT_VERSION < 0x040000 152 void HelpTreeDoubleClicCallback( QListViewItem*); 153 #else 154 void HelpTreeDoubleClicCallback( QTreeWidgetItem*); 155 #endif 151 void HelpTreeDoubleClicCallback(); 156 152 void ShowHelpCallback(); 157 153 void CommandHistoryCallback(); -
trunk/geant4/interfaces/basic/include/G4UIWin32.hh
r631 r648 26 26 // 27 27 // $Id: G4UIWin32.hh,v 1.14 2006/06/29 19:09:29 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 #ifndef G4UIWin32_h -
trunk/geant4/interfaces/basic/include/G4UIXaw.hh
r631 r648 26 26 // 27 27 // $Id: G4UIXaw.hh,v 1.6 2006/06/29 19:09:31 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 #ifndef G4UIXaw_h -
trunk/geant4/interfaces/basic/include/G4UIXm.hh
r631 r648 26 26 // 27 27 // $Id: G4UIXm.hh,v 1.13 2006/06/29 19:09:33 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 #ifndef G4UIXm_h -
trunk/geant4/interfaces/basic/include/G4UIcsh.hh
r631 r648 26 26 // 27 27 // $Id: G4UIcsh.hh,v 1.4 2006/06/29 19:09:35 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/interfaces/basic/include/G4UItcsh.hh
r631 r648 26 26 // 27 27 // $Id: G4UItcsh.hh,v 1.8 2007/06/14 05:44:58 kmura Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/interfaces/basic/include/G4UIterminal.hh
r631 r648 25 25 // 26 26 // $Id: G4UIterminal.hh,v 1.10 2007/05/22 01:51:05 kmura Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 28 28 // 29 29 // ==================================================================== -
trunk/geant4/interfaces/basic/include/G4VUIshell.hh
r631 r648 26 26 // 27 27 // $Id: G4VUIshell.hh,v 1.7 2007/06/14 05:44:58 kmura Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/interfaces/basic/src/G4UIArrayString.cc
r630 r648 26 26 // 27 27 // $Id: G4UIArrayString.cc,v 1.8 2006/06/29 19:09:43 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/interfaces/basic/src/G4UIQt.cc
r635 r648 605 605 } 606 606 607 607 608 #if QT_VERSION < 0x040000 608 609 connect(fHelpTreeWidget, SIGNAL(selectionChanged ()),this, SLOT(HelpTreeClicCallback())); 609 connect(fHelpTreeWidget, SIGNAL(doubleClicked (QListViewItem*)),this, SLOT(HelpTreeDoubleClicCallback( QListViewItem*)));610 connect(fHelpTreeWidget, SIGNAL(doubleClicked (QListViewItem*)),this, SLOT(HelpTreeDoubleClicCallback())); 610 611 #else 611 612 connect(fHelpTreeWidget, SIGNAL(itemSelectionChanged ()),this, SLOT(HelpTreeClicCallback())); 612 connect(fHelpTreeWidget, SIGNAL(itemDoubleClicked (QTreeWidgetItem*,int)),this, SLOT(HelpTreeDoubleClicCallback( QTreeWidgetItem*)));613 connect(fHelpTreeWidget, SIGNAL(itemDoubleClicked (QTreeWidgetItem*,int)),this, SLOT(HelpTreeDoubleClicCallback())); 613 614 #endif 614 615 … … 1236 1237 */ 1237 1238 void G4UIQt::HelpTreeDoubleClicCallback ( 1238 #if QT_VERSION < 0x0400001239 QListViewItem* item1240 #else1241 QTreeWidgetItem* item1242 #endif1243 1239 ) 1244 1240 { 1245 1241 HelpTreeClicCallback(); 1246 fCommandArea->setText(item->text (1)); 1242 1243 #if QT_VERSION < 0x040000 1244 QListViewItem* item = NULL; 1245 #else 1246 QTreeWidgetItem* item = NULL; 1247 #endif 1248 if (!fHelpTreeWidget) 1249 return ; 1250 1251 if (!fHelpArea) 1252 return; 1253 1254 #if QT_VERSION < 0x040000 1255 item =fHelpTreeWidget->selectedItem(); 1256 #else 1257 QList<QTreeWidgetItem *> list =fHelpTreeWidget->selectedItems(); 1258 if (list.isEmpty()) 1259 return; 1260 item = list.first(); 1261 #endif 1262 if (!item) 1263 return; 1264 1265 #if QT_VERSION >= 0x040000 1266 #if QT_VERSION < 0x040200 1267 fCommandArea->clear(); 1268 fCommandArea->append(item->text(1)); 1269 #else 1270 fCommandArea->setText(item->text(1)); 1271 #endif 1272 #else 1273 fCommandArea->setText(item->text(1)); 1274 #endif 1247 1275 } 1248 1276 -
trunk/geant4/interfaces/basic/src/G4UIQt_moc.cc
r633 r648 1 /****************************************************************************2 ** G4UIQt meta object code from reading C++ file 'G4UIQt.hh'3 **4 ** Created: Tue Nov 13 18:13:09 20075 ** by: The Qt MOC ($Id: G4UIQt_moc.cc,v 1.9 2007/11/30 14:28:50 lgarnier Exp $)6 **7 ** WARNING! All changes made in this file will be lost!8 *****************************************************************************/9 10 #ifdef G4UI_BUILD_QT_SESSION11 12 #undef QT_NO_COMPAT13 #include "../include/G4UIQt.hh"14 #include <qmetaobject.h>15 #include <qapplication.h>16 17 #if defined(Q_MOC_OUTPUT_REVISION) && (Q_MOC_OUTPUT_REVISION == 26)18 19 #include <private/qucomextra_p.h>20 #if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)21 #error "This file was generated using the moc from 3.3.8. It"22 #error "cannot be used with the include files from this version of Qt."23 #error "(The moc has changed too much.)"24 #endif25 26 const char *G4UIQt::className() const27 {28 return "G4UIQt";29 }30 31 QMetaObject *G4UIQt::metaObj = 0;32 static QMetaObjectCleanUp cleanUp_G4UIQt( "G4UIQt", &G4UIQt::staticMetaObject );33 34 #ifndef QT_NO_TRANSLATION35 QString G4UIQt::tr( const char *s, const char *c )36 {37 if ( qApp )38 return qApp->translate( "G4UIQt", s, c, QApplication::DefaultCodec );39 else40 return QString::fromLatin1( s );41 }42 #ifndef QT_NO_TRANSLATION_UTF843 QString G4UIQt::trUtf8( const char *s, const char *c )44 {45 if ( qApp )46 return qApp->translate( "G4UIQt", s, c, QApplication::UnicodeUTF8 );47 else48 return QString::fromUtf8( s );49 }50 #endif // QT_NO_TRANSLATION_UTF851 52 #endif // QT_NO_TRANSLATION53 54 QMetaObject* G4UIQt::staticMetaObject()55 {56 if ( metaObj )57 return metaObj;58 QMetaObject* parentObject = QObject::staticMetaObject();59 static const QUMethod slot_0 = {"ExitSession", 0, 0 };60 static const QUMethod slot_1 = {"ClearButtonCallback", 0, 0 };61 static const QUMethod slot_2 = {"CommandEnteredCallback", 0, 0 };62 static const QUParameter param_slot_3[] = {63 { 0, &static_QUType_QString, 0, QUParameter::In }64 };65 static const QUMethod slot_3 = {"ButtonCallback", 1, param_slot_3 };66 static const QUMethod slot_4 = {"HelpTreeClicCallback", 0, 0 };67 static const QUParameter param_slot_5[] = {68 { 0, &static_QUType_ptr, "QListViewItem", QUParameter::In }69 };70 static const QUMethod slot_5 = {"HelpTreeDoubleClicCallback", 1, param_slot_5 };71 static const QUMethod slot_6 = {"ShowHelpCallback", 0, 0 };72 static const QUMethod slot_7 = {"CommandHistoryCallback", 0, 0 };73 static const QMetaData slot_tbl[] = {74 { "ExitSession()", &slot_0, QMetaData::Private },75 { "ClearButtonCallback()", &slot_1, QMetaData::Private },76 { "CommandEnteredCallback()", &slot_2, QMetaData::Private },77 { "ButtonCallback(const QString&)", &slot_3, QMetaData::Private },78 { "HelpTreeClicCallback()", &slot_4, QMetaData::Private },79 { "HelpTreeDoubleClicCallback(QListViewItem*)", &slot_5, QMetaData::Private },80 { "ShowHelpCallback()", &slot_6, QMetaData::Private },81 { "CommandHistoryCallback()", &slot_7, QMetaData::Private }82 };83 static const QUParameter param_signal_0[] = {84 { "text", &static_QUType_QString, 0, QUParameter::In }85 };86 static const QUMethod signal_0 = {"myClicked", 1, param_signal_0 };87 static const QMetaData signal_tbl[] = {88 { "myClicked(const QString&)", &signal_0, QMetaData::Private }89 };90 metaObj = QMetaObject::new_metaobject(91 "G4UIQt", parentObject,92 slot_tbl, 8,93 signal_tbl, 1,94 #ifndef QT_NO_PROPERTIES95 0, 0,96 0, 0,97 #endif // QT_NO_PROPERTIES98 0, 0 );99 cleanUp_G4UIQt.setMetaObject( metaObj );100 return metaObj;101 }102 103 void* G4UIQt::qt_cast( const char* clname )104 {105 if ( !qstrcmp( clname, "G4UIQt" ) )106 return this;107 if ( !qstrcmp( clname, "G4VBasicShell" ) )108 return (G4VBasicShell*)this;109 if ( !qstrcmp( clname, "G4VInteractiveSession" ) )110 return (G4VInteractiveSession*)this;111 return QObject::qt_cast( clname );112 }113 114 // SIGNAL myClicked115 void G4UIQt::myClicked( const QString& t0 )116 {117 activate_signal( staticMetaObject()->signalOffset() + 0, t0 );118 }119 120 bool G4UIQt::qt_invoke( int _id, QUObject* _o )121 {122 switch ( _id - staticMetaObject()->slotOffset() ) {123 case 0: ExitSession(); break;124 case 1: ClearButtonCallback(); break;125 case 2: CommandEnteredCallback(); break;126 case 3: ButtonCallback((const QString&)static_QUType_QString.get(_o+1)); break;127 case 4: HelpTreeClicCallback(); break;128 case 5: HelpTreeDoubleClicCallback((QListViewItem*)static_QUType_ptr.get(_o+1)); break;129 case 6: ShowHelpCallback(); break;130 case 7: CommandHistoryCallback(); break;131 default:132 return QObject::qt_invoke( _id, _o );133 }134 return TRUE;135 }136 137 bool G4UIQt::qt_emit( int _id, QUObject* _o )138 {139 switch ( _id - staticMetaObject()->signalOffset() ) {140 case 0: myClicked((const QString&)static_QUType_QString.get(_o+1)); break;141 default:142 return QObject::qt_emit(_id,_o);143 }144 return TRUE;145 }146 #ifndef QT_NO_PROPERTIES147 148 bool G4UIQt::qt_property( int id, int f, QVariant* v)149 {150 return QObject::qt_property( id, f, v);151 }152 153 bool G4UIQt::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }154 #endif // QT_NO_PROPERTIES155 156 157 #endif158 #endif159 160 161 #if defined(Q_MOC_OUTPUT_REVISION) && (Q_MOC_OUTPUT_REVISION == 58)162 163 1 /**************************************************************************** 164 2 ** Meta object code from reading C++ file 'G4UIQt.hh' 165 3 ** 166 ** Created: jeu. 22. nov. 13:59:012007167 ** by: The Qt Meta Object Compiler version 5 8 (Qt 4.0.1)4 ** Created: Fri Dec 7 17:04:54 2007 5 ** by: The Qt Meta Object Compiler version 59 (Qt 4.2.2) 168 6 ** 169 7 ** WARNING! All changes made in this file will be lost! … … 173 11 #if !defined(Q_MOC_OUTPUT_REVISION) 174 12 #error "The header file 'G4UIQt.hh' doesn't include <QObject>." 175 #elif Q_MOC_OUTPUT_REVISION != 5 8176 #error "This file was generated using the moc from 4. 0.1. It"13 #elif Q_MOC_OUTPUT_REVISION != 59 14 #error "This file was generated using the moc from 4.2.2. It" 177 15 #error "cannot be used with the include files from this version of Qt." 178 16 #error "(The moc has changed too much.)" … … 185 23 0, // classname 186 24 0, 0, // classinfo 187 8, 10, // methods25 9, 10, // methods 188 26 0, 0, // properties 189 27 0, 0, // enums/sets 190 28 191 29 // signals: signature, parameters, type, tag, flags 192 13, 8, 7, 7, 0x05,30 7, 26, 31, 31, 0x05, 193 31 194 32 // slots: signature, parameters, type, tag, flags 195 32, 7, 7, 7, 0x08, 196 46, 7, 7, 7, 0x08, 197 68, 7, 7, 7, 0x08, 198 93, 7, 7, 7, 0x08, 199 117, 7, 7, 7, 0x08, 200 140, 7, 7, 7, 0x08, 201 159, 7, 7, 7, 0x08, 33 32, 31, 31, 31, 0x08, 34 46, 31, 31, 31, 0x08, 35 68, 31, 31, 31, 0x08, 36 93, 31, 31, 31, 0x08, 37 117, 31, 31, 31, 0x08, 38 140, 31, 31, 31, 0x08, 39 169, 31, 31, 31, 0x08, 40 188, 31, 31, 31, 0x08, 202 41 203 42 0 // eod … … 205 44 206 45 static const char qt_meta_stringdata_G4UIQt[] = { 207 "G4UIQt\0\0text\0myClicked(QString)\0ExitSession()\0" 208 "ClearButtonCallback()\0CommandEnteredCallback()\0" 209 "ButtonCallback(QString)\0HelpTreeClicCallback()\0ShowHelpCallback()\0" 210 "CommandHistoryCallback()\0" 46 "G4UIQt\0myClicked(QString)\0text\0\0" 47 "ExitSession()\0ClearButtonCallback()\0" 48 "CommandEnteredCallback()\0" 49 "ButtonCallback(QString)\0HelpTreeClicCallback()\0" 50 "HelpTreeDoubleClicCallback()\0" 51 "ShowHelpCallback()\0CommandHistoryCallback()\0" 211 52 }; 212 53 … … 240 81 if (_c == QMetaObject::InvokeMetaMethod) { 241 82 switch (_id) { 242 case 0: myClicked(*(QString*)_a[1]); break;243 case 1: ExitSession(); break;244 case 2: ClearButtonCallback(); break;245 case 3: CommandEnteredCallback(); break;246 case 4: ButtonCallback(*(QString*)_a[1]); break;247 case 5: HelpTreeClicCallback(); break;248 case 6: ShowHelpCallback(); break;249 case 7: CommandHistoryCallback(); break;250 }251 _id -= 8;252 }253 return _id;254 }255 256 // SIGNAL 0257 void G4UIQt::myClicked(const QString & _t1)258 {259 void *_a[] = { 0, (void*)&_t1 };260 QMetaObject::activate(this, &staticMetaObject, 0, _a);261 }262 #else263 264 #if defined(Q_MOC_OUTPUT_REVISION) && (Q_MOC_OUTPUT_REVISION == 59)265 266 /****************************************************************************267 ** Meta object code from reading C++ file 'G4UIQt.hh'268 **269 ** Created: Mon Oct 1 10:59:35 2007270 ** by: The Qt Meta Object Compiler version 59 (Qt 4.2.2)271 **272 ** WARNING! All changes made in this file will be lost!273 *****************************************************************************/274 275 276 277 #include "../include/G4UIQt.hh"278 #if !defined(Q_MOC_OUTPUT_REVISION)279 #error "The header file 'G4UIQt.hh' doesn't include <QObject>."280 #elif Q_MOC_OUTPUT_REVISION != 59281 #error "This file was generated using the moc from 4.2.2. It"282 #error "cannot be used with the include files from this version of Qt."283 #error "(The moc has changed too much.)"284 #endif285 286 static const uint qt_meta_data_G4UIQt[] = {287 288 // content:289 1, // revision290 0, // classname291 0, 0, // classinfo292 9, 10, // methods293 0, 0, // properties294 0, 0, // enums/sets295 296 // signals: signature, parameters, type, tag, flags297 7, 26, 31, 31, 0x05,298 299 // slots: signature, parameters, type, tag, flags300 32, 31, 31, 31, 0x08,301 46, 31, 31, 31, 0x08,302 68, 31, 31, 31, 0x08,303 93, 31, 31, 31, 0x08,304 117, 31, 31, 31, 0x08,305 140, 31, 31, 31, 0x08,306 185, 31, 31, 31, 0x08,307 204, 31, 31, 31, 0x08,308 309 0 // eod310 };311 312 static const char qt_meta_stringdata_G4UIQt[] = {313 "G4UIQt\0myClicked(QString)\0text\0\0"314 "ExitSession()\0ClearButtonCallback()\0"315 "CommandEnteredCallback()\0"316 "ButtonCallback(QString)\0HelpTreeClicCallback()\0"317 "HelpTreeDoubleClicCallback(QTreeWidgetItem*)\0"318 "ShowHelpCallback()\0CommandHistoryCallback()\0"319 };320 321 const QMetaObject G4UIQt::staticMetaObject = {322 { &QObject::staticMetaObject, qt_meta_stringdata_G4UIQt,323 qt_meta_data_G4UIQt, 0 }324 };325 326 const QMetaObject *G4UIQt::metaObject() const327 {328 return &staticMetaObject;329 }330 331 void *G4UIQt::qt_metacast(const char *_clname)332 {333 if (!_clname) return 0;334 if (!strcmp(_clname, qt_meta_stringdata_G4UIQt))335 return static_cast<void*>(const_cast< G4UIQt*>(this));336 if (!strcmp(_clname, "G4VBasicShell"))337 return static_cast< G4VBasicShell*>(const_cast< G4UIQt*>(this));338 if (!strcmp(_clname, "G4VInteractiveSession"))339 return static_cast< G4VInteractiveSession*>(const_cast< G4UIQt*>(this));340 return QObject::qt_metacast(_clname);341 }342 343 int G4UIQt::qt_metacall(QMetaObject::Call _c, int _id, void **_a)344 {345 _id = QObject::qt_metacall(_c, _id, _a);346 if (_id < 0)347 return _id;348 if (_c == QMetaObject::InvokeMetaMethod) {349 switch (_id) {350 83 case 0: myClicked((*reinterpret_cast< const QString(*)>(_a[1]))); break; 351 84 case 1: ExitSession(); break; … … 354 87 case 4: ButtonCallback((*reinterpret_cast< const QString(*)>(_a[1]))); break; 355 88 case 5: HelpTreeClicCallback(); break; 356 case 6: HelpTreeDoubleClicCallback( (*reinterpret_cast< QTreeWidgetItem*(*)>(_a[1]))); break;89 case 6: HelpTreeDoubleClicCallback(); break; 357 90 case 7: ShowHelpCallback(); break; 358 91 case 8: CommandHistoryCallback(); break; … … 369 102 QMetaObject::activate(this, &staticMetaObject, 0, _a); 370 103 } 371 372 #endif373 374 #endif -
trunk/geant4/interfaces/basic/src/G4UIWin32.cc
r630 r648 26 26 // 27 27 // $Id: G4UIWin32.cc,v 1.13 2006/06/29 19:09:45 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 // G.Barrand -
trunk/geant4/interfaces/basic/src/G4UIXaw.cc
r630 r648 26 26 // 27 27 // $Id: G4UIXaw.cc,v 1.6 2006/06/29 19:09:47 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 // G.Barrand -
trunk/geant4/interfaces/basic/src/G4UIXm.cc
r630 r648 26 26 // 27 27 // $Id: G4UIXm.cc,v 1.14 2006/06/29 19:09:49 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 // G.Barrand -
trunk/geant4/interfaces/basic/src/G4UIcsh.cc
r630 r648 26 26 // 27 27 // $Id: G4UIcsh.cc,v 1.8 2006/06/29 19:09:51 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/interfaces/basic/src/G4VUIshell.cc
r630 r648 26 26 // 27 27 // $Id: G4VUIshell.cc,v 1.10 2007/06/14 05:44:58 kmura Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-00-ref-01 $ 29 29 // 30 30 -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
r644 r648 1 1 // 2 2 // ******************************************************************** 3 3 // * License and Disclaimer *
Note: See TracChangeset
for help on using the changeset viewer.