Rabbit Remote Control
0.1.0-bate14
Toggle main menu visibility
Loading...
Searching...
No Matches
App
Client
VirtualKeyboardSettingsDialog.h
1
2
#pragma once
3
4
#include <QDialog>
5
#include <QSettings>
6
#include <QComboBox>
7
#include <QCheckBox>
8
#include <QSlider>
9
#include <QLabel>
10
#include <QPushButton>
11
#include <QVBoxLayout>
12
#include <QGroupBox>
13
#include <QDialogButtonBox>
14
15
#include <QtVirtualKeyboard>
16
17
class
CVirtualKeyboardSettingsDialog :
public
QDialog
18
{
19
Q_OBJECT
20
21
public
:
22
explicit
CVirtualKeyboardSettingsDialog(QWidget *parent =
nullptr
);
23
~CVirtualKeyboardSettingsDialog();
24
25
// 加载保存的设置
26
void
loadSettings();
27
// 保存当前设置
28
void
saveSettings();
29
30
private
slots:
31
// 应用设置(不关闭对话框)
32
void
applySettings();
33
// 恢复默认设置
34
void
restoreDefaults();
35
// 语言选择变化时的处理
36
void
onLanguageChanged(
int
index);
37
// 主题选择变化时的处理
38
void
onThemeChanged(
int
index);
39
40
private
:
41
// 初始化UI
42
void
setupUi();
43
// 获取可用的语言列表
44
QStringList getAvailableLocales();
45
// 获取可用的键盘主题
46
QStringList getAvailableStyles();
47
// 应用语言设置
48
void
applyLanguage(
const
QString &locale);
49
// 应用主题设置
50
void
applyTheme(
const
QString &theme);
51
// 应用按键音设置
52
void
applyKeySound(
bool
enabled);
53
// 应用按键震动设置
54
void
applyHapticFeedback(
bool
enabled);
55
// 应用按键大小设置
56
void
applyKeySize(
int
size);
57
58
private
:
59
// UI组件
60
QComboBox *m_languageCombo;
61
QComboBox *m_themeCombo;
62
QCheckBox *m_keySoundCheck;
63
QCheckBox *m_hapticCheck;
64
QSlider *m_keySizeSlider;
65
QLabel *m_keySizeLabel;
66
QCheckBox *m_smallTextCheck;
67
QCheckBox *m_autoCapsCheck;
68
QPushButton *m_applyButton;
69
QPushButton *m_okButton;
70
QPushButton *m_cancelButton;
71
QPushButton *m_defaultsButton;
72
73
// 设置存储
74
QSettings *m_settings;
75
76
// 语言列表和当前索引
77
QStringList m_localeList;
78
int
m_currentLocaleIndex;
79
};
Author: Kang Lin (kl222@126.com)
Copyright (c) Kang Lin Studios All Rights Reserved