mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 21:02:04 +08:00
设置界面增加选项,控制进入详情页时是否发送“应用不兼容系统”通知 Log: 设置界面添加“其他设置”部分,新增单选框控制是否开启应用不兼容系统提示;SettingsPage 添加静态属性 needUncompatibleNotification,启动时从配置文件中同步开关状态,单选框点击修改时写入配置文件;详情页加载标签时,判断 needUncompatibleNotification 为 false 则不发送通知;更新翻译文件
51 lines
975 B
C++
51 lines
975 B
C++
#ifndef SETTINGSPAGE_H
|
|
#define SETTINGSPAGE_H
|
|
|
|
#include <QWidget>
|
|
#include <QUrl>
|
|
|
|
namespace Ui {
|
|
class SettingsPage;
|
|
}
|
|
|
|
class SettingsPage : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static void setIsDownload(bool isdownload);
|
|
void updateUI();
|
|
explicit SettingsPage(QWidget *parent = nullptr);
|
|
void setTheme(bool dark);
|
|
~SettingsPage();
|
|
|
|
private slots:
|
|
void on_pushButton_updateServer_clicked();
|
|
|
|
void on_comboBox_server_currentIndexChanged(const QString &arg1);
|
|
|
|
void on_pushButton_updateApt_clicked();
|
|
|
|
void on_pushButton_clear_clicked();
|
|
|
|
void on_pushButton_clearWebCache_clicked();
|
|
|
|
void on_checkBox_clicked(bool checked);
|
|
|
|
public:
|
|
static bool needUncompatibleNotification;
|
|
|
|
private:
|
|
static bool isdownload;
|
|
bool configCanSave;
|
|
quint64 dirFileSize(const QString &path);
|
|
void readServerList();
|
|
void initConfig();
|
|
Ui::SettingsPage *ui;
|
|
|
|
signals:
|
|
void openUrl(QUrl spk);
|
|
};
|
|
|
|
#endif // SETTINGSPAGE_H
|