diff options
author | Risto Avila <risto.avila@digia.com> | 2014-03-11 12:04:52 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-12 11:15:27 +0100 |
commit | 405f1becac28ee324364df4e3df0446d951425e8 (patch) | |
tree | 1105dfb614a3ffcdadbb01d433f1a76e05f6bc8c /src/quick/items/qquicktextinput_p.h | |
parent | 1511dc39a62e9d14b6755d6c2335547c85331d49 (diff) |
Makes PasswordMaskDelay configurable through TextInput
Adds a new property to TextInput which can be used to override QPlatformTheme::PasswordMaskDelay.
The new property is TextInput.passwordMaskDelay and takes in delay (ms) which time character
is shown before masking it. This is only when echoMode is set to TextInput.Password
[ChangeLog][QtQuick][TextInput] Added passwordMaskDelay property
Change-Id: I52812b883db11fdd21b25154887c51df8a44f69c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/quick/items/qquicktextinput_p.h')
-rw-r--r-- | src/quick/items/qquicktextinput_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput_p.h b/src/quick/items/qquicktextinput_p.h index 5f0250aaf1..5a88273543 100644 --- a/src/quick/items/qquicktextinput_p.h +++ b/src/quick/items/qquicktextinput_p.h @@ -94,6 +94,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickTextInput : public QQuickImplicitSizeItem Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode NOTIFY echoModeChanged) Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged) Q_PROPERTY(QString passwordCharacter READ passwordCharacter WRITE setPasswordCharacter NOTIFY passwordCharacterChanged) + Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay WRITE setPasswordMaskDelay RESET resetPasswordMaskDelay NOTIFY passwordMaskDelayChanged REVISION 3) Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged) Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged) Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) @@ -227,6 +228,10 @@ public: QString passwordCharacter() const; void setPasswordCharacter(const QString &str); + int passwordMaskDelay() const; + void setPasswordMaskDelay(int delay); + void resetPasswordMaskDelay(); + QString displayText() const; QQmlComponent* cursorDelegate() const; @@ -300,6 +305,7 @@ Q_SIGNALS: void inputMaskChanged(const QString &inputMask); void echoModeChanged(EchoMode echoMode); void passwordCharacterChanged(); + Q_REVISION(3) void passwordMaskDelayChanged(int delay); void displayTextChanged(); void activeFocusOnPressChanged(bool activeFocusOnPress); void autoScrollChanged(bool autoScroll); |