summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlexpression.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-20 06:06:19 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-20 08:33:23 (GMT)
commit86529642cfdc5cc5a94b735042d0807e3b57e9e1 (patch)
tree3df356de955a131abfed2c84db4f91abf639a583 /src/declarative/qml/qmlexpression.h
parent275d2a37c0c7179e7f34cc467192a8838705d7c2 (diff)
downloadQt-86529642cfdc5cc5a94b735042d0807e3b57e9e1.zip
Qt-86529642cfdc5cc5a94b735042d0807e3b57e9e1.tar.gz
Qt-86529642cfdc5cc5a94b735042d0807e3b57e9e1.tar.bz2
Rework expression stuff to use a more efficient notify handler
Diffstat (limited to 'src/declarative/qml/qmlexpression.h')
-rw-r--r--src/declarative/qml/qmlexpression.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/src/declarative/qml/qmlexpression.h b/src/declarative/qml/qmlexpression.h
index 3d8f8df..6db6ef9 100644
--- a/src/declarative/qml/qmlexpression.h
+++ b/src/declarative/qml/qmlexpression.h
@@ -57,12 +57,12 @@ class QmlEngine;
class QmlContext;
class QmlExpressionPrivate;
class QmlBasicScript;
-class Q_DECLARATIVE_EXPORT QmlExpression
+class Q_DECLARATIVE_EXPORT QmlExpression : public QObject
{
+ Q_OBJECT
public:
QmlExpression();
QmlExpression(QmlContext *, const QString &, QObject *);
- QmlExpression(QmlContext *, void *, QmlRefCount *rc, QObject *me);
virtual ~QmlExpression();
QmlEngine *engine() const;
@@ -71,7 +71,6 @@ public:
QString expression() const;
void clearExpression();
virtual void setExpression(const QString &);
- QVariant value();
bool isConstant() const;
bool trackChange() const;
@@ -82,31 +81,27 @@ public:
QObject *scopeObject() const;
quint32 id() const;
-protected:
+
+public Q_SLOTS:
+ QVariant value();
+
+Q_SIGNALS:
virtual void valueChanged();
+protected:
+ QmlExpression(QmlContext *, const QString &, QObject *,
+ QmlExpressionPrivate &dd);
+ QmlExpression(QmlContext *, void *, QmlRefCount *rc, QObject *me,
+ QmlExpressionPrivate &dd);
+
+private Q_SLOTS:
+ void __q_notify();
+
private:
+ Q_DECLARE_PRIVATE(QmlExpression)
friend class QmlExpressionBindProxy;
friend class QmlDebugger;
friend class QmlContext;
- QmlExpressionPrivate *d;
-};
-
-// LK: can't we merge with QmlExpression????
-class Q_DECLARATIVE_EXPORT QmlExpressionObject : public QObject,
- public QmlExpression
-{
- Q_OBJECT
-public:
- QmlExpressionObject(QObject *parent = 0);
- QmlExpressionObject(QmlContext *, const QString &, QObject *scope, QObject *parent = 0);
- QmlExpressionObject(QmlContext *, void *, QmlRefCount *, QObject *);
-
-public Q_SLOTS:
- QVariant value();
-
-Q_SIGNALS:
- void valueChanged();
};
QT_END_NAMESPACE