diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-05-26 05:15:45 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-05-26 05:15:45 (GMT) |
commit | e9a25332df933227c6b71a1654260d8421f56415 (patch) | |
tree | d0537f2e39fed1261bba0a14a43755cf2e5dbf1a /src/declarative/graphicsitems/qdeclarativetext_p.h | |
parent | 291dce4ceba88a6cada0415524e3466621ac1612 (diff) | |
download | Qt-e9a25332df933227c6b71a1654260d8421f56415.zip Qt-e9a25332df933227c6b71a1654260d8421f56415.tar.gz Qt-e9a25332df933227c6b71a1654260d8421f56415.tar.bz2 |
Fix TextEdit clipping when not wrapped. Rename most-useful-wrap-mode to "Wrap".
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h index 00ce126..db21140 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h @@ -71,6 +71,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeText : public QDeclarativeItem Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) 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) public: QDeclarativeText(QDeclarativeItem *parent=0); @@ -98,7 +100,8 @@ public: enum WrapMode { NoWrap = QTextOption::NoWrap, WordWrap = QTextOption::WordWrap, WrapAnywhere = QTextOption::WrapAnywhere, - WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere + WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, // COMPAT + Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere }; QString text() const; @@ -137,6 +140,9 @@ public: int resourcesLoading() const; // mainly for testing + qreal paintedWidth() const; + qreal paintedHeight() const; + Q_SIGNALS: void textChanged(const QString &text); void linkActivated(const QString &link); @@ -149,6 +155,7 @@ Q_SIGNALS: void wrapModeChanged(); void textFormatChanged(TextFormat textFormat); void elideModeChanged(TextElideMode mode); + void paintedSizeChanged(); protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); |