19 #ifndef QGLIB_SIGNAL_H
20 #define QGLIB_SIGNAL_H
23 #include <QtCore/QString>
24 #include <QtCore/QFlags>
25 #include <QtCore/QSharedData>
29 # if !defined(QGLIB_NO_EMIT_WARNING) //define that to get rid of the warning
30 # if defined(Q_CC_GNU)
31 # warning "The emit keyword is defined and will be undefined here to compile QGlib::emit."
32 # warning "It is recommended to compile your project with QT_NO_KEYWORDS defined."
33 # elif defined(Q_CC_MSVC)
34 # pragma message("Warning: The emit keyword is defined and will be undefined here to compile QGlib::emit.")
35 # pragma message("Warning: It is recommended to compile your project with QT_NO_KEYWORDS defined.")
39 # define QT_NO_EMIT //undocumented Qt macro that skips "#define emit" in qglobal.h
74 Q_DECLARE_FLAGS(SignalFlags, SignalFlag);
86 SignalFlags flags()
const;
89 Type instanceType()
const;
90 Type returnType()
const;
91 QList<Type> paramTypes()
const;
95 static Signal lookup(
const char *name,
Type type);
98 static QList<Signal> listSignals(
Type type);
101 QTGLIB_NO_EXPORT
Signal(uint
id);
104 QSharedDataPointer<Private> d;
107 Q_DECLARE_OPERATORS_FOR_FLAGS(Signal::SignalFlags)
109 #if defined(DOXYGEN_RUN)
156 template <
typename R,
typename... Args>
157 R
emit(
void *instance,
const char *detailedSignal,
const Args & ... args);
163 template <
typename R,
typename... Args>
170 #if !QGLIB_HAVE_CXX0X && !defined(QGLIB_SIGNAL_MAX_ARGS)
171 # define QGLIB_SIGNAL_MAX_ARGS 9
174 #define IN_QGLIB_SIGNAL_H
175 # include "emitimpl.h"
176 #undef IN_QGLIB_SIGNAL_H
178 #if defined(QGLIB_SIGNAL_MAX_ARGS)
179 # undef QGLIB_SIGNAL_MAX_ARGS