完成导航条,尚未Debug
This commit is contained in:
@ -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();
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user