diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-17 04:50:17 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-17 04:50:17 (GMT) |
commit | 07eff9d3d7cb95eec3700efdc5408caf403de9eb (patch) | |
tree | 330c01111115c4b0db4e8d7bcdd3918cdc48040c /src/declarative | |
parent | 13be084a5295a0406e6a0893e9fb1eeda5444940 (diff) | |
parent | 0830464f4a139234ba424b25590fc5d7bb5f4785 (diff) | |
download | Qt-07eff9d3d7cb95eec3700efdc5408caf403de9eb.zip Qt-07eff9d3d7cb95eec3700efdc5408caf403de9eb.tar.gz Qt-07eff9d3d7cb95eec3700efdc5408caf403de9eb.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative')
3 files changed, 7 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 2ac55a4..1a48cbd 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -138,6 +138,7 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType<QDeclarativeKeyEvent>(); qmlRegisterType<QDeclarativeMouseEvent>(); qmlRegisterType<QGraphicsObject>(); + qmlRegisterType<QGraphicsWidget>(); qmlRegisterType<QGraphicsTransform>(); qmlRegisterType<QDeclarativePathElement>(); qmlRegisterType<QDeclarativeCurve>(); diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 13195af..26242bc 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -58,12 +58,12 @@ QDeclarativeDrag::~QDeclarativeDrag() { } -QDeclarativeItem *QDeclarativeDrag::target() const +QGraphicsObject *QDeclarativeDrag::target() const { return _target; } -void QDeclarativeDrag::setTarget(QDeclarativeItem *t) +void QDeclarativeDrag::setTarget(QGraphicsObject *t) { if (_target == t) return; diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h index 33422e2..db49b57 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h +++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h @@ -55,7 +55,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDrag : public QObject Q_OBJECT Q_ENUMS(Axis) - Q_PROPERTY(QDeclarativeItem *target READ target WRITE setTarget NOTIFY targetChanged) + Q_PROPERTY(QGraphicsObject *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(Axis axis READ axis WRITE setAxis NOTIFY axisChanged) Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged) Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged) @@ -67,8 +67,8 @@ public: QDeclarativeDrag(QObject *parent=0); ~QDeclarativeDrag(); - QDeclarativeItem *target() const; - void setTarget(QDeclarativeItem *); + QGraphicsObject *target() const; + void setTarget(QGraphicsObject *); enum Axis { XAxis=0x01, YAxis=0x02, XandYAxis=0x03 }; Axis axis() const; @@ -92,7 +92,7 @@ Q_SIGNALS: void maximumYChanged(); private: - QDeclarativeItem *_target; + QGraphicsObject *_target; Axis _axis; qreal _xmin; qreal _xmax; |