mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
跟随
This commit is contained in:
44
widget.h
44
widget.h
@@ -15,7 +15,9 @@
|
||||
#include <DSettings>
|
||||
#include <DBlurEffectWidget>
|
||||
#include <DSpinner>
|
||||
#define LIST_MAX 99
|
||||
#include <DWaterProgress>
|
||||
#include <QLabel>
|
||||
#define LIST_MAX 99 //一次最多下载数量
|
||||
#define TMP_PATH "/tmp/spark-store"
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
@@ -30,20 +32,15 @@ class Widget : public QWidget
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Widget(QWidget *parent = 0);
|
||||
explicit Widget(QWidget *parent = nullptr);
|
||||
~Widget();
|
||||
void startRequest(QUrl url);
|
||||
void searchApp(QString);
|
||||
int nowDownload=0;
|
||||
int allDownload=0;
|
||||
int isdownload=false;
|
||||
void loadappinfo(QUrl);
|
||||
void chooseLeftMenu(int index);
|
||||
quint64 dirFileSize(const QString &path);
|
||||
QPixmap screen[5];
|
||||
QFuture<void> load;
|
||||
QTimer download_speed;
|
||||
void opensetting();
|
||||
void opensetting(); //打开设置页面
|
||||
void openUrl(QUrl);
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -66,7 +63,6 @@ private slots:
|
||||
void on_pushButton_download_clicked();
|
||||
void on_pushButton_return_clicked();
|
||||
void on_webView_loadStarted();
|
||||
void on_webView_loadFinished();
|
||||
void on_menu_btn_theme_clicked();
|
||||
void on_comboBox_server_currentIndexChanged(const QString &arg1);
|
||||
void on_pushButton_updateServer_clicked();
|
||||
@@ -74,14 +70,13 @@ private slots:
|
||||
void on_pushButton_uninstall_clicked();
|
||||
void on_pushButton_clear_clicked();
|
||||
void on_pushButton_website_clicked();
|
||||
|
||||
void on_webView_loadFinished(bool arg1);
|
||||
void on_webView_loadProgress(int progress);
|
||||
|
||||
public:
|
||||
void initUI();
|
||||
void initConfig();
|
||||
|
||||
QUrl url;
|
||||
bool isBusy=false;
|
||||
|
||||
downloadlist download_list[LIST_MAX];
|
||||
Ui::Widget *ui;
|
||||
QNetworkAccessManager *manager;
|
||||
@@ -92,17 +87,30 @@ public:
|
||||
QString urladdress;
|
||||
QString pkgName;
|
||||
QString appweb;
|
||||
|
||||
private:
|
||||
void initUI();
|
||||
void initConfig();
|
||||
void loadappinfo(QUrl);
|
||||
void chooseLeftMenu(int index);
|
||||
quint64 dirFileSize(const QString &path);
|
||||
|
||||
private:
|
||||
QToolButton * left_list[15];
|
||||
QWidget * left_menu_bg[15];
|
||||
QUrl menuUrl[13];
|
||||
DWaterProgress *m_loadweb=new DWaterProgress;
|
||||
QLabel *m_loaderror=new QLabel;
|
||||
QString serverUrl;
|
||||
bool configCanSave=false;
|
||||
int nowMenu=0;
|
||||
bool isBusy=false;
|
||||
int nowMenu=0; //定位当前菜单
|
||||
long download_size=0;
|
||||
long size1=0;
|
||||
long size2=0;
|
||||
Dtk::Core::DSettings *jsonConfig=new Dtk::Core::DSettings;
|
||||
private:
|
||||
DSpinner *m_loadweb=new DSpinner;
|
||||
QPixmap screen[5];
|
||||
QFuture<void> load;
|
||||
QTimer download_speed;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user