Add UsctStateManager and add DmsState in GUI.

This commit is contained in:
sunwen
2024-05-13 18:08:18 +08:00
parent 2c2b20ee55
commit e228ec73b4
6 changed files with 131 additions and 12 deletions

View File

@@ -61,10 +61,17 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
});
auto readyIcon = new QToolButton(this);
readyIcon->setIcon(QIcon(":/icons/dicom/echo_suc.png"));
readyIcon->setObjectName("ready");
connect(readyIcon, &QToolButton::clicked,[=](){
emit warnBtnClicked();
});
connect(EventCenter::Default(), &EventCenter::UsctStateUpdated,[readyIcon](QObject*, QObject* msg)
{
bool state = *(bool*)msg;
QIcon icon(state ? ":/icons/dicom/echo_suc.png" :":/icons/dicom/echo_fail.png" );
readyIcon->setIcon(icon);
});
auto lockIcon = new QLabel(this);
lockIcon->setText("");