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
24QT_BEGIN_NAMESPACE
25namespace QtVirtualKeyboard {
26
27class SettingsPrivate;
28
29class 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
37public:
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
94signals:
95 void styleChanged();
96 void styleNameChanged();
97 void localeChanged();
98 void availableLocalesChanged();
99 void activeLocalesChanged();
100 void layoutPathChanged();
101 void wclAutoHideDelayChanged();
102 void wclAlwaysVisibleChanged();
103 void wclAutoCommitWordChanged();
104 void fullScreenModeChanged();
105 void userDataPathChanged();
106 void userDataReset();
107 void hwrTimeoutForAlphabeticChanged();
108 void hwrTimeoutForCjkChanged();
109 void inputMethodHintsChanged();
110 void handwritingModeDisabledChanged();
111 void defaultInputMethodDisabledChanged();
112 void defaultDictionaryDisabledChanged();
113 void visibleFunctionKeysChanged();
114};
115
116} // namespace QtVirtualKeyboard
117QT_END_NAMESPACE
118
119#endif // SETTINGS_P_H
120

source code of qtvirtualkeyboard/src/virtualkeyboard/settings_p.h