diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2013-03-01 15:26:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-15 17:59:34 +0100 |
commit | 70ce4ec6ae9321a601a5af37d11bd284b2203bfc (patch) | |
tree | ecff50aa0266c8b2467e8ebe153f139a1ac2e869 /src/quick/items/qquicktextedit_p.h | |
parent | 1366ad57bca2e45adfd624106602af6bf1f12044 (diff) |
Add TextEdit::selectByKeyboard
The main use case is for enabling text selection by keyboard
for read-only editors.
Change-Id: Ieaa9af366fd0eaf863a104a2fdf33c9ddad38b10
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/quick/items/qquicktextedit_p.h')
-rw-r--r-- | src/quick/items/qquicktextedit_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextedit_p.h b/src/quick/items/qquicktextedit_p.h index 255c8ac670..8a2d9b1e92 100644 --- a/src/quick/items/qquicktextedit_p.h +++ b/src/quick/items/qquicktextedit_p.h @@ -90,6 +90,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTextEdit : public QQuickImplicitSizeItem #ifndef QT_NO_IM Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged) #endif + Q_PROPERTY(bool selectByKeyboard READ selectByKeyboard WRITE setSelectByKeyboard NOTIFY selectByKeyboardChanged REVISION 1) Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged) Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) @@ -201,6 +202,9 @@ public: void setInputMethodHints(Qt::InputMethodHints hints); #endif + bool selectByKeyboard() const; + void setSelectByKeyboard(bool); + bool selectByMouse() const; void setSelectByMouse(bool); @@ -274,6 +278,7 @@ Q_SIGNALS: void activeFocusOnPressChanged(bool activeFocusOnPressed); void persistentSelectionChanged(bool isPersistentSelection); void textMarginChanged(qreal textMargin); + Q_REVISION(1) void selectByKeyboardChanged(bool selectByKeyboard); void selectByMouseChanged(bool selectByMouse); void mouseSelectionModeChanged(SelectionMode mode); void linkActivated(const QString &link); |