From 7bf85c0b4f434a361d85dbc0ce7502081e8844ee Mon Sep 17 00:00:00 2001 From: Krad Date: Wed, 12 Jan 2022 11:24:37 +0800 Subject: [PATCH] Hide able edit patient panel. --- src/SelectFormWidget.cpp | 45 +++++++++++++--------- src/components/VerticalTextToolButton.cpp | 26 +++++++++++++ src/components/VerticalTextToolButton.h | 24 ++++++++++++ src/editpatientform.cpp | 11 ++++++ src/editpatientform.h | 2 + src/editpatientform.ui | 21 +++++++++- src/icons/edit.png | Bin 0 -> 5049 bytes src/icons/hidearrow.png | Bin 0 -> 5405 bytes src/mainwindow.cpp | 2 +- src/res.qrc | 2 +- src/stylesheet/Dark2.css | 2 +- 11 files changed, 112 insertions(+), 23 deletions(-) create mode 100644 src/components/VerticalTextToolButton.cpp create mode 100644 src/components/VerticalTextToolButton.h create mode 100644 src/icons/edit.png create mode 100644 src/icons/hidearrow.png diff --git a/src/SelectFormWidget.cpp b/src/SelectFormWidget.cpp index 99a73e3..0d5a2e1 100644 --- a/src/SelectFormWidget.cpp +++ b/src/SelectFormWidget.cpp @@ -18,6 +18,7 @@ #include #include "log/UserOperationLog.h" #include +#include "src/components/VerticalTextToolButton.h" #define ADD_CENTER_ITEM(row,col,text)\ item = new QTableWidgetItem(text);\ @@ -36,23 +37,7 @@ int queryValue(QSqlTableModel* model, int colID, QVariant var) SelectFormWidget::SelectFormWidget(QWidget* parent) : TabFormWidget(parent) { - // const char* style="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;}" - // "QWidget#edit_patient{min-width:300px;max-width:300px;}" - // "QTableView{border:none}" - // "QTableView{alternate-background-color: #595959;selection-color:white;selection-background-color:#0078d8}" - // "QToolButton#sexBtn{min-width:120px;max-width:120px;font-size:20px;padding:2px;}" - // "QToolButton#sexBtn:disabled{color:silver}" - // "QWidget#sexpanelwidget{border:1px solid silver;}" - // "QWidget#sexpanelwidget:enabled{background-color: #515151;}" - // "QToolButton#sexBtn:checked{border:2px solid darkorange;padding:0px;}" - // ; - // - // this->setStyleSheet(this->styleSheet().append(style)); - //init command bar + //init command bar QHBoxLayout* layout = new QHBoxLayout(); ui->commandWidget->setLayout(layout); ADD_TOOL_BTN(Account, ":/icons/account.png"); @@ -76,6 +61,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) : //Init content widget QHBoxLayout* contentLayout = new QHBoxLayout(); + contentLayout->setContentsMargins(5,5,0,5); this->ui->contentWidget->setLayout(contentLayout); // TableView for patient QTableView* table = new SlideableTableView(this); @@ -125,8 +111,29 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) : //edit panel EditPatientForm* edit_patient = new EditPatientForm(this); edit_patient->setObjectName("edit_patient"); + edit_patient->hide(); contentLayout->addWidget(edit_patient); - //select default row 0 + + auto *btnShowEdit = new VerticalTextToolButton(this); + btnShowEdit->setObjectName("showeditBtn"); + btnShowEdit->setIcon(QIcon(":/icons/edit.png")); + btnShowEdit->setIconSize(QSize(30, 30)); + btnShowEdit->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + btnShowEdit->setFixedHeight(225); +// btnShowEdit->setVerticalText("E\nd\ni\nt\nP\na\nn\ne\nl"); + btnShowEdit->setVerticalText("Patient Detail"); + contentLayout->addWidget(btnShowEdit); + contentLayout->setAlignment(btnShowEdit, Qt::AlignmentFlag::AlignTop); + connect(btnShowEdit,&QToolButton::clicked,[=](){ + edit_patient->show(); + btnShowEdit->hide(); + }); + connect(edit_patient, &EditPatientForm::hideBtnClicked, [=](){ + edit_patient->hide(); + btnShowEdit->show(); + }); + + //select default row 0 if (model->rowCount() > 0) { table->selectRow(0); @@ -136,7 +143,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) : pat. val = model->data(model->index(currentRow,PatientInformationEnum:: val)).toString(); EDIT_PATIENT() #undef ADD_PATIENT_PROPERTY - edit_patient->setPatientInformation(&pat); + edit_patient->setPatientInformation(&pat); } //events---------------------------------------------------------------------- //table current row selection changing event diff --git a/src/components/VerticalTextToolButton.cpp b/src/components/VerticalTextToolButton.cpp new file mode 100644 index 0000000..95acc9d --- /dev/null +++ b/src/components/VerticalTextToolButton.cpp @@ -0,0 +1,26 @@ +// +// Created by Krad on 2022/1/11. +// + +#include +#include +#include +#include "VerticalTextToolButton.h" + +VerticalTextToolButton::VerticalTextToolButton(QWidget *parent) : QToolButton(parent) { + +} + +VerticalTextToolButton::~VerticalTextToolButton() { + +} + +void VerticalTextToolButton::paintEvent(QPaintEvent *e) { + QToolButton::paintEvent(e); + QStylePainter p(this); + QStyleOptionToolButton opt; + initStyleOption(&opt); + p.rotate(90); + p.drawText(this->iconSize().height()+10,-this->iconSize().height()/2+1,this->verticalText); +// p.drawItemText( r,alignment,opt.palette,true,this->verticalText,QPalette::ButtonText); +} diff --git a/src/components/VerticalTextToolButton.h b/src/components/VerticalTextToolButton.h new file mode 100644 index 0000000..8274d9d --- /dev/null +++ b/src/components/VerticalTextToolButton.h @@ -0,0 +1,24 @@ +// +// Created by Krad on 2022/1/11. +// + +#ifndef GUI_VERTICALTEXTTOOLBUTTON_H +#define GUI_VERTICALTEXTTOOLBUTTON_H + +#include +class VerticalTextToolButton: public QToolButton { +public: + explicit VerticalTextToolButton(QWidget* parent = nullptr); + virtual ~VerticalTextToolButton(); + void setVerticalText(const QString text){ + verticalText = text; + } +protected: + virtual void paintEvent(QPaintEvent* e) override; + +private: + QString verticalText; +}; + + +#endif //GUI_VERTICALTEXTTOOLBUTTON_H diff --git a/src/editpatientform.cpp b/src/editpatientform.cpp index c78a314..4745d5f 100644 --- a/src/editpatientform.cpp +++ b/src/editpatientform.cpp @@ -12,6 +12,7 @@ EditPatientForm::EditPatientForm(QWidget* parent) : QWidget(parent), ui(new Ui::EditPatientForm) { +// this->layout()->setContentsMargins(5,5,5,5); ui->setupUi(this); //ui->lbl_Sex->setText(tr("Gender")); QHBoxLayout* sexlayout = new QHBoxLayout(ui->sexpanelwidget); @@ -21,6 +22,16 @@ EditPatientForm::EditPatientForm(QWidget* parent) : btnF->setText(tr("Female")); btnM->setText(tr("Male")); + ui->hideBtn->setSizePolicy(QSizePolicy::Policy::Expanding,QSizePolicy::Policy::Preferred); + ui->hideBtn->setObjectName("hideeditBtn"); + ui->hideBtn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + ui->hideBtn->setIcon(QIcon(":/icons/hidearrow.png")); + ui->hideBtn->setIconSize({30,30}); + ui->hideBtn->setText(tr(" Hide Panel")); + connect(ui->hideBtn,&QToolButton::clicked,[=](){ + emit hideBtnClicked(); + }); + // btnFemale->setToolButtonStyle(Qt::ToolButtonIconOnly); // btnMale->setToolButtonStyle(Qt::ToolButtonIconOnly); diff --git a/src/editpatientform.h b/src/editpatientform.h index 3db537e..012155a 100644 --- a/src/editpatientform.h +++ b/src/editpatientform.h @@ -70,6 +70,8 @@ public: signals: void editAccept(PatientInformation * detail,bool & accept); void editCancel(); + signals: + void hideBtnClicked(); private: Ui::EditPatientForm *ui; QString currentPatientUID; diff --git a/src/editpatientform.ui b/src/editpatientform.ui index f769d60..990d93b 100644 --- a/src/editpatientform.ui +++ b/src/editpatientform.ui @@ -15,7 +15,7 @@ - 3 + 0 0 @@ -29,8 +29,27 @@ 0 + + + + ... + + + + + 6 + + + 6 + + + 6 + + + 6 + diff --git a/src/icons/edit.png b/src/icons/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..cb13682095a55115872ae3ebc017a7cbbe83473f GIT binary patch literal 5049 zcmdT|`9GBH_rHh6h@lz#G9HX|NQ5-Vma$DDW8cb7!dS`{nXFSGSwnap4B3;%E=#7S ztjU(_TSC@oRF==(^V9cV`2KL;_v>}t*LALQ-sgSJb*}T^nu!4$ivSA%0BlBvI0E>6 z_vc||0^e0O)%oBD5=1b#3{(%GRsn!B$Oxxn5qf2JSf_g;@Z+(PF&=_jVw}_pE_N;D4>AoJYYpc=|PnRW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%ElJs!AnFG643Oz z_ScpSn7_LxYFI$W+C%1oyLX>03@p2kzVF&y+>H0Q%ndkWP4eKNWr3F=lo1&D>p1-V z`H>{~3^17EJ);M?W9Rua`9ZM^Z>&KhI%3Hk-iGl#7VOm`@t(1dK?LvdBZ*39;~J%w z)>k{ZsUN;=vmxTeY!~=b+|-hMmN`XAT!bVZ5~Y?LboAYoY4j4wyqVGB*)4nfAE$J- zk9dMfl_M`7ZpADC&QHrQ+Gk^}ntEj{*fotVUh?Hj*n{AUMVllGZcrH}(Xw06GR6OVbme||cNb|X=P%QX)%MUb#{UM5?zePy zk=%0rS{LN5U;Mi(MX9-*69qRc!MtpLf>_umALzxL%L}r+h~-1XnEQie`EruJnBv!u z80$N+F_80EXpyvvvsjNf5GdF5a?x44X8@pY{mTF+53kP8^;nT073R&Lj0IfN|k=IJW5}x6}V4A@_S22n{c$ zqV8~sfO#SLZ5i*^B_a4^9YYCdhOunVu?z)ZB$VCWbutDmerlC|WQhkMAgnHRJq5uz zUnTv!BAo$lNcs3a<~#_2i=EjIYYd19o{|Q0wS$O(aYclY?61OT$2JfcSCcHfJ6Gi) zqX85{X%hh270QL823bO%ciwU4o5^DZ(?~GxFef2qCB^nW8~0cG@78ne2MciyBrn%L zH}h@Dv0U!w4;gTK%U}cM&GVf^2bY^L@XRljmzURq0Io%-U3w+y49i~ltMBKUmr`j4 zZ*rJZbhw*&08OPH(La0r-FfS^LWGFXvj>o&fmlQhc-hfGdrJlk_}V~dTwfubldlyH zeLgl3Acc7YeSJRJ&z`k$B8i5dPdB9ZOIGIiom(0bGFS#Jk zi2RG8td=0pEc`b6E<*Vbvx;wbc*;T4pHEF?6G7s&yC*KnS=>K?tsieE&Sw^W0DEzO Nk)8>z`m$5>{{SDRK4|~| literal 0 HcmV?d00001 diff --git a/src/icons/hidearrow.png b/src/icons/hidearrow.png new file mode 100644 index 0000000000000000000000000000000000000000..cd73c50992b877690a4e8d7bff11857a6b76d381 GIT binary patch literal 5405 zcmeHLXI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%RTu=4VWQzOyJ=Q?`VqIk6lqw@DijM>B;C9s7!+1;Y) z@skBm49Ltt?%Tu5H=Kx+oef~Fex~a3Gp}@R_%Bg|6yCb^(68WX*NgL2 ziaIoL$*4QqDh9r<49(q;8R^u5CquYC;d`iJ^QF>2t?tuRIoD z8KPB145zN|tj{*o)c8&=E;{!saNqbKG-b^C!G+`Xxc9|oL4t4QVMfWfuPwhNad!sn zeSc@}&+=?}hLjQmNv0F@suJBIWEXXf$M3y3G%xtjIdfk!QMVfpjci|Yc*;W1g8L*F t^QVK)P?oZXX1D%`bs_PC9{{!4e7x@4H literal 0 HcmV?d00001 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7584232..46a5adc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -213,7 +213,7 @@ void MainWindow::changeEvent(QEvent* event) void MainWindow::loadStyleSheet(const QString& sheetName) { - QFile file(":/stylesheet/" + sheetName + ".qss"); + QFile file(":/stylesheet/" + sheetName + ".css"); file.open(QFile::ReadOnly); if (file.isOpen()) { diff --git a/src/res.qrc b/src/res.qrc index 215b1f8..1933abf 100644 --- a/src/res.qrc +++ b/src/res.qrc @@ -46,6 +46,6 @@ stylesheet/Dark.css stylesheet/Dark2.css icons/edit.png - icons/left-arrow-from-left.png + icons/hidearrow.png diff --git a/src/stylesheet/Dark2.css b/src/stylesheet/Dark2.css index 651f25d..8c5d6df 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{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;} 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