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