diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 16 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index c0fb1bb..e5471b0 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3844,6 +3844,22 @@ void QGraphicsItem::setTransformations(const QList<QGraphicsTransform *> &transf /*! \internal */ +void QGraphicsItemPrivate::prependGraphicsTransform(QGraphicsTransform *t) +{ + if (!transformData) + transformData = new QGraphicsItemPrivate::TransformData; + if (!transformData->graphicsTransforms.contains(t)) + transformData->graphicsTransforms.prepend(t); + + Q_Q(QGraphicsItem); + t->d_func()->setItem(q); + transformData->onlyTransform = false; + dirtySceneTransform = 1; +} + +/*! + \internal +*/ void QGraphicsItemPrivate::appendGraphicsTransform(QGraphicsTransform *t) { if (!transformData) diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index b53c545..73b8f04 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -74,7 +74,8 @@ class QGraphicsItemPrivate; #ifndef QDECLARATIVELISTPROPERTY #define QDECLARATIVELISTPROPERTY template<typename T> -struct QDeclarativeListProperty { +class QDeclarativeListProperty { +public: typedef void (*AppendFunction)(QDeclarativeListProperty<T> *, T*); typedef int (*CountFunction)(QDeclarativeListProperty<T> *); typedef T *(*AtFunction)(QDeclarativeListProperty<T> *, int); @@ -276,6 +277,7 @@ public: virtual void setPosHelper(const QPointF &pos); void setTransformHelper(const QTransform &transform); + void prependGraphicsTransform(QGraphicsTransform *t); void appendGraphicsTransform(QGraphicsTransform *t); void setVisibleHelper(bool newVisible, bool explicitly, bool update = true); void setEnabledHelper(bool newEnabled, bool explicitly, bool update = true); |