OfficeAssistant_Win10/navbar.h

41 lines
696 B
C++

//
// Created by HW on 2023/07/26.
//
#ifndef OFFICEASSISTANT_NAVBAR_H
#define OFFICEASSISTANT_NAVBAR_H
#include <QWidget>
#include <QList>
#include <map>
#include "MyButton.h"
#include "buttonstruct.h"
QT_BEGIN_NAMESPACE
namespace Ui { class NavBar; }
QT_END_NAMESPACE
class NavBar : public QWidget {
Q_OBJECT
public:
NavBar(QList<ButtonStruct *> &buttonNames,QWidget *parent = nullptr);
~NavBar() override;
protected:
void paintEvent(QPaintEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
private:
Ui::NavBar *ui;
QHBoxLayout *layout;
QList<MyButton *> buttons;
int width2;
int height2;
};
#endif //OFFICEASSISTANT_NAVBAR_H