aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput_p.h
diff options
context:
space:
mode:
authorDan Cape <dcape@qnx.com>2015-08-28 11:11:57 -0400
committerDan Cape <dcape@qnx.com>2016-03-03 18:13:39 +0000
commit9456832163d3476e8f81440dd2978092a9000b72 (patch)
treee5ed5fd98d6d7d1a9d21760f43cc0f134302d809 /src/quick/items/qquicktextinput_p.h
parentbf3de80424edf2b22c5f88a99c0bb18bffadfcf8 (diff)
Add overwriteMode to QML TextEdit and QML TextInput
Overwrite mode was added to QML TextEdit and QML TextInput to match the functionality provided by QTextEdit. Tests were updated as well to ensure the mode functions as expected. Task-number: QTBUG-26513 Change-Id: I1769159b298220107b09f9f13dc3af5f274715cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquicktextinput_p.h')
-rw-r--r--src/quick/items/qquicktextinput_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h
index 06ca1acb0d..d2dee2c284 100644
--- a/src/quick/items/qquicktextinput_p.h
+++ b/src/quick/items/qquicktextinput_p.h
@@ -79,6 +79,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTextInput : public QQuickImplicitSizeItem
Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged)
Q_PROPERTY(QQmlComponent *cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged)
+ Q_PROPERTY(bool overwriteMode READ overwriteMode WRITE setOverwriteMode NOTIFY overwriteModeChanged)
Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged)
Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged)
Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged)
@@ -245,6 +246,9 @@ public:
QQmlComponent* cursorDelegate() const;
void setCursorDelegate(QQmlComponent*);
+ bool overwriteMode() const;
+ void setOverwriteMode(bool overwrite);
+
bool focusOnPress() const;
void setFocusOnPress(bool);
@@ -325,6 +329,7 @@ Q_SIGNALS:
void readOnlyChanged(bool isReadOnly);
void cursorVisibleChanged(bool isCursorVisible);
void cursorDelegateChanged();
+ void overwriteModeChanged(bool overwriteMode);
void maximumLengthChanged(int maximumLength);
void validatorChanged();
void inputMaskChanged(const QString &inputMask);