first commit

This commit is contained in:
2026-01-02 19:20:35 +09:00
commit a10cb30c4a
94 changed files with 28609 additions and 0 deletions

87
widgets/settingswidget.h Normal file
View File

@@ -0,0 +1,87 @@
#ifndef SETTINGSWIDGET_H
#define SETTINGSWIDGET_H
#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QComboBox>
#include <QSpinBox>
#include <QCheckBox>
#include <QTabWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QGroupBox>
#include <QScrollArea>
/**
* @brief 系统设置页面
* 提供系统参数配置、设备信息、校准设置等功能
*/
class SettingsWidget : public QWidget
{
Q_OBJECT
public:
explicit SettingsWidget(QWidget *parent = nullptr);
signals:
void backRequested();
private slots:
void onSaveClicked();
void onResetClicked();
void onCalibrateClicked();
void onExportLogClicked();
void onClearCacheClicked();
void onFactoryResetClicked();
private:
void setupUI();
QWidget *createDeviceInfoTab();
QWidget *createSystemConfigTab();
QWidget *createCalibrationTab();
QWidget *createNetworkTab();
QWidget *createAboutTab();
QGroupBox *createStyledGroupBox(const QString &title);
// 标题栏
QLabel *m_titleLabel;
QPushButton *m_backBtn;
// 设备信息
QLabel *m_deviceModelLabel;
QLabel *m_serialNumberLabel;
QLabel *m_firmwareVersionLabel;
QLabel *m_hardwareVersionLabel;
// 系统配置
QComboBox *m_languageCombo;
QComboBox *m_themeCombo;
QSpinBox *m_brightnessSpinBox;
QSpinBox *m_volumeSpinBox;
QCheckBox *m_autoSleepCheck;
QSpinBox *m_sleepTimeSpinBox;
// 校准设置
QLabel *m_lastCalibrationLabel;
QLabel *m_calibrationStatusLabel;
// 网络设置
QLineEdit *m_serverAddressEdit;
QSpinBox *m_serverPortSpinBox;
QCheckBox *m_autoConnectCheck;
// 选项卡
QTabWidget *m_tabWidget;
// 样式常量
static const QString LABEL_STYLE;
static const QString VALUE_STYLE;
static const QString BUTTON_STYLE;
static const QString BUTTON_PRIMARY_STYLE;
static const QString BUTTON_DANGER_STYLE;
};
#endif // SETTINGSWIDGET_H