diff --git a/src/SelectFormWidget.cpp b/src/SelectFormWidget.cpp index 0d5a2e1..c471634 100644 --- a/src/SelectFormWidget.cpp +++ b/src/SelectFormWidget.cpp @@ -161,11 +161,15 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) : }); connect(btnAdd, &QToolButton::clicked, [=]() { + edit_patient->show(); + btnShowEdit->hide(); edit_patient->clearPatientInformation(); edit_patient->setEditEnable(true); btnSelect->setEnabled(false); }); connect(btnEdit, &QToolButton::clicked, [=]() { + edit_patient->show(); + btnShowEdit->hide(); table->clicked(table->currentIndex()); edit_patient->setEditEnable(true); btnSelect->setEnabled(false); @@ -238,6 +242,8 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) : } else { currentRow = -1; + edit_patient->editCancel(); + edit_patient->clearPatientInformation(); } } else { diff --git a/src/TopBarWidget.cpp b/src/TopBarWidget.cpp index e49c42d..2fd7ae9 100644 --- a/src/TopBarWidget.cpp +++ b/src/TopBarWidget.cpp @@ -9,6 +9,7 @@ #include #include "event/EventCenter.h" #include "errorhandle/GUIErrorLW.h" +#include "json/jsonobject.h" TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) { QHBoxLayout* layout = new QHBoxLayout(this); @@ -32,13 +33,14 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, layout->addWidget(lbl_msglogo); QWidget* widgetMsg = new QWidget(this); - layout->addWidget(widgetMsg); - widgetMsg->setObjectName("need_border"); - + layout->addWidget(widgetMsg,1); +// widgetMsg->setObjectName("need_border"); + widgetMsg->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); + layout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding)); QWidget* statusBarWidget = new QWidget(this); layout->addWidget(statusBarWidget); QLabel* hosp = new QLabel(this); -// hosp->setText(tr("浙江大学医学院附属第二医院")); + hosp->setText(JsonObject::Instance()->institutionName()); QLabel* nowDate = new QLabel(this); nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); QLabel* linkIcon = new QLabel(this); @@ -50,7 +52,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, // lockIcon->setPixmap(QPixmap(":/icons/lock.png").scaledToHeight(22,Qt::SmoothTransformation)); QHBoxLayout* status_layout = new QHBoxLayout(statusBarWidget); status_layout->setMargin(0); - status_layout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding)); + status_layout->addWidget(hosp); status_layout->addWidget(nowDate); QWidget* spacerLine = new QWidget(this); diff --git a/src/components/RollingMessageWidget.cpp b/src/components/RollingMessageWidget.cpp index e6288f2..3f96d82 100644 --- a/src/components/RollingMessageWidget.cpp +++ b/src/components/RollingMessageWidget.cpp @@ -6,27 +6,19 @@ #include #include #include +#include -const int ROLL_DISTANCE = 32; -const int WAIT_TIMES = 30; +const int WAIT_TIMES = 60; RollingMessageWidget::RollingMessageWidget(QWidget *parent) :QWidget(parent){ this->setFixedHeight(36); - this->setFixedWidth(500); +// this->setMinimumWidth(1000); + + this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred); label_current = new QLabel(this); label_next = new QLabel(this); - QPoint p1 = this->mapToGlobal({5,2}); - label_current->setFixedSize(400, 30); - label_current->show(); - label_current->move(p1); - label_current->setText(tr("Message of warn!")); - QPoint p2 = this->mapToGlobal({5,-30}); - label_next->setFixedSize(400, 30); - label_next->show(); - label_next->move(p2); - label_next->setText(tr("Message2 of warn!")); - timerId = startTimer(100); + } void RollingMessageWidget::timerEvent(QTimerEvent *e) { @@ -35,29 +27,34 @@ void RollingMessageWidget::timerEvent(QTimerEvent *e) { if (rolling) { //end rolling, reset next if (rollStep == ROLL_DISTANCE){ - std::swap(label_current,label_next); + waitStep = 0; rolling = false; - QPoint p3 = this->mapToGlobal({5,-30}); - p3.setX(label_next->geometry().x()); - label_next->move(p3); + QPoint p3 = {ROLL_DISTANCE+5,2}; +// p3.setY(label_next->geometry().y()); + label_current->move(p3); +// printf("move last to 505,2\n"); + std::swap(label_current,label_next); return; } //rolling - QPoint p1 = label_current->geometry().topLeft(); - p1.setY(p1.y()+1); - label_current->move(p1); - QPoint p2 = label_next->geometry().topLeft(); - p2.setY(p2.y()+1); - label_next->move(p2); - rollStep++; + rollStep+=2; + QPoint p1 = {ROLL_DISTANCE+5 - rollStep,2}; + label_next->move(p1); + if (p1.x()-label_current->geometry().x()<=label_current->width()+20) + { + QPoint p2 = {label_current->geometry().x()-2,2}; + label_current->move(p2); + } + return ; } else{ //有等待的高优先级消息时,不停顿 - if (waitStep == WAIT_TIMES || waitPriorityCount > 0){ + if (waitStep == WAIT_TIMES || (waitPriorityCount > 0 && waitStep == WAIT_TIMES/3)){ locker.lock(); label_next->setText(getNextMessage()); + label_next->setFixedWidth(label_next->text().length()*16); locker.unlock(); } else{ waitStep++; @@ -144,3 +141,26 @@ QString RollingMessageWidget::getNextMessage() { waitStep = 0; return ret; } + +void RollingMessageWidget::showEvent(QShowEvent *event) { + QWidget::showEvent(event); + if (!init) + { + ROLL_DISTANCE = this->width(); + QPoint p1 = {5,2}; + label_current->setFixedHeight(30); + label_current->show(); + label_current->move(p1); + label_current->setText(tr("Message of warn!")); + label_current->setFixedWidth(label_current->text().length()*16); + QPoint p2 = {ROLL_DISTANCE+5,2}; + label_next->setFixedHeight(30); + label_next->show(); + label_next->move(p2); + label_next->setText(tr("Message2 of warn!")); + label_next->setFixedWidth(label_next->text().length()*16); + + timerId = startTimer(40); + init = true; + } +} diff --git a/src/components/RollingMessageWidget.h b/src/components/RollingMessageWidget.h index 33814d9..e67d3e5 100644 --- a/src/components/RollingMessageWidget.h +++ b/src/components/RollingMessageWidget.h @@ -27,8 +27,10 @@ public: explicit RollingMessageWidget(QWidget *parent = nullptr); void setMessageList(const QStringList& message); void updateMessagePriority(int innerIndex, int priority); + protected: void timerEvent(QTimerEvent* event) override ; + void showEvent(QShowEvent *event) override ; QString getNextMessage(); private: int timerId = -1; @@ -41,6 +43,8 @@ private: QLabel* label_next = nullptr; QList messages; QMutex locker; + bool init = false; + int ROLL_DISTANCE=2000; }; diff --git a/src/device/DeviceManager.cpp b/src/device/DeviceManager.cpp index 63af294..1e22d63 100644 --- a/src/device/DeviceManager.cpp +++ b/src/device/DeviceManager.cpp @@ -39,12 +39,15 @@ std::string getJsonFromPatInf(QObject* obj) void ErrorCallback(const char* msg) { - DeviceManager::Default()->setErrorOccurred(true); - printf("Error Callback , message:%s\r\n", msg); - QString m(msg); - THROW_ERROR(m); + DeviceManager::Default()->emitErrorCallback(msg); } +void DeviceManager::emitErrorCallback(const char *msg) { + this->setErrorOccurred(true); + printf("Error Callback , message:%s\r\n", msg); + QString m(msg); + emit raiseGlobalError( m); +} void DeviceManager::initDevice() { diff --git a/src/device/DeviceManager.h b/src/device/DeviceManager.h index 9b1ef01..3b67480 100644 --- a/src/device/DeviceManager.h +++ b/src/device/DeviceManager.h @@ -11,17 +11,20 @@ class DeviceManager :public QObject { Q_OBJECT public: - static DeviceManager* Default() { - static DeviceManager manager; - return &manager; - } - void initDevice(); - void setErrorOccurred(bool v) { - errorOccurred = v; - } - bool getErrorOccurred() { - return errorOccurred; - } + static DeviceManager* Default(){ + static DeviceManager manager; + return &manager; + } + void initDevice(); + void setErrorOccurred(bool v){ + errorOccurred = v; + } + bool getErrorOccurred(){ + return errorOccurred; + } + void emitErrorCallback(const char * msg); + signals: + void raiseGlobalError(QString msg); protected: void timerEvent(QTimerEvent* event) override; diff --git a/src/errorhandle/GUIErrorFactory.cpp b/src/errorhandle/GUIErrorFactory.cpp index 663ed70..60a8f79 100644 --- a/src/errorhandle/GUIErrorFactory.cpp +++ b/src/errorhandle/GUIErrorFactory.cpp @@ -27,5 +27,7 @@ GUIErrorBase *GUIErrorFactory::getError(const QString &errorMsg) { return error; } } - return new GUIErrorLE; + auto error = new GUIErrorLE; + error->parse(errorMsg); + return error; } diff --git a/src/errorhandle/GUIErrorHandle.cpp b/src/errorhandle/GUIErrorHandle.cpp index de49604..1592635 100644 --- a/src/errorhandle/GUIErrorHandle.cpp +++ b/src/errorhandle/GUIErrorHandle.cpp @@ -21,5 +21,6 @@ void GUIErrorHandle::init() { // error->setErrorHandleParent(qApp->activeWindow()); // } error->handle(); + delete error; }); } diff --git a/src/errorhandle/GUIErrorLE.cpp b/src/errorhandle/GUIErrorLE.cpp index 828252e..d9d1a38 100644 --- a/src/errorhandle/GUIErrorLE.cpp +++ b/src/errorhandle/GUIErrorLE.cpp @@ -12,6 +12,8 @@ void GUIErrorLE::parse(const QString &errorMsg) { if (errorMsg[0] == 'e' && errorMsg[1] == ' ') { errorMessage = errorMsg.right(errorMsg.length()-2); + } else{ + errorMessage = errorMsg; } } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 46a5adc..4c27508 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -161,6 +161,7 @@ MainWindow::MainWindow(QWidget* parent) : } qApp->processEvents(); }); + connect(DeviceManager::Default(),&DeviceManager::raiseGlobalError,this,&MainWindow::triggerError,Qt::ConnectionType::QueuedConnection); GUIErrorHandle::Default()->init(); l = new LoginWindow(this); QThread* t = QThread::create([]() { @@ -262,3 +263,9 @@ void MainWindow::debugConsoleOn() { //clear buffer before redirect; this->console = text_edit; } + +void MainWindow::triggerError(const QString & msg) { + QString s(msg); + qDebug()<<"invoke trigger error slot msg:"<triggerEvent(GUIErrorRaise, nullptr,(QObject*)&s); +} diff --git a/src/mainwindow.h b/src/mainwindow.h index c816bba..ea06e64 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -28,10 +28,12 @@ public: void requestLogin(); QTextEdit* getEdit(); void debugConsoleOn(); - + public slots: + void triggerError(const QString&); protected: void changeEvent(QEvent* event); + private: void loadStyleSheet(const QString& sheetName); cJSON* json_root = nullptr; diff --git a/src/stylesheet/Dark2.css b/src/stylesheet/Dark2.css index 8c5d6df..78d0d48 100644 --- a/src/stylesheet/Dark2.css +++ b/src/stylesheet/Dark2.css @@ -1 +1 @@ - /*------1.silver-->grey--------------------------*/ *{background-color:#3c3c3c; color:#fcfcfc;margin:0;font-size:16px;} QTabBar::tab { height:60px; width:300px; font-size: 25px; background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #505050, stop: 1.0 #333333); border: 2px solid #505050; border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; min-width: 8ex; padding: 2px; } QTabBar::tab:selected, QTabBar::tab:hover { border-top:5px solid #4a88c7; background: #505050;} QTabWidget::pane{margin:0} QPlainTextEdit{border:0px} QGroupBox{border:0px} QLabel{color:#fcfcfc; font-weight:bold; font-size:16px;} QLineEdit{min-height:36px;max-height:36px; border:1px solid #505050;color:grey;border-radius:3px;} QLineEdit:enabled{background-color: #505050;color:#fcfcfc;} QDateEdit{min-height:36px;max-height:36px; border:1px solid #505050;color:grey;border-radius:3px;} QDateEdit:enabled{background-color: #505050;color:#fcfcfc;} QTextEdit{ border:1px solid #505050;color:grey;border-radius:3px;} QTextEdit:enabled{background-color: #505050;color:#fcfcfc;} QComboBox{text-align:center;min-height:36px;max-height:36px; border:1px solid #505050} QComboBox:enabled{background-color: #505050} QComboBox::drop-down{width:20px} QComboBox QAbstractItemView{min-width:120px;} QComboBox QAbstractItemView::item {min-height:60px;max-height:60px; border:1px solid white;} QWidget QToolButton#showeditBtn{border-top:1px solid darkgray;border-bottom:1px solid darkgray;border-left:1px solid darkgray;border-radius: 0;border-bottom-left-radius:10px;background: #505050;font-size:20px;font-weight:normal; } QWidget QToolButton#hideeditBtn{border-top:1px solid darkgray;border-bottom:1px solid darkgray;border-left:1px solid darkgray;border-radius: 0;border-top-left-radius:10px;border-bottom-left-radius:10px;background: #505050;font-size:20px;font-weight:normal; } QWidget QToolButton{border:none;border-radius:10%;font-size:26px; font-weight:Bold;padding:5px;} QWidget QToolButton:disabled{color:#606060;} QWidget QToolButton:hover{background:#505050;} QWidget QToolButton:checked{border:5px solid darkorange;padding:0px;} QPushButton{border:1px solid #505050 ;padding-left:50px;padding-right:50px; border-radius:5px; min-height:28px; max-height:28px; background:qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #505050, stop:1 #606060);} QListView{border:none;margin:5px; font-weight:bold} QListView::item{background:#4d4d4d;min-height:30px; border:1px solid #505050; border-radius:5px} QListView::item:selected{background:#365880;font-weight:bold;color:#fcfcfc;} /*QListView::item:selected{ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ABAFE5, stop: 1 #8588B2); border:1px solid #505050; }*/ QHeaderView::section{background-color:#595959;min-height:50px;max-height:50px;font-weight:Bold; font-size:16px; border:1px solid #323232;} QHeaderView::section:horizontal{border-bottom: 1px solid rgb(0,170,255);} QHeaderView::section:vertical{min-height:36px;max-height:36px;} QTableView{border:none;alternate-background-color: #595959;selection-color:#fcfcfc;selection-background-color:#0078d8} /*-----------Specific---------------*/ QLabel#sliderPickerLabel{color:grey;padding:0;background:#505050;font-weight:normal;font-size:50px;} QWidget#topbarWidget{min-height:36px;max-height:36px;} QWidget#contentWidget{border-top:1px solid #505050;} QWidget#commandWidget{min-height:123px;max-height:123px;border-top:1px solid #505050; border-bottom:1px solid #323232;} QLabel#logo{min-width:30px;max-width:30px} QLabel#company{min-width:150px;max-width:150px; } QLabel#systemMsgBar{min-width:500px;} QLabel#warn{color:#CCCC00;background:transparent;font-size:20px;} QWidget QWidget#statusBarWidget{min-width:300px;} QToolButton#btn_main{border:2px solid #0078d8;border-radius:10%;font-size:26px; font-weight:Bold;padding:5px;} QWidget#editcmdWidget{min-height:83px;max-height:83px;} QWidget#verSpaceLine{ border-right:1px solid #0078d8;} QWidget#topBottomLine{ border-top:2px solid #0078d8;border-bottom:2px solid #0078d8;background:transparent;} /*-----Settings*/ QPushButton#BigBtn{ padding-left:0px; padding-right:0px; min-height:60px; max-height:60px; min-width:140px; max-width:140px; font-size: 20px; font-weight:bold; } /*-----蒙版Dialog-----*/ QDialog QWidget#innerWidget{background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0.0 darkgray, stop: 0.5 lightgray, stop: 1.0 darkgray);border-radius:20px;border:5px solid #0078d8; } QDialog#MessageDialog QWidget QWidget{ background:transparent;color:#3078d8;} QDialog#MessageDialog QWidget QWidget QLabel{ font-size:30px} #spacer_1, #spacer_2{min-width:2px;max-width:2px;margin-top:6px;margin-bottom:6px;border-right:1px solid #0078d8;} /*-----FormDialog-----*/ QPushButton#btnOK{background:#365880; font-weight:bold} QDialog#formDialog{border:3px solid grey; border-radius:8px} QWidget#slider_one{border:1px solid #505050; border-radius:8px} QWidget#formWidget QLabel#endline{border-bottom:1px solid grey} QWidget#formWidget{font-size:30px;} QLabel#title{font-size:30px; border-bottom:1px solid #3078d8 } QWidget#edit_patient{min-width:300px;max-width:300px;} QToolButton#sexBtn{min-width:120px;max-width:120px;font-size:20px;padding:2px;} QToolButton#sexBtn:disabled{color:grey} QWidget#sexpanelwidget{border:1px solid #505050;} QWidget#sexpanelwidget:enabled{background-color: #505050;} QToolButton#sexBtn:checked{border:2px solid darkorange;padding:0px;} /*---------Abount----------*/ QLabel#normal{color:#fcfcfc; font-weight:normal; font-size:16px;} QDialog#loginform{background-color:#3c3c3c; color:white;margin:0;font-size:16px;} QDialog#loginform QLabel#title{font-Size:98px;color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0.0 darkgray, stop: 0.5 lightgray, stop: 1.0 darkgray);} QLabel#warn{color:#930000;background:transparent;font-size:20px;} QFrame#login_frame_username{min-width:700px;max-width:700px;max-height:500px;min-height:500px; border:1px solid #0078d8;border-radius:20px; background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 darkgray, stop: 0.5 gray, stop: 1.0 darkgray);} QDialog#loginform QLineEdit{min-height:100px;max-height:100px; border:1px solid silver;border-radius:10px;font-size:26px;} QDialog#loginform QLineEdit:enabled{background-color: #515151} QDialog#loginform QToolButton#btnlogin{min-height:100px;max-height:100px; min-width:border:1px solid #505050; border-radius:10%;font-size:26px; font-weight:Bold;padding:5px;} QDialog#loginform QToolButton#btnlogin:hover{background:#505050;} \ No newline at end of file + /*------1.silver-->grey--------------------------*/ *{background-color:#3c3c3c; color:#fcfcfc;margin:0;font-size:16px;} QWidget#need_border{border:1px solid white} QTabBar::tab { height:60px; width:300px; font-size: 25px; background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #505050, stop: 1.0 #333333); border: 2px solid #505050; border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; min-width: 8ex; padding: 2px; } QTabBar::tab:selected, QTabBar::tab:hover { border-top:5px solid #4a88c7; background: #505050;} QTabWidget::pane{margin:0} QPlainTextEdit{border:0px} QGroupBox{border:0px} QLabel{color:#fcfcfc; font-weight:bold; font-size:16px;} QLineEdit{min-height:36px;max-height:36px; border:1px solid #505050;color:grey;border-radius:3px;} QLineEdit:enabled{background-color: #505050;color:#fcfcfc;} QDateEdit{min-height:36px;max-height:36px; border:1px solid #505050;color:grey;border-radius:3px;} QDateEdit:enabled{background-color: #505050;color:#fcfcfc;} QTextEdit{ border:1px solid #505050;color:grey;border-radius:3px;} QTextEdit:enabled{background-color: #505050;color:#fcfcfc;} QComboBox{text-align:center;min-height:36px;max-height:36px; border:1px solid #505050} QComboBox:enabled{background-color: #505050} QComboBox::drop-down{width:20px} QComboBox QAbstractItemView{min-width:120px;} QComboBox QAbstractItemView::item {min-height:60px;max-height:60px; border:1px solid white;} QWidget QToolButton#showeditBtn{border-top:1px solid darkgray;border-bottom:1px solid darkgray;border-left:1px solid darkgray;border-radius: 0;border-bottom-left-radius:10px;font-size:20px;font-weight:normal; } QWidget QToolButton#hideeditBtn{border-top:1px solid darkgray;border-bottom:1px solid darkgray;border-left:1px solid darkgray;border-radius: 0;border-top-left-radius:10px;border-bottom-left-radius:10px;font-size:20px;font-weight:normal; } QWidget QToolButton{border:none;border-radius:10%;font-size:26px;background: #505050; font-weight:Bold;padding:5px;} QWidget QToolButton:disabled{border:none;color:#606060;background:#3c3c3c} QWidget QToolButton:hover{background:#505050;} QWidget QToolButton:checked{border:5px solid darkorange;padding:0px;} QPushButton{border:1px solid #505050 ;padding-left:50px;padding-right:50px; border-radius:5px; min-height:28px; max-height:28px; background:qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #505050, stop:1 #606060);} QListView{border:none;margin:5px; font-weight:bold} QListView::item{background:#4d4d4d;min-height:30px; border:1px solid #505050; border-radius:5px} QListView::item:selected{background:#365880;font-weight:bold;color:#fcfcfc;} /*QListView::item:selected{ background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ABAFE5, stop: 1 #8588B2); border:1px solid #505050; }*/ QHeaderView::section{background-color:#595959;min-height:50px;max-height:50px;font-weight:Bold; font-size:16px; border:1px solid #323232;} QHeaderView::section:horizontal{border-bottom: 1px solid rgb(0,170,255);} QHeaderView::section:vertical{min-height:36px;max-height:36px;} QTableView{border:none;alternate-background-color: #595959;selection-color:#fcfcfc;selection-background-color:#0078d8} /*-----------Specific---------------*/ QLabel#sliderPickerLabel{color:grey;padding:0;background:#505050;font-weight:normal;font-size:50px;} QWidget#topbarWidget{min-height:36px;max-height:36px;} QWidget#contentWidget{border-top:1px solid #505050;} QWidget#commandWidget{min-height:123px;max-height:123px;border-top:1px solid #505050; border-bottom:1px solid #323232;} QLabel#logo{min-width:30px;max-width:30px} QLabel#company{min-width:150px;max-width:150px; } QLabel#systemMsgBar{min-width:500px;} QLabel#warn{color:#CCCC00;background:transparent;font-size:20px;} QWidget QWidget#statusBarWidget{min-width:300px;} QToolButton#btn_main{border:2px solid #0078d8;border-radius:10%;font-size:26px; font-weight:Bold;padding:5px;} QWidget#editcmdWidget{min-height:83px;max-height:83px;} QWidget#verSpaceLine{ border-right:1px solid #0078d8;} QWidget#topBottomLine{ border-top:2px solid #0078d8;border-bottom:2px solid #0078d8;background:transparent;} /*-----Settings*/ QPushButton#BigBtn{ padding-left:0px; padding-right:0px; min-height:60px; max-height:60px; min-width:140px; max-width:140px; font-size: 20px; font-weight:bold; } /*-----蒙版Dialog-----*/ QDialog QWidget#innerWidget{background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0.0 darkgray, stop: 0.5 lightgray, stop: 1.0 darkgray);border-radius:20px;border:5px solid #0078d8; } QDialog#MessageDialog QWidget QWidget{ background:transparent;color:#3078d8;} QDialog#MessageDialog QWidget QWidget QLabel{ font-size:30px} #spacer_1, #spacer_2{min-width:2px;max-width:2px;margin-top:6px;margin-bottom:6px;border-right:1px solid #0078d8;} /*-----FormDialog-----*/ QPushButton#btnOK{background:#365880; font-weight:bold} QDialog#formDialog{border:3px solid grey; border-radius:8px} QWidget#slider_one{border:1px solid #505050; border-radius:8px} QWidget#formWidget QLabel#endline{border-bottom:1px solid grey} QWidget#formWidget{font-size:30px;} QLabel#title{font-size:30px; border-bottom:1px solid #3078d8 } QWidget#edit_patient{min-width:300px;max-width:300px;} QToolButton#sexBtn{min-width:120px;max-width:120px;font-size:20px;padding:2px;} QToolButton#sexBtn:disabled{color:grey} QWidget#sexpanelwidget{border:1px solid #505050;} QWidget#sexpanelwidget:enabled{background-color: #505050;} QToolButton#sexBtn:checked{border:2px solid darkorange;padding:0px;} /*---------Abount----------*/ QLabel#normal{color:#fcfcfc; font-weight:normal; font-size:16px;} QDialog#loginform{background-color:#3c3c3c; color:white;margin:0;font-size:16px;} QDialog#loginform QLabel#title{font-Size:98px;color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0.0 darkgray, stop: 0.5 lightgray, stop: 1.0 darkgray);} QLabel#warn{color:#930000;background:transparent;font-size:20px;} QFrame#login_frame_username{min-width:700px;max-width:700px;max-height:500px;min-height:500px; border:1px solid #0078d8;border-radius:20px; background:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0.0 darkgray, stop: 0.5 gray, stop: 1.0 darkgray);} QDialog#loginform QLineEdit{min-height:100px;max-height:100px; border:1px solid silver;border-radius:10px;font-size:26px;} QDialog#loginform QLineEdit:enabled{background-color: #515151} QDialog#loginform QToolButton#btnlogin{min-height:100px;max-height:100px; min-width:border:1px solid #505050; border-radius:10%;font-size:26px; font-weight:Bold;padding:5px;} QDialog#loginform QToolButton#btnlogin:hover{background:#505050;} \ No newline at end of file