mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 21:02:04 +08:00
git-subtree-dir: spark-update-tool git-subtree-mainline:286f34f3f8git-subtree-split:e5217b3829
37 lines
817 B
C++
37 lines
817 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include "aptssupdater.h"
|
|
#include "applistmodel.h"
|
|
#include "appdelegate.h"
|
|
#include <QListView>
|
|
#include <QJsonArray> // 添加头文件
|
|
#include <QScreen>
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
QT_END_NAMESPACE
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
void checkUpdates();
|
|
void initStyle();
|
|
void runAptssUpgrade();
|
|
AppListModel *m_model;
|
|
AppDelegate *m_delegate;
|
|
QListView *listView; // 声明 QListView 指针
|
|
QJsonArray m_allApps; // 新增:保存所有应用数据
|
|
void filterAppsByKeyword(const QString &keyword); // 新增:搜索过滤函数声明
|
|
};
|
|
#endif // MAINWINDOW_H
|