summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem_p.h
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-04-14 03:18:03 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-04-14 03:21:55 (GMT)
commit37581fa549c5cbe56afc68c71fa97d8f933512c0 (patch)
tree621a068e2a786eec416facdce9aa2eccd92e36f2 /src/declarative/graphicsitems/qdeclarativeitem_p.h
parent298335af52cd39ad6683198674e799799d5b6d6f (diff)
downloadQt-37581fa549c5cbe56afc68c71fa97d8f933512c0.zip
Qt-37581fa549c5cbe56afc68c71fa97d8f933512c0.tar.gz
Qt-37581fa549c5cbe56afc68c71fa97d8f933512c0.tar.bz2
Bring support of anchors in QML for QGraphicsWidget derived classes.
This commit add a extension object to bring the anchors property for a QGraphicsWidget. The actual implement uses a separate object for storing the anchor pointer. In the future it would be nice if the extension object is the anchor itself. Also there are two connects extra for QGraphicsWidget one can perhaps disappear with a later commit. Only baseline case is not supported because QGraphicsWidget don't have any concept of baseline. Reviewed-by:akennedy
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index 2607137..cf138c3 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -120,6 +120,7 @@ public:
mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
{
QGraphicsItemPrivate::acceptedMouseButtons = 0;
+ isDeclarativeItem = 1;
QGraphicsItemPrivate::flags = QGraphicsItem::GraphicsItemFlags(
QGraphicsItem::ItemHasNoContents
| QGraphicsItem::ItemIsFocusable
@@ -183,7 +184,7 @@ public:
QDeclarativeNullableValue<qreal> _baselineOffset;
struct AnchorLines {
- AnchorLines(QDeclarativeItem *);
+ AnchorLines(QGraphicsObject *);
QDeclarativeAnchorLine left;
QDeclarativeAnchorLine right;
QDeclarativeAnchorLine hCenter;