diff options
author | Christopher Ham <christopher.ham@nokia.com> | 2011-01-14 05:05:35 (GMT) |
---|---|---|
committer | Christopher Ham <christopher.ham@nokia.com> | 2011-01-14 05:05:35 (GMT) |
commit | 82c0594ef35dbe9520da2f5e0900385c68f1cba5 (patch) | |
tree | 48ff2a3bcd9bfd51fc4ce6816acb533d7e7db6e9 /src/declarative/graphicsitems/qdeclarativetextedit_p.h | |
parent | 08bd83f5f1b738713e80bbfbd06468d27c5d3694 (diff) | |
download | Qt-82c0594ef35dbe9520da2f5e0900385c68f1cba5.zip Qt-82c0594ef35dbe9520da2f5e0900385c68f1cba5.tar.gz Qt-82c0594ef35dbe9520da2f5e0900385c68f1cba5.tar.bz2 |
Add lineCount property to QDeclarativeTextEdit
The lineCount property should return the number of lines contained
in textEdit. Also corrected minor documentation in Text
Task-number: QTBUG-12305
Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 3e86a05..928d100 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -75,6 +75,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged) Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged) Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged) Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged) Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged) Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged) @@ -156,6 +157,8 @@ public: WrapMode wrapMode() const; void setWrapMode(WrapMode w); + int lineCount() const; + bool isCursorVisible() const; void setCursorVisible(bool on); @@ -220,6 +223,7 @@ Q_SIGNALS: void horizontalAlignmentChanged(HAlignment alignment); void verticalAlignmentChanged(VAlignment alignment); void wrapModeChanged(); + void lineCountChanged(); void textFormatChanged(TextFormat textFormat); void readOnlyChanged(bool isReadOnly); void cursorVisibleChanged(bool isCursorVisible); @@ -250,6 +254,7 @@ private Q_SLOTS: private: void updateSize(); + void updateTotalLines(); protected: virtual void geometryChanged(const QRectF &newGeometry, |