diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-03-24 04:33:21 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-03-24 08:29:00 (GMT) |
commit | 4be83fa7337c5a4eb7b0ce085aa5854af5d33252 (patch) | |
tree | 39771d3ff7b1c2b3f64934f0e344f50cca497610 /src/gui/graphicsview/qgraphicswidget_p.h | |
parent | c8fa23a5edd790d9eed0620068a29e03e4202cac (diff) | |
download | Qt-4be83fa7337c5a4eb7b0ce085aa5854af5d33252.zip Qt-4be83fa7337c5a4eb7b0ce085aa5854af5d33252.tar.gz Qt-4be83fa7337c5a4eb7b0ce085aa5854af5d33252.tar.bz2 |
Add a children private property needed for QML to support QGraphicsObject
Commit adds a private property that QML can use to add children for a given
item. This is a custom list that calls a callback which actually reparent
the item instead of just appending in the list (otherwise it will mess up
the state of QGraphicsView). This is needed because childItems() is pretty
useless you get a list but if you append something on it then it adds
that into a copy. Also the children property is the default property
a concept used by QML.
Width and Height private properties has been added in order to support
better the integration with QGraphicsWidget in QML. The actual implementation
is in the private class of QGI and QGraphicsWidget reimplements it to return
the geometry. (In 4.7 QDeclarativeItem reimplements it too).
This change should be harmless everything is private.
Task-number:QT-2757
Reviewed-by:andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget_p.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h index 2c5b3bf..f34a755 100644 --- a/src/gui/graphicsview/qgraphicswidget_p.h +++ b/src/gui/graphicsview/qgraphicswidget_p.h @@ -130,6 +130,15 @@ public: void windowFrameHoverLeaveEvent(QGraphicsSceneHoverEvent *event); bool hasDecoration() const; + // Private Properties + qreal width() const; + void setWidth(qreal); + void resetWidth(); + + qreal height() const; + void setHeight(qreal); + void resetHeight(); + // State inline int attributeToBitIndex(Qt::WidgetAttribute att) const { |