Add check recon connection and restart create recon record.

This commit is contained in:
sunwen
2023-09-06 18:01:48 +08:00
parent f9a99925a6
commit 663b8d8f35
9 changed files with 80 additions and 5 deletions

View File

@@ -43,6 +43,14 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
auto linkIcon = new QLabel(this);
linkIcon->setObjectName("link");
QPixmap pixmap(":/icons/link_r.png");
linkIcon->setPixmap(pixmap);
connect(EventCenter::Default(), &EventCenter::ReconConnectionUpdated,[linkIcon](QObject*, QObject* msg)
{
bool* isConnected = (bool*)msg;
QPixmap pixmap(*isConnected ? ":/icons/link_g.png" : ":/icons/link_r.png");
linkIcon->setPixmap(QPixmap(pixmap));
});
auto readyIcon = new QLabel(this);
readyIcon->setObjectName("ready");
auto lockIcon = new QLabel(this);