diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-01-24 06:08:46 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-01-24 06:08:46 (GMT) |
commit | 6f78a6080b84cc3ef96b73a4ff58d1b5a72f08f4 (patch) | |
tree | 7d22096d7c681ed1b8f7111575582f4b48f95f7f /src/declarative/graphicsitems/qdeclarativeitem_p.h | |
parent | 44060d2129b461754f6bd86153889a869f12440a (diff) | |
download | Qt-6f78a6080b84cc3ef96b73a4ff58d1b5a72f08f4.zip Qt-6f78a6080b84cc3ef96b73a4ff58d1b5a72f08f4.tar.gz Qt-6f78a6080b84cc3ef96b73a4ff58d1b5a72f08f4.tar.bz2 |
Expose implicitWidth and implicitHeight properties of Item.
Overridden as readonly for elements that have an inherent implicit size
such as Text, TextEdit, TextInput, positioners, Loader.
Task-number: QTBUG-14957
Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem_p.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index fd9c736..4303c0a 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -126,7 +126,7 @@ public: widthValid(false), heightValid(false), componentComplete(true), keepMouse(false), smooth(false), transformOriginDirty(true), doneEventPreHandler(false), keyHandler(0), - mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0), hadSubFocusItem(false) + mWidth(0), mHeight(0), mImplicitWidth(0), mImplicitHeight(0), hadSubFocusItem(false) { QGraphicsItemPrivate::acceptedMouseButtons = 0; isDeclarativeItem = 1; @@ -157,6 +157,11 @@ public: void setHeight(qreal); void resetHeight(); + virtual qreal implicitWidth() const; + virtual qreal implicitHeight() const; + virtual void implicitWidthChanged(); + virtual void implicitHeightChanged(); + QDeclarativeListProperty<QObject> data(); QDeclarativeListProperty<QObject> resources(); @@ -272,8 +277,8 @@ public: qreal mWidth; qreal mHeight; - qreal implicitWidth; - qreal implicitHeight; + qreal mImplicitWidth; + qreal mImplicitHeight; bool hadSubFocusItem; |