Files
spark-store/src/pages/applistpage.h
zty199 4b40e3caca feat: ISSUE #I67K8Y 新增 spk://search/keyword 链接格式解析
支持打开该链接跳转搜索页面(禁止直接搜索 %,搜索结果过多会导致搜索页面 QtWebEngine 进程崩溃,无法继续搜索)

Log: 支持链接跳转搜索结果页面;暂不支持直接跳转到应用详情页
2023-01-30 16:19:48 +08:00

35 lines
740 B
C++

#ifndef APPLISTPAGE_H
#define APPLISTPAGE_H
#include <QMutex>
#include <QWidget>
#include <QListWidgetItem>
#include "backend/sparkapi.h"
namespace Ui {
class AppListPage;
}
class AppListPage : public QWidget
{
Q_OBJECT
public:
void setTheme(bool dark);
void getSearchList(const QString &keyword);
void getAppList(QString type);
explicit AppListPage(QWidget *parent = nullptr);
~AppListPage();
private:
QMutex mutex; // 禁止多次搜索事件同时发生
bool isDark;
bool isSearch;
QString nowType;
Ui::AppListPage *ui;
signals:
void clicked(QUrl spk);
private slots:
void on_webEngineView_urlChanged(const QUrl &arg1);
};
#endif // APPLISTPAGE_H