Add a button to Topbar to call out WarningMessage above mainwindow , make the WarningMEssagewidget be popup widget.
This commit is contained in:
@@ -7,8 +7,11 @@
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QDateTime>
|
||||
#include <QToolButton>
|
||||
|
||||
|
||||
#include "components/RollingMessageWidget.h"
|
||||
|
||||
#include "event/EventCenter.h"
|
||||
#include "errorhandle/GUIErrorLW.h"
|
||||
#include "json/jsonobject.h"
|
||||
@@ -51,8 +54,13 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
||||
QPixmap pixmap(*isConnected ? ":/icons/link_g.png" : ":/icons/link_r.png");
|
||||
linkIcon->setPixmap(QPixmap(pixmap));
|
||||
});
|
||||
auto readyIcon = new QLabel(this);
|
||||
|
||||
auto readyIcon = new QToolButton(this);
|
||||
readyIcon->setObjectName("ready");
|
||||
connect(readyIcon, &QToolButton::clicked,[=](){
|
||||
emit warnBtnClicked();
|
||||
});
|
||||
|
||||
auto lockIcon = new QLabel(this);
|
||||
lockIcon->setText("");
|
||||
auto status_layout = new QHBoxLayout(statusBarWidget);
|
||||
@@ -66,8 +74,9 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
||||
|
||||
layout->addWidget(spacerLine);
|
||||
layout->addWidget(linkIcon);
|
||||
layout->addWidget(readyIcon);
|
||||
layout->addWidget(lockIcon);
|
||||
layout->addWidget(readyIcon);
|
||||
|
||||
|
||||
auto l = new QVBoxLayout(widgetMsg);
|
||||
l->setMargin(0);
|
||||
|
||||
Reference in New Issue
Block a user