diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-07-08 08:27:58 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-07-08 08:27:58 (GMT) |
commit | 5be447a0f1a7cdd69fc94543e9b83038cc2b77b3 (patch) | |
tree | 389d915f07195d578c6a6c333132fd7ab6e362b6 /src/declarative/fx/qfxtextedit_p.h | |
parent | 6259c9fbc4719994bd491271eba5c47143df67c6 (diff) | |
download | Qt-5be447a0f1a7cdd69fc94543e9b83038cc2b77b3.zip Qt-5be447a0f1a7cdd69fc94543e9b83038cc2b77b3.tar.gz Qt-5be447a0f1a7cdd69fc94543e9b83038cc2b77b3.tar.bz2 |
Implement selectedText, selectionStart and selectionEnd properties.
Still to go: Setting the selectionStart/End properties doesn't work
and there are no autotests.
Diffstat (limited to 'src/declarative/fx/qfxtextedit_p.h')
-rw-r--r-- | src/declarative/fx/qfxtextedit_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxtextedit_p.h b/src/declarative/fx/qfxtextedit_p.h index f92dd60..b7d667e 100644 --- a/src/declarative/fx/qfxtextedit_p.h +++ b/src/declarative/fx/qfxtextedit_p.h @@ -69,8 +69,9 @@ class QFxTextEditPrivate : public QFxPaintedItemPrivate public: QFxTextEditPrivate() : font(0), color("black"), imgDirty(true), hAlign(QFxTextEdit::AlignLeft), vAlign(QFxTextEdit::AlignTop), - dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(false), preserveSelection(true), - textMargin(0.0), cursor(0), cursorComponent(0), format(QFxTextEdit::AutoText), document(0) + dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(false), + preserveSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), + cursor(0), cursorComponent(0), format(QFxTextEdit::AutoText), document(0) { } @@ -78,6 +79,7 @@ public: void updateDefaultTextOption(); void relayoutDocument(); + void updateSelection(); QString text; QmlFont font; @@ -101,6 +103,8 @@ public: bool focusOnPress; bool preserveSelection; qreal textMargin; + int lastSelectionStart; + int lastSelectionEnd; QmlComponent* cursorComponent; QFxItem* cursor; QFxTextEdit::TextFormat format; |