Code codec error fixed.
This commit is contained in:
@@ -1,52 +1,57 @@
|
||||
#include "tabformwidget.h"
|
||||
#include "tabformwidget.h"
|
||||
#include "ui_tabformwidget.h"
|
||||
#include <QDateTime>
|
||||
#include "event/EventCenter.h"
|
||||
TabFormWidget::TabFormWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::TabFormWidget)
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||
# pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
|
||||
TabFormWidget::TabFormWidget(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::TabFormWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QPixmap img(":/icons/logo.png");
|
||||
ui->setupUi(this);
|
||||
QPixmap img(":/icons/logo.png");
|
||||
|
||||
ui->logo->setPixmap(img.scaledToHeight(33,Qt::SmoothTransformation));
|
||||
ui->company->setText(tr("浙江衡玖医疗科技"));
|
||||
ui->lbl_msglogo->setPixmap(QPixmap(":/icons/msg.png").scaledToHeight(26,Qt::SmoothTransformation));
|
||||
// ui->lbl_patlogo->setPixmap(QPixmap(":/icons/patient.png").scaledToHeight(26,Qt::SmoothTransformation));
|
||||
ui->spacer_2->setVisible(false);
|
||||
QLabel* hosp = new QLabel(this);
|
||||
hosp->setText(tr("浙江大学医学院附属第二医院"));
|
||||
QLabel* nowDate = new QLabel(this);
|
||||
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
|
||||
QLabel* linkIcon = new QLabel(this);
|
||||
linkIcon->setPixmap(QPixmap(":/icons/link_g.png").scaledToHeight(22,Qt::SmoothTransformation));
|
||||
QLabel* readyIcon = new QLabel(this);
|
||||
readyIcon->setPixmap(QPixmap(":/icons/ready.png").scaledToHeight(22,Qt::SmoothTransformation));
|
||||
QLabel* lockIcon = new QLabel(this);
|
||||
lockIcon->setText("");
|
||||
// lockIcon->setPixmap(QPixmap(":/icons/lock.png").scaledToHeight(22,Qt::SmoothTransformation));
|
||||
QHBoxLayout* layout= new QHBoxLayout(ui->statusBarWidget);
|
||||
layout->setMargin(0);
|
||||
layout->addSpacerItem(new QSpacerItem(10,10,QSizePolicy::Expanding));
|
||||
layout->addWidget(hosp);
|
||||
layout->addWidget(nowDate);
|
||||
QWidget* spacerLine= new QWidget(this);
|
||||
spacerLine->setFixedWidth(2);
|
||||
spacerLine->setObjectName("spacer_2");
|
||||
ui->logo->setPixmap(img.scaledToHeight(33, Qt::SmoothTransformation));
|
||||
ui->company->setText(tr("浙江衡玖医疗科技"));
|
||||
ui->lbl_msglogo->setPixmap(QPixmap(":/icons/msg.png").scaledToHeight(26, Qt::SmoothTransformation));
|
||||
// ui->lbl_patlogo->setPixmap(QPixmap(":/icons/patient.png").scaledToHeight(26,Qt::SmoothTransformation));
|
||||
ui->spacer_2->setVisible(false);
|
||||
QLabel* hosp = new QLabel(this);
|
||||
hosp->setText(tr("浙江大学医学院附属第二医院"));
|
||||
QLabel* nowDate = new QLabel(this);
|
||||
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
|
||||
QLabel* linkIcon = new QLabel(this);
|
||||
linkIcon->setPixmap(QPixmap(":/icons/link_g.png").scaledToHeight(22, Qt::SmoothTransformation));
|
||||
QLabel* readyIcon = new QLabel(this);
|
||||
readyIcon->setPixmap(QPixmap(":/icons/ready.png").scaledToHeight(22, Qt::SmoothTransformation));
|
||||
QLabel* lockIcon = new QLabel(this);
|
||||
lockIcon->setText("");
|
||||
// lockIcon->setPixmap(QPixmap(":/icons/lock.png").scaledToHeight(22,Qt::SmoothTransformation));
|
||||
QHBoxLayout* layout = new QHBoxLayout(ui->statusBarWidget);
|
||||
layout->setMargin(0);
|
||||
layout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
|
||||
layout->addWidget(hosp);
|
||||
layout->addWidget(nowDate);
|
||||
QWidget* spacerLine = new QWidget(this);
|
||||
spacerLine->setFixedWidth(2);
|
||||
spacerLine->setObjectName("spacer_2");
|
||||
|
||||
layout->addWidget(spacerLine);
|
||||
layout->addWidget(linkIcon);
|
||||
layout->addWidget(readyIcon);
|
||||
layout->addWidget(lockIcon);
|
||||
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")));
|
||||
});
|
||||
layout->addWidget(spacerLine);
|
||||
layout->addWidget(linkIcon);
|
||||
layout->addWidget(readyIcon);
|
||||
layout->addWidget(lockIcon);
|
||||
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")));
|
||||
});
|
||||
}
|
||||
|
||||
TabFormWidget::~TabFormWidget()
|
||||
{
|
||||
delete ui;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user