diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-02-07 11:57:42 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-07 06:36:05 +0100 |
commit | 51b7425329e0fa221c319e8d75595c19f664aedb (patch) | |
tree | 48c2d03edc05da74296a25540f1b8df52389b7ee /src/quick/items/qquicktextinput_p.h | |
parent | ce3dee765c858a0b573d468ef8fee6b838e576d1 (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/qquicktextinput_p.h')
-rw-r--r-- | src/quick/items/qquicktextinput_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h index 70a2f0a9a5..b5b3d0f430 100644 --- a/src/quick/items/qquicktextinput_p.h +++ b/src/quick/items/qquicktextinput_p.h @@ -103,6 +103,8 @@ class Q_AUTOTEST_EXPORT QQuickTextInput : public QQuickImplicitSizeItem Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged) Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged) Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged) + Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentSizeChanged) + Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentSizeChanged) public: QQuickTextInput(QQuickItem * parent=0); @@ -254,6 +256,9 @@ public: Q_INVOKABLE QString getText(int start, int end) const; + qreal contentWidth() const; + qreal contentHeight() const; + Q_SIGNALS: void textChanged(); void cursorPositionChanged(); @@ -289,6 +294,7 @@ Q_SIGNALS: void canRedoChanged(); void inputMethodComposingChanged(); void effectiveHorizontalAlignmentChanged(); + void contentSizeChanged(); protected: virtual void geometryChanged(const QRectF &newGeometry, |