Css fix and rolling message event, time text fix.
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};
|
||||
mCurrentLabel->move(p3);
|
||||
}
|
||||
emit RollingTimerTriggr();
|
||||
// //滚动
|
||||
// if (mRolling) {
|
||||
// //end rolling, reset next
|
||||
|
||||
@@ -27,6 +27,8 @@ public:
|
||||
~RollingMessageWidget() override;
|
||||
void setMessageList(const QStringList& message);
|
||||
void updateMessagePriority(int innerIndex, int priority);
|
||||
signals:
|
||||
void RollingTimerTriggr();
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent* event) override ;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -40,8 +40,8 @@ mUI(new Ui::PatientDetailForm)
|
||||
mUI->verticalLayout_3->insertWidget(5, widget);
|
||||
|
||||
QHBoxLayout * layout = new QHBoxLayout(widget);
|
||||
mBtnEdit->setObjectName("btnEdit");
|
||||
mBtnDelete->setObjectName("btnDelete");
|
||||
mBtnEdit->setObjectName("btnPatEdit");
|
||||
mBtnDelete->setObjectName("btnPatDelete");
|
||||
mBtnEdit->setText(tr("Edit"));
|
||||
mBtnDelete->setText(tr("Delete"));
|
||||
layout->addWidget(mBtnEdit);
|
||||
|
||||
@@ -25,8 +25,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||
, mBtnAccount(new QToolButton(this))
|
||||
, mBtnWorklist(new QToolButton(this))
|
||||
, mBtnAdd(new QToolButton(this))
|
||||
// , mBtnEdit(new QToolButton(this))
|
||||
// , mBtnDelete(new QToolButton(this))
|
||||
, mBtnTurnOff(new QToolButton(this))
|
||||
, mBtnSelect(new QToolButton(this))
|
||||
, mPatTable(new SlideTableView(this))
|
||||
, mModel(nullptr)
|
||||
@@ -79,8 +78,19 @@ void SelectFormWidget::initGeneralButtons(QHBoxLayout *layout) {
|
||||
mBtnAccount->setObjectName("btnAccount");
|
||||
mBtnAccount->setText(tr("Account"));
|
||||
layout->addWidget(mBtnAccount);
|
||||
mBtnTurnOff->setObjectName("btnShutDown");
|
||||
mBtnTurnOff->setText(tr("ShutDown"));
|
||||
layout->addWidget(mBtnTurnOff);
|
||||
// mBtn account slot
|
||||
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, [&]()
|
||||
{
|
||||
DialogManager::Default()->requestGetWorkList(mModel, mPatTable);
|
||||
|
||||
@@ -34,6 +34,7 @@ private:
|
||||
QToolButton *mBtnEdit;
|
||||
QToolButton *mBtnDelete;
|
||||
QToolButton *mBtnSelect;
|
||||
QToolButton *mBtnTurnOff;
|
||||
SlideTableView *mPatTable;
|
||||
QSqlTableModel *mModel;
|
||||
PatientDetailForm *patientDetailForm;
|
||||
|
||||
@@ -504,6 +504,9 @@ QLabel#PatIcon {
|
||||
QWidget#commandWidget QToolButton#btnAccount {
|
||||
qproperty-icon:url(":/icons/account.png");
|
||||
}
|
||||
QWidget#commandWidget QToolButton#btnShutDown {
|
||||
qproperty-icon:url(":/icons/turnoff.png");
|
||||
}
|
||||
|
||||
QToolButton#btnWorklist {
|
||||
qproperty-icon:url(":/icons/setting.png");
|
||||
@@ -514,13 +517,20 @@ QToolButton#btnAdd {
|
||||
}
|
||||
|
||||
QToolButton#btnEdit {
|
||||
qproperty-icon:url(":/icons/details.png");
|
||||
}
|
||||
|
||||
QToolButton#btnDelete {
|
||||
qproperty-icon:url(":/icons/close_circle.png");
|
||||
}
|
||||
QToolButton#btnPatEdit {
|
||||
border:2px solid grey;
|
||||
qproperty-toolButtonStyle:ToolButtonTextBesideIcon;
|
||||
qproperty-iconSize:120px 120px;
|
||||
qproperty-icon:url(":/icons/details.png");
|
||||
}
|
||||
|
||||
QToolButton#btnDelete {
|
||||
QToolButton#btnPatDelete {
|
||||
border:2px solid grey;
|
||||
qproperty-toolButtonStyle:ToolButtonTextBesideIcon;
|
||||
qproperty-iconSize:120px 120px;
|
||||
|
||||
Reference in New Issue
Block a user