aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal_p.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-03-23 09:32:45 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-27 06:54:34 +0200
commitec7deb3d123bb44b5d57590615a60ed48b1d2860 (patch)
tree4b6e98a85cc2fece6ad3cad29090a1294e94cd55 /src/qml/qml/qqmlboundsignal_p.h
parentf931ec39513854e56560fe85d55a5d144e22af88 (diff)
Add QQmlBoundSignalNoParamsqt-v5.0.0-alpha1
This class is used for signal handlers with no parameters, and is more lightweight than QQmlBoundSignal. Change-Id: Ie63eb989d334906657fd16fe35386df198654c28 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal_p.h')
-rw-r--r--src/qml/qml/qqmlboundsignal_p.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h
index 03b6008e45..5fc8c3522f 100644
--- a/src/qml/qml/qqmlboundsignal_p.h
+++ b/src/qml/qml/qqmlboundsignal_p.h
@@ -57,6 +57,7 @@
#include <QtCore/qmetaobject.h>
+#include <private/qqmlnotifier_p.h>
#include <private/qobject_p.h>
QT_BEGIN_NAMESPACE
@@ -110,6 +111,31 @@ private:
QObject *m_owner;
};
+class Q_QML_EXPORT QQmlBoundSignalNoParams : public QQmlAbstractBoundSignal,
+ public QQmlNotifierEndpoint
+{
+public:
+ QQmlBoundSignalNoParams(QObject *scope, const QMetaMethod &signal, QObject *owner);
+ virtual ~QQmlBoundSignalNoParams();
+
+ int index() const;
+
+ QQmlExpression *expression() const;
+ QQmlExpression *setExpression(QQmlExpression *);
+ QObject *object() { return m_owner; }
+
+ static void subscriptionCallback(QQmlNotifierEndpoint *e);
+
+ bool isEvaluating() const { return m_isEvaluating; }
+
+private:
+ QQmlExpression *m_expression;
+ QObject *m_owner;
+ int m_index;
+ bool m_isEvaluating;
+};
+
+
QT_END_NAMESPACE
#endif // QQMLBOUNDSIGNAL_P_H