aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-02-07 11:57:42 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-07 06:36:05 +0100
commit51b7425329e0fa221c319e8d75595c19f664aedb (patch)
tree48c2d03edc05da74296a25540f1b8df52389b7ee /src/quick/items/qquicktext_p.h
parentce3dee765c858a0b573d468ef8fee6b838e576d1 (diff)
Add contentWidth and contentHeight properties to Text elements.
For Text and TextEdit this is a rename of paintedWidth and paintedHeight both of which remain as synonyms of the content properties for compatability. For TextInput this is a new property. Task-number: QTBUG-23691 Task-number: QTBUG-15160 Change-Id: Idbdc72fad34922be21b649ca45fc39b5e533ed1a Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktext_p.h')
-rw-r--r--src/quick/items/qquicktext_p.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index 74339e3b86..ff1f45e605 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -80,8 +80,10 @@ class Q_QUICK_PRIVATE_EXPORT QQuickText : public QQuickImplicitSizeItem
Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode?
- Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged)
- Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
+ Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentSizeChanged)
+ Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentSizeChanged)
+ Q_PROPERTY(qreal paintedWidth READ contentWidth NOTIFY contentSizeChanged) // Compatibility
+ Q_PROPERTY(qreal paintedHeight READ contentHeight NOTIFY contentSizeChanged)
Q_PROPERTY(qreal lineHeight READ lineHeight WRITE setLineHeight NOTIFY lineHeightChanged)
Q_PROPERTY(LineHeightMode lineHeightMode READ lineHeightMode WRITE setLineHeightMode NOTIFY lineHeightModeChanged)
Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged)
@@ -188,8 +190,8 @@ public:
int resourcesLoading() const; // mainly for testing
- qreal paintedWidth() const;
- qreal paintedHeight() const;
+ qreal contentWidth() const;
+ qreal contentHeight() const;
QRectF boundingRect() const;
Q_INVOKABLE void doLayout();
@@ -209,7 +211,7 @@ Q_SIGNALS:
void maximumLineCountChanged();
void textFormatChanged(TextFormat textFormat);
void elideModeChanged(TextElideMode mode);
- void paintedSizeChanged();
+ void contentSizeChanged();
void lineHeightChanged(qreal lineHeight);
void lineHeightModeChanged(LineHeightMode mode);
void fontSizeModeChanged();