Files
Radio/module/radio/component/TopMenuBar.cpp
T
2026-06-16 13:38:08 +08:00

42 lines
1.3 KiB
C++

#include "TopMenuBar.h"
#include "../Global.h"
#include "ShowTime.h"
#include "../BackEnd/MainWidget.h"
#include "../BaseWidget.h"
#include "Wifi.h"
TopMenuBar::TopMenuBar(QWidget *parent) : QWidget(parent) {
int fontSize = 20;
mAM = createButton("AM", fontSize);
mATU = createButton("ATU", fontSize);
mVSQL = createButton("VSQL", fontSize);
mNB = createButton("NB", fontSize);
mNR = createButton("NR", fontSize);
mDNF = createButton("DNF", fontSize);
mPRE = createButton("PRE", fontSize);
mATT = createButton("ATT", fontSize);
mSPL = createButton("SPL", fontSize);
mFIL1 = createButton("FIL1", fontSize);
mAGC_A = createButton("AGC_A", fontSize);
mTextButtonList = new YSG::RollObject<QPushButton>({mAM, mATU, mVSQL, mNB, mNR, mDNF, mPRE, mATT, mSPL, mFIL1, mAGC_A}, [](QPushButton* cur){
}, [](QPushButton* btn){
}, this);
mShowTime = new ShowTime;
mWifi = new Wifi;
QHBoxLayout* statusBar = mTextButtonList->hBoxLayout(2);
statusBar->addStretch(3);
statusBar->addWidget(mWifi, 1);
statusBar->addWidget(mShowTime, 1);
setLayout(statusBar);
}
//void TopMenuBar::paintEvent(QPaintEvent *event) {
// QPainter painter(this);
// painter.fillRect(rect(), Qt::red);
// painter.end();
//}