Merge branch 'master' of http://192.168.1.9:3000/Bug/GUI
This commit is contained in:
@@ -44,6 +44,7 @@ void RollingMessageWidget::timerEvent(QTimerEvent *e) {
|
|||||||
QPoint p3 = {TOTAL_ROLL_DISTANCE + LABEL_MARGIN_LEFT, LABEL_MARGIN_TOP};
|
QPoint p3 = {TOTAL_ROLL_DISTANCE + LABEL_MARGIN_LEFT, LABEL_MARGIN_TOP};
|
||||||
mCurrentLabel->move(p3);
|
mCurrentLabel->move(p3);
|
||||||
}
|
}
|
||||||
|
emit RollingTimerTriggr();
|
||||||
// //滚动
|
// //滚动
|
||||||
// if (mRolling) {
|
// if (mRolling) {
|
||||||
// //end rolling, reset next
|
// //end rolling, reset next
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ public:
|
|||||||
~RollingMessageWidget() override;
|
~RollingMessageWidget() override;
|
||||||
void setMessageList(const QStringList& message);
|
void setMessageList(const QStringList& message);
|
||||||
void updateMessagePriority(int innerIndex, int priority);
|
void updateMessagePriority(int innerIndex, int priority);
|
||||||
|
signals:
|
||||||
|
void RollingTimerTriggr();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void timerEvent(QTimerEvent* event) override ;
|
void timerEvent(QTimerEvent* event) override ;
|
||||||
|
|||||||
@@ -77,11 +77,14 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
|||||||
w->setObjectName("borderWidget");
|
w->setObjectName("borderWidget");
|
||||||
l->addWidget(w);
|
l->addWidget(w);
|
||||||
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"));
|
|
||||||
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")));
|
||||||
});
|
});
|
||||||
|
connect(w,&RollingMessageWidget::RollingTimerTriggr,[=](){
|
||||||
|
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
|
||||||
|
});
|
||||||
|
|
||||||
// connect(EventCenter::Default(), &EventCenter::WarnStateFlagChange, [=](QObject*, QObject* msg) {
|
// connect(EventCenter::Default(), &EventCenter::WarnStateFlagChange, [=](QObject*, QObject* msg) {
|
||||||
// QVariant* var = (QVariant*)msg;
|
// QVariant* var = (QVariant*)msg;
|
||||||
// int v = var->toInt();
|
// int v = var->toInt();
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ mUI(new Ui::PatientDetailForm)
|
|||||||
mUI->verticalLayout_3->insertWidget(5, widget);
|
mUI->verticalLayout_3->insertWidget(5, widget);
|
||||||
|
|
||||||
QHBoxLayout * layout = new QHBoxLayout(widget);
|
QHBoxLayout * layout = new QHBoxLayout(widget);
|
||||||
mBtnEdit->setObjectName("btnEdit");
|
mBtnEdit->setObjectName("btnPatEdit");
|
||||||
mBtnDelete->setObjectName("btnDelete");
|
mBtnDelete->setObjectName("btnPatDelete");
|
||||||
mBtnEdit->setText(tr("Edit"));
|
mBtnEdit->setText(tr("Edit"));
|
||||||
mBtnDelete->setText(tr("Delete"));
|
mBtnDelete->setText(tr("Delete"));
|
||||||
layout->addWidget(mBtnEdit);
|
layout->addWidget(mBtnEdit);
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
|||||||
, mBtnAccount(new QToolButton(this))
|
, mBtnAccount(new QToolButton(this))
|
||||||
, mBtnWorklist(new QToolButton(this))
|
, mBtnWorklist(new QToolButton(this))
|
||||||
, mBtnAdd(new QToolButton(this))
|
, mBtnAdd(new QToolButton(this))
|
||||||
// , mBtnEdit(new QToolButton(this))
|
, mBtnTurnOff(new QToolButton(this))
|
||||||
// , mBtnDelete(new QToolButton(this))
|
|
||||||
, mBtnSelect(new QToolButton(this))
|
, mBtnSelect(new QToolButton(this))
|
||||||
, mPatTable(new SlideTableView(this))
|
, mPatTable(new SlideTableView(this))
|
||||||
, mModel(nullptr)
|
, mModel(nullptr)
|
||||||
@@ -79,8 +78,19 @@ void SelectFormWidget::initGeneralButtons(QHBoxLayout *layout) {
|
|||||||
mBtnAccount->setObjectName("btnAccount");
|
mBtnAccount->setObjectName("btnAccount");
|
||||||
mBtnAccount->setText(tr("Account"));
|
mBtnAccount->setText(tr("Account"));
|
||||||
layout->addWidget(mBtnAccount);
|
layout->addWidget(mBtnAccount);
|
||||||
|
mBtnTurnOff->setObjectName("btnShutDown");
|
||||||
|
mBtnTurnOff->setText(tr("ShutDown"));
|
||||||
|
layout->addWidget(mBtnTurnOff);
|
||||||
// mBtn account slot
|
// mBtn account slot
|
||||||
connect(mBtnAccount, &QToolButton::clicked, DialogManager::Default(),&DialogManager::requestEditSelfAccount);
|
connect(mBtnAccount, &QToolButton::clicked, DialogManager::Default(),&DialogManager::requestEditSelfAccount);
|
||||||
|
connect(mBtnTurnOff, &QToolButton::clicked, []()
|
||||||
|
{
|
||||||
|
if(DialogManager::Default()->requestAlertMessage(QString(tr("Shut down now ?")), DialogButtonMode::OkAndCancel,tr("Shut Down")) == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
LOG_USER_OPERATION("Shut Down")
|
||||||
|
EventCenter::Default()->triggerEvent(GUIEvents::RequestShutdown, nullptr, nullptr);
|
||||||
|
}
|
||||||
|
});
|
||||||
connect(mBtnWorklist, &QToolButton::clicked, [&]()
|
connect(mBtnWorklist, &QToolButton::clicked, [&]()
|
||||||
{
|
{
|
||||||
DialogManager::Default()->requestGetWorkList(mModel, mPatTable);
|
DialogManager::Default()->requestGetWorkList(mModel, mPatTable);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ private:
|
|||||||
QToolButton *mBtnEdit;
|
QToolButton *mBtnEdit;
|
||||||
QToolButton *mBtnDelete;
|
QToolButton *mBtnDelete;
|
||||||
QToolButton *mBtnSelect;
|
QToolButton *mBtnSelect;
|
||||||
|
QToolButton *mBtnTurnOff;
|
||||||
SlideTableView *mPatTable;
|
SlideTableView *mPatTable;
|
||||||
QSqlTableModel *mModel;
|
QSqlTableModel *mModel;
|
||||||
PatientDetailForm *patientDetailForm;
|
PatientDetailForm *patientDetailForm;
|
||||||
|
|||||||
@@ -504,6 +504,9 @@ QLabel#PatIcon {
|
|||||||
QWidget#commandWidget QToolButton#btnAccount {
|
QWidget#commandWidget QToolButton#btnAccount {
|
||||||
qproperty-icon:url(":/icons/account.png");
|
qproperty-icon:url(":/icons/account.png");
|
||||||
}
|
}
|
||||||
|
QWidget#commandWidget QToolButton#btnShutDown {
|
||||||
|
qproperty-icon:url(":/icons/turnoff.png");
|
||||||
|
}
|
||||||
|
|
||||||
QToolButton#btnWorklist {
|
QToolButton#btnWorklist {
|
||||||
qproperty-icon:url(":/icons/setting.png");
|
qproperty-icon:url(":/icons/setting.png");
|
||||||
@@ -514,13 +517,20 @@ QToolButton#btnAdd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QToolButton#btnEdit {
|
QToolButton#btnEdit {
|
||||||
|
qproperty-icon:url(":/icons/details.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton#btnDelete {
|
||||||
|
qproperty-icon:url(":/icons/close_circle.png");
|
||||||
|
}
|
||||||
|
QToolButton#btnPatEdit {
|
||||||
border:2px solid grey;
|
border:2px solid grey;
|
||||||
qproperty-toolButtonStyle:ToolButtonTextBesideIcon;
|
qproperty-toolButtonStyle:ToolButtonTextBesideIcon;
|
||||||
qproperty-iconSize:120px 120px;
|
qproperty-iconSize:120px 120px;
|
||||||
qproperty-icon:url(":/icons/details.png");
|
qproperty-icon:url(":/icons/details.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolButton#btnDelete {
|
QToolButton#btnPatDelete {
|
||||||
border:2px solid grey;
|
border:2px solid grey;
|
||||||
qproperty-toolButtonStyle:ToolButtonTextBesideIcon;
|
qproperty-toolButtonStyle:ToolButtonTextBesideIcon;
|
||||||
qproperty-iconSize:120px 120px;
|
qproperty-iconSize:120px 120px;
|
||||||
|
|||||||
Reference in New Issue
Block a user