Changeset 606 for trunk/geant4/interfaces/basic
- Timestamp:
- Nov 15, 2007, 11:56:03 AM (17 years ago)
- Location:
- trunk/geant4/interfaces/basic
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/interfaces/basic/include/G4UIQt.hh
r603 r606 25 25 // 26 26 // 27 // $Id: G4UIQt.hh,v 1. 3 2007/11/09 15:03:21 lgarnier Exp $27 // $Id: G4UIQt.hh,v 1.4 2007/11/13 17:48:51 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 148 148 void ButtonCallback(const QString&); 149 149 void HelpTreeClicCallback(); 150 #if QT_VERSION < 0x040000 151 void HelpTreeDoubleClicCallback( QListViewItem*, int); 152 #else 150 153 void HelpTreeDoubleClicCallback( QTreeWidgetItem*, int); 154 #endif 151 155 void ShowHelpCallback(); 152 156 void CommandHistoryCallback(); -
trunk/geant4/interfaces/basic/src/G4UIQt_moc.cc
r593 r606 1 /**************************************************************************** 2 ** G4UIQt meta object code from reading C++ file 'G4UIQt.hh' 3 ** 4 ** Created: Tue Nov 13 18:13:09 2007 5 ** by: The Qt MOC ($Id: G4UIQt_moc.cc,v 1.6 2007/11/14 10:38:49 lgarnier Exp $) 6 ** 7 ** WARNING! All changes made in this file will be lost! 8 *****************************************************************************/ 9 10 #ifdef G4UI_BUILD_QT_SESSION 11 12 #undef QT_NO_COMPAT 13 #include "../include/G4UIQt.hh" 14 #include <qmetaobject.h> 15 #include <qapplication.h> 16 17 #if QT_VERSION < 0x040000 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.5. It" 22 #error "cannot be used with the include files from this version of Qt." 23 #error "(The moc has changed too much.)" 24 #endif 25 26 const char *G4UIQt::className() const 27 { 28 return "G4UIQt"; 29 } 30 31 QMetaObject *G4UIQt::metaObj = 0; 32 static QMetaObjectCleanUp cleanUp_G4UIQt( "G4UIQt", &G4UIQt::staticMetaObject ); 33 34 #ifndef QT_NO_TRANSLATION 35 QString G4UIQt::tr( const char *s, const char *c ) 36 { 37 if ( qApp ) 38 return qApp->translate( "G4UIQt", s, c, QApplication::DefaultCodec ); 39 else 40 return QString::fromLatin1( s ); 41 } 42 #ifndef QT_NO_TRANSLATION_UTF8 43 QString G4UIQt::trUtf8( const char *s, const char *c ) 44 { 45 if ( qApp ) 46 return qApp->translate( "G4UIQt", s, c, QApplication::UnicodeUTF8 ); 47 else 48 return QString::fromUtf8( s ); 49 } 50 #endif // QT_NO_TRANSLATION_UTF8 51 52 #endif // QT_NO_TRANSLATION 53 54 QMetaObject* G4UIQt::staticMetaObject() 55 { 56 if ( metaObj ) 57 return metaObj; 58 QMetaObject* parentObject = QObject::staticMetaObject(); 59 static const QUMethod slot_0 = {"ClearButtonCallback", 0, 0 }; 60 static const QUMethod slot_1 = {"CommandEnteredCallback", 0, 0 }; 61 static const QUParameter param_slot_2[] = { 62 { 0, &static_QUType_QString, 0, QUParameter::In } 63 }; 64 static const QUMethod slot_2 = {"ButtonCallback", 1, param_slot_2 }; 65 static const QUMethod slot_3 = {"HelpTreeClicCallback", 0, 0 }; 66 static const QUParameter param_slot_4[] = { 67 { 0, &static_QUType_ptr, "QTreeWidgetItem", QUParameter::In }, 68 { 0, &static_QUType_int, 0, QUParameter::In } 69 }; 70 static const QUMethod slot_4 = {"HelpTreeDoubleClicCallback", 2, param_slot_4 }; 71 static const QUMethod slot_5 = {"ShowHelpCallback", 0, 0 }; 72 static const QUMethod slot_6 = {"CommandHistoryCallback", 0, 0 }; 73 static const QMetaData slot_tbl[] = { 74 { "ClearButtonCallback()", &slot_0, QMetaData::Private }, 75 { "CommandEnteredCallback()", &slot_1, QMetaData::Private }, 76 { "ButtonCallback(const QString&)", &slot_2, QMetaData::Private }, 77 { "HelpTreeClicCallback()", &slot_3, QMetaData::Private }, 78 { "HelpTreeDoubleClicCallback(QTreeWidgetItem*,int)", &slot_4, QMetaData::Private }, 79 { "ShowHelpCallback()", &slot_5, QMetaData::Private }, 80 { "CommandHistoryCallback()", &slot_6, QMetaData::Private } 81 }; 82 static const QUParameter param_signal_0[] = { 83 { "text", &static_QUType_QString, 0, QUParameter::In } 84 }; 85 static const QUMethod signal_0 = {"myClicked", 1, param_signal_0 }; 86 static const QMetaData signal_tbl[] = { 87 { "myClicked(const QString&)", &signal_0, QMetaData::Private } 88 }; 89 metaObj = QMetaObject::new_metaobject( 90 "G4UIQt", parentObject, 91 slot_tbl, 7, 92 signal_tbl, 1, 93 #ifndef QT_NO_PROPERTIES 94 0, 0, 95 0, 0, 96 #endif // QT_NO_PROPERTIES 97 0, 0 ); 98 cleanUp_G4UIQt.setMetaObject( metaObj ); 99 return metaObj; 100 } 101 102 void* G4UIQt::qt_cast( const char* clname ) 103 { 104 if ( !qstrcmp( clname, "G4UIQt" ) ) 105 return this; 106 if ( !qstrcmp( clname, "G4VBasicShell" ) ) 107 return (G4VBasicShell*)this; 108 if ( !qstrcmp( clname, "G4VInteractiveSession" ) ) 109 return (G4VInteractiveSession*)this; 110 return QObject::qt_cast( clname ); 111 } 112 113 // SIGNAL myClicked 114 void G4UIQt::myClicked( const QString& t0 ) 115 { 116 activate_signal( staticMetaObject()->signalOffset() + 0, t0 ); 117 } 118 119 bool G4UIQt::qt_invoke( int _id, QUObject* _o ) 120 { 121 switch ( _id - staticMetaObject()->slotOffset() ) { 122 case 0: ClearButtonCallback(); break; 123 case 1: CommandEnteredCallback(); break; 124 case 2: ButtonCallback((const QString&)static_QUType_QString.get(_o+1)); break; 125 case 3: HelpTreeClicCallback(); break; 126 #if QT_VERSION < 0x040000 127 case 4: HelpTreeDoubleClicCallback((QListViewItem*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2)); break; 128 #else 129 case 4: HelpTreeDoubleClicCallback((QTreeWidgetItem*)static_QUType_ptr.get(_o+1),(int)static_QUType_int.get(_o+2)); break; 130 #endif 131 case 5: ShowHelpCallback(); break; 132 case 6: CommandHistoryCallback(); break; 133 default: 134 return QObject::qt_invoke( _id, _o ); 135 } 136 return TRUE; 137 } 138 139 bool G4UIQt::qt_emit( int _id, QUObject* _o ) 140 { 141 switch ( _id - staticMetaObject()->signalOffset() ) { 142 case 0: myClicked((const QString&)static_QUType_QString.get(_o+1)); break; 143 default: 144 return QObject::qt_emit(_id,_o); 145 } 146 return TRUE; 147 } 148 #ifndef QT_NO_PROPERTIES 149 150 bool G4UIQt::qt_property( int id, int f, QVariant* v) 151 { 152 return QObject::qt_property( id, f, v); 153 } 154 155 bool G4UIQt::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } 156 #endif // QT_NO_PROPERTIES 157 158 #endif 159 #endif 160 161 1 162 /**************************************************************************** 2 163 ** Meta object code from reading C++ file 'G4UIQt.hh' … … 7 168 ** WARNING! All changes made in this file will be lost! 8 169 *****************************************************************************/ 170 171 #if QT_VERSION >= 0x040000 9 172 10 173 #ifdef G4UI_BUILD_QT_SESSION … … 103 266 104 267 #endif 268 269 #endif
Note: See TracChangeset
for help on using the changeset viewer.