summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem_p.h
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2010-03-25 06:02:48 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2010-03-25 06:41:48 (GMT)
commit3ded7df045edf0639d83664605aa4236715c6d39 (patch)
tree0fccf57ae10fb7d797a34ecb4efce60da22f14b7 /src/declarative/graphicsitems/qdeclarativeitem_p.h
parent32b5fdfabf3158c7b03d1011f4551a45371b27e3 (diff)
downloadQt-3ded7df045edf0639d83664605aa4236715c6d39.zip
Qt-3ded7df045edf0639d83664605aa4236715c6d39.tar.gz
Qt-3ded7df045edf0639d83664605aa4236715c6d39.tar.bz2
Remove the children property from QDeclarativeItem.
This commit remove the children property from QDeclarativeItem because it's now in QGraphicsObject. This commit also get rid of width and height properties to use the one in QGraphicsObject. Task-number:QT-2757 Reviewed-by:akennedy
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index 55df063..56b0d77 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -114,7 +114,7 @@ public:
widthValid(false), heightValid(false),
_componentComplete(true), _keepMouse(false),
smooth(false), keyHandler(0),
- width(0), height(0), implicitWidth(0), implicitHeight(0)
+ mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
{
QGraphicsItemPrivate::acceptedMouseButtons = 0;
QGraphicsItemPrivate::flags = QGraphicsItem::GraphicsItemFlags(
@@ -136,6 +136,16 @@ public:
QString _id;
+ // Private Properties
+ qreal width() const;
+ void setWidth(qreal);
+ void resetWidth();
+
+ qreal height() const;
+ void setHeight(qreal);
+ void resetHeight();
+
+
// data property
static void data_append(QDeclarativeListProperty<QObject> *, QObject *);
@@ -144,11 +154,6 @@ public:
static void resources_append(QDeclarativeListProperty<QObject> *, QObject *);
static int resources_count(QDeclarativeListProperty<QObject> *);
- // children property
- static QDeclarativeItem *children_at(QDeclarativeListProperty<QDeclarativeItem> *, int);
- static void children_append(QDeclarativeListProperty<QDeclarativeItem> *, QDeclarativeItem *);
- static int children_count(QDeclarativeListProperty<QDeclarativeItem> *);
-
// transform property
static int transform_count(QDeclarativeListProperty<QGraphicsTransform> *list);
static void transform_append(QDeclarativeListProperty<QGraphicsTransform> *list, QGraphicsTransform *);
@@ -222,8 +227,8 @@ public:
QDeclarativeItemKeyFilter *keyHandler;
- qreal width;
- qreal height;
+ qreal mWidth;
+ qreal mHeight;
qreal implicitWidth;
qreal implicitHeight;
@@ -232,9 +237,9 @@ public:
virtual void setPosHelper(const QPointF &pos)
{
Q_Q(QDeclarativeItem);
- QRectF oldGeometry(this->pos.x(), this->pos.y(), width, height);
+ QRectF oldGeometry(this->pos.x(), this->pos.y(), mWidth, mHeight);
QGraphicsItemPrivate::setPosHelper(pos);
- q->geometryChanged(QRectF(this->pos.x(), this->pos.y(), width, height), oldGeometry);
+ q->geometryChanged(QRectF(this->pos.x(), this->pos.y(), mWidth, mHeight), oldGeometry);
}
// Reimplemented from QGraphicsItemPrivate