| 1 | // Copyright (C) 2021 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef SETTINGS_P_H |
| 5 | #define SETTINGS_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include "qvirtualkeyboardnamespace_p.h" |
| 19 | #include <QObject> |
| 20 | #include <QUrl> |
| 21 | #include <QtVirtualKeyboard/qvirtualkeyboard_global.h> |
| 22 | #include <QtCore/private/qglobal_p.h> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | namespace QtVirtualKeyboard { |
| 26 | |
| 27 | class SettingsPrivate; |
| 28 | |
| 29 | class Q_VIRTUALKEYBOARD_EXPORT Settings : public QObject |
| 30 | { |
| 31 | Q_OBJECT |
| 32 | Q_DISABLE_COPY(Settings) |
| 33 | Q_DECLARE_PRIVATE(Settings) |
| 34 | |
| 35 | Settings(QObject *parent = nullptr); |
| 36 | |
| 37 | public: |
| 38 | static Settings *instance(); |
| 39 | |
| 40 | QString style() const; |
| 41 | void setStyle(const QString &style); |
| 42 | |
| 43 | QString styleName() const; |
| 44 | void setStyleName(const QString &name); |
| 45 | |
| 46 | QString locale() const; |
| 47 | void setLocale(const QString &locale); |
| 48 | |
| 49 | QStringList availableLocales() const; |
| 50 | void setAvailableLocales(const QStringList &availableLocales); |
| 51 | |
| 52 | QStringList activeLocales() const; |
| 53 | void setActiveLocales(const QStringList &activeLocales); |
| 54 | |
| 55 | QUrl layoutPath() const; |
| 56 | void setLayoutPath(const QUrl &layoutPath); |
| 57 | |
| 58 | int wclAutoHideDelay() const; |
| 59 | void setWclAutoHideDelay(int wclAutoHideDelay); |
| 60 | |
| 61 | bool wclAlwaysVisible() const; |
| 62 | void setWclAlwaysVisible(bool wclAlwaysVisible); |
| 63 | |
| 64 | bool wclAutoCommitWord() const; |
| 65 | void setWclAutoCommitWord(bool wclAutoCommitWord); |
| 66 | |
| 67 | bool fullScreenMode() const; |
| 68 | void setFullScreenMode(bool fullScreenMode); |
| 69 | |
| 70 | QString userDataPath() const; |
| 71 | void setUserDataPath(const QString &userDataPath); |
| 72 | |
| 73 | int hwrTimeoutForAlphabetic() const; |
| 74 | void setHwrTimeoutForAlphabetic(int hwrTimeoutForAlphabetic); |
| 75 | |
| 76 | int hwrTimeoutForCjk() const; |
| 77 | void setHwrTimeoutForCjk(int hwrTimeoutForCjk); |
| 78 | |
| 79 | Qt::InputMethodHints inputMethodHints() const; |
| 80 | void setInputMethodHints(const Qt::InputMethodHints &inputMethodHints); |
| 81 | |
| 82 | bool isHandwritingModeDisabled() const; |
| 83 | void setHandwritingModeDisabled(bool handwritingModeDisabled); |
| 84 | |
| 85 | bool isDefaultInputMethodDisabled() const; |
| 86 | void setDefaultInputMethodDisabled(bool defaultInputMethodDisabled); |
| 87 | |
| 88 | bool isDefaultDictionaryDisabled() const; |
| 89 | void setDefaultDictionaryDisabled(bool defaultDictionaryDisabled); |
| 90 | |
| 91 | QtVirtualKeyboard::KeyboardFunctionKeys visibleFunctionKeys() const; |
| 92 | void setVisibleFunctionKeys(QtVirtualKeyboard::KeyboardFunctionKeys newVisibleFunctionKeys); |
| 93 | |
| 94 | bool closeOnReturn() const; |
| 95 | void setCloseOnReturn(bool enable); |
| 96 | |
| 97 | signals: |
| 98 | void styleChanged(); |
| 99 | void styleNameChanged(); |
| 100 | void localeChanged(); |
| 101 | void availableLocalesChanged(); |
| 102 | void activeLocalesChanged(); |
| 103 | void layoutPathChanged(); |
| 104 | void wclAutoHideDelayChanged(); |
| 105 | void wclAlwaysVisibleChanged(); |
| 106 | void wclAutoCommitWordChanged(); |
| 107 | void fullScreenModeChanged(); |
| 108 | void userDataPathChanged(); |
| 109 | void userDataReset(); |
| 110 | void hwrTimeoutForAlphabeticChanged(); |
| 111 | void hwrTimeoutForCjkChanged(); |
| 112 | void inputMethodHintsChanged(); |
| 113 | void handwritingModeDisabledChanged(); |
| 114 | void defaultInputMethodDisabledChanged(); |
| 115 | void defaultDictionaryDisabledChanged(); |
| 116 | void visibleFunctionKeysChanged(); |
| 117 | void closeOnReturnChanged(); |
| 118 | }; |
| 119 | |
| 120 | } // namespace QtVirtualKeyboard |
| 121 | QT_END_NAMESPACE |
| 122 | |
| 123 | #endif // SETTINGS_P_H |
| 124 | |