summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-01-24 06:08:46 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-01-24 06:08:46 (GMT)
commit6f78a6080b84cc3ef96b73a4ff58d1b5a72f08f4 (patch)
tree7d22096d7c681ed1b8f7111575582f4b48f95f7f /src/declarative/graphicsitems/qdeclarativeitem.h
parent44060d2129b461754f6bd86153889a869f12440a (diff)
downloadQt-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.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 0dd3937..839b934 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -92,6 +92,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
+ Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged REVISION 1)
+ Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged REVISION 1)
+
Q_ENUMS(TransformOrigin)
Q_CLASSINFO("DefaultProperty", "data")
@@ -161,6 +164,8 @@ Q_SIGNALS:
void transformOriginChanged(TransformOrigin);
void smoothChanged(bool);
void clipChanged(bool);
+ Q_REVISION(1) void implicitWidthChanged();
+ Q_REVISION(1) void implicitHeightChanged();
protected:
bool isComponentComplete() const;