Css fix and rolling message event, time text fix.

This commit is contained in:
kradchen
2023-09-08 13:54:11 +08:00
parent bf0367b3e4
commit fd01be0fe9
7 changed files with 33 additions and 6 deletions

View File

@@ -77,11 +77,14 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
w->setObjectName("borderWidget");
l->addWidget(w);
connect(EventCenter::Default(), &EventCenter::ResponseDeviceTemperature, [=](QObject*, QObject* msg) {
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
if (!msg) return;
QString* s = (QString*)msg;
lockIcon->setText(QString("%1%2").arg(*s).arg(tr("°C")));
});
connect(w,&RollingMessageWidget::RollingTimerTriggr,[=](){
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
});
// connect(EventCenter::Default(), &EventCenter::WarnStateFlagChange, [=](QObject*, QObject* msg) {
// QVariant* var = (QVariant*)msg;
// int v = var->toInt();