45 #include <QtCore/qnamespace.h> 57 #ifndef Q_MOC_OUTPUT_REVISION 58 #define Q_MOC_OUTPUT_REVISION 63 65 # if defined(QT_NO_KEYWORDS) 69 # define signals protected 72 # define Q_SIGNALS protected 73 # define Q_PRIVATE_SLOT(d, signature) 78 #define Q_CLASSINFO(name, value) 79 #define Q_INTERFACES(x) 81 #define Q_PRIVATE_PROPERTY(d,; 83 #define Q_OVERRIDE(text) 94 #ifndef QT_NO_TRANSLATION 95 # ifndef QT_NO_TEXTCODEC 98 # define QT_TR_FUNCTIONS \ 99 static inline QString tr(const char *s, const char *c = 0) \ 100 { return staticMetaObject.tr(s, c); } \ 101 static inline QString trUtf8(const char *s, const char *c = 0) \ 102 { return staticMetaObject.trUtf8(s, c); } \ 103 static inline QString tr(const char *s, const char *c, int n) \ 104 { return staticMetaObject.tr(s, c, n); } \ 105 static inline QString trUtf8(const char *s, const char *c, int n) \ 106 { return staticMetaObject.trUtf8(s, c, n); } 110 # define QT_TR_FUNCTIONS \ 111 static inline QString tr(const char *s, const char *c = 0) \ 112 { return staticMetaObject.tr(s, c); } \ 113 static inline QString tr(const char *s, const char *c, int n) \ 114 { return staticMetaObject.tr(s, c, n); } 118 # define QT_TR_FUNCTIONS 121 #if defined(QT_NO_QOBJECT_CHECK) 123 #define Q_OBJECT_CHECK 139 #define Q_OBJECT_CHECK \ 140 template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const \ 141 { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i + 1; } 143 template <
typename T>
146 template <
typename T1,
typename T2>
148 #endif // QT_NO_QOBJECT_CHECK 150 #ifdef Q_NO_DATA_RELOCATION 151 #define Q_OBJECT_GETSTATICMETAOBJECT static const QMetaObject &getStaticMetaObject(); 153 #define Q_OBJECT_GETSTATICMETAOBJECT 160 static const QMetaObject staticMetaObject; \ 161 Q_OBJECT_GETSTATICMETAOBJECT \ 162 virtual const QMetaObject *metaObject() const; \ 163 virtual void *qt_metacast(const char *); \ 165 virtual int qt_metacall(QMetaObject::Call, int, void **); \ 167 Q_DECL_HIDDEN static const QMetaObjectExtraData staticMetaObjectExtraData; \ 168 Q_DECL_HIDDEN static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); 171 #define Q_OBJECT_FAKE Q_OBJECT 175 static const QMetaObject staticMetaObject; \ 176 Q_OBJECT_GETSTATICMETAOBJECT \ 180 #define signals signals 181 #define Q_SLOTS Q_SLOTS 182 #define Q_SIGNALS Q_SIGNALS 183 #define Q_CLASSINFO(name, value) Q_CLASSINFO(name, value) 184 #define Q_INTERFACES(x) Q_INTERFACES(x) 185 #define text) Q_PROPERTY(text) 186 #define; Q_PRIVATE_PROPERTY(d, text) 187 #define Q_REVISION(v) Q_REVISION(v) 188 #define Q_OVERRIDE(text) Q_OVERRIDE(text) 189 #define Q_ENUMS(x) Q_ENUMS(x) 190 #define Q_FLAGS(x) Q_FLAGS(x) 192 # define Q_SETS(x) Q_SETS(x) 195 #define Q_OBJECT Q_OBJECT 197 #define Q_OBJECT_FAKE Q_OBJECT_FAKE 199 #define Q_GADGET Q_GADGET 200 #define Q_SCRIPTABLE Q_SCRIPTABLE 201 #define Q_INVOKABLE Q_INVOKABLE 202 #define Q_SIGNAL Q_SIGNAL 203 #define Q_SLOT Q_SLOT 219 #define QTOSTRING_HELPER(s) #s 220 #define QTOSTRING(s) QTOSTRING_HELPER(s) 222 # define QLOCATION "\0" __FILE__ ":" QTOSTRING(__LINE__) 223 # ifndef QT_NO_KEYWORDS 224 # define METHOD(a) qFlagLocation("0"#a QLOCATION) 226 # define SLOT(a) qFlagLocation("1"#a QLOCATION) 227 # define SIGNAL(a) qFlagLocation("2"#a QLOCATION) 229 # ifndef QT_NO_KEYWORDS 230 # define METHOD(a) "0"#a 232 # define SLOT(a) "1"#a 233 # define SIGNAL(a) "2"#a 237 #define METHOD_CODE 0 // member type codes 239 #define SIGNAL_CODE 2 242 #define QMETHOD_CODE 0 // member type codes 244 #define QSIGNAL_CODE 2 246 #define Q_ARG(type, data) QArgument<type >(#type, data) 247 #define Q_RETURN_ARG(type, data) QReturnArgument<type >(#type, data) 260 : _data(aData), _name(aName) {}
261 inline void *
data()
const {
return const_cast<void *
>(_data); }
262 inline const char *
name()
const {
return _name; }
295 template <
typename T>
312 #ifndef QT_NO_TRANSLATION 314 QString tr(
const char *s,
const char *
c)
const;
315 QString trUtf8(
const char *s,
const char *c)
const;
316 QString tr(
const char *s,
const char *c,
int n)
const;
317 QString trUtf8(
const char *s,
const char *c,
int n)
const;
318 #endif // QT_NO_TRANSLATION 320 int methodOffset()
const;
321 int enumeratorOffset()
const;
322 int propertyOffset()
const;
323 int classInfoOffset()
const;
325 int constructorCount()
const;
326 int methodCount()
const;
327 int enumeratorCount()
const;
328 int propertyCount()
const;
329 int classInfoCount()
const;
331 int indexOfConstructor(
const char *constructor)
const;
332 int indexOfMethod(
const char *method)
const;
333 int indexOfSignal(
const char *signal)
const;
334 int indexOfSlot(
const char *slot)
const;
335 int indexOfEnumerator(
const char *
name)
const;
336 int indexOfProperty(
const char *name)
const;
337 int indexOfClassInfo(
const char *name)
const;
346 static bool checkConnectArgs(
const char *signal,
const char *method);
347 static QByteArray normalizedSignature(
const char *method);
351 static bool connect(
const QObject *sender,
int signal_index,
352 const QObject *receiver,
int method_index,
353 int type = 0,
int *
types = 0);
355 static bool disconnect(
const QObject *sender,
int signal_index,
356 const QObject *receiver,
int method_index);
357 static bool disconnectOne(
const QObject *sender,
int signal_index,
358 const QObject *receiver,
int method_index);
360 static void connectSlotsByName(
QObject *o);
363 static void activate(
QObject *sender,
int signal_index,
void **argv);
364 static void activate(
QObject *sender,
int from_signal_index,
int to_signal_index,
void **argv);
365 static void activate(
QObject *sender,
const QMetaObject *,
int local_signal_index,
void **argv);
366 static void activate(
QObject *sender,
const QMetaObject *,
int from_local_signal_index,
int to_local_signal_index,
void **argv);
370 static void removeGuard(
QObject **ptr);
401 val4, val5, val6, val7, val8, val9);
418 val3, val4, val5, val6, val7, val8, val9);
434 val1, val2, val3, val4, val5, val6, val7, val8, val9);
461 int static_metacall(
Call,
int,
void **)
const;
462 static int metacall(
QObject *,
Call,
int,
void **);
465 QT3_SUPPORT
const char *superClassName()
const;
480 #ifdef Q_NO_DATA_RELOCATION 492 {
return d.stringdata; }
495 {
return d.superdata; }
498 inline const char *QMetaObject::superClassName()
const 499 {
return d.superdata ?
d.superdata->className() : 0; }
506 #endif // QOBJECTDEFS_H
QArgument(const char *aName, const T &aData)
#define QT_END_NAMESPACE
This macro expands to.
void * data() const
Returns the data set in the constructor.
static void invokeMethod(QObject *obj, const char *methodName)
The QByteArray class provides an array of bytes.
int qYouForgotTheQ_OBJECT_Macro(T, T)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
The QGenericReturnArgument class is an internal helper class for marshalling arguments.
const QMetaObject &(* QMetaObjectAccessor)()
The QGenericArgument class is an internal helper class for marshalling arguments. ...
QArgument(const char *aName, T &aData)
#define QT_BEGIN_NAMESPACE
This macro expands to.
const T * ptr(const T &t)
Q_CORE_EXPORT const char * qFlagLocation(const char *method)
QGenericReturnArgument(const char *aName=0, void *aData=0)
Constructs a QGenericReturnArgument object with the given name and data.
QReturnArgument(const char *aName, T &aData)
QGenericArgument(const char *aName=0, const void *aData=0)
Constructs a QGenericArgument object with the given name and data.
const char * name() const
Returns the name set in the constructor.