完成导航条,尚未Debug

This commit is contained in:
Mike Solar
2023-07-30 01:06:42 +08:00
parent b9559e444b
commit 9fac130a24
31 changed files with 332 additions and 142 deletions

View File

@ -8,8 +8,14 @@
#include <QWidget>
#include <QList>
#include <map>
#include "netio.h"
#include "MyButton.h"
#include <QColor>
#include <QPainter>
#include <QResizeEvent>
#include "buttonstruct.h"
#include <QtNetwork/QtNetwork>
QT_BEGIN_NAMESPACE
namespace Ui { class NavBar; }
@ -19,7 +25,7 @@ class NavBar : public QWidget {
Q_OBJECT
public:
NavBar(QList<ButtonStruct *> &buttonNames,QWidget *parent = nullptr);
NavBar(ConfigResponse *configResponse,QWidget *parent = nullptr);
~NavBar() override;
protected:
@ -30,10 +36,22 @@ protected:
private:
Ui::NavBar *ui;
QHBoxLayout *layout;
QColor qColor;
QList<MyButton *> buttons;
QList<ButtonStruct> buttonStructs;
QByteArray *buffer;
int width2;
int height2;
QNetworkAccessManager *manager;
QNetworkReply *reply;
QEventLoop eventLoop;
QImage *logo;
bool downloadSuccess=true;
void getLogoFromInternet(ConfigResponse *configResponse);
void getLogoFromLocal();
private slots:
void storeToBuffer();
void cancelDownload();
};