diff --git a/src/DateSelectDialog.cpp b/src/DateSelectDialog.cpp index 2f724c5..0a0aaad 100644 --- a/src/DateSelectDialog.cpp +++ b/src/DateSelectDialog.cpp @@ -11,7 +11,7 @@ DateSelectDialog::DateSelectDialog(QWidget *parent, Qt::WindowFlags f) : GUIForm this->setFixedSize(460, 380); QVBoxLayout* layout = new QVBoxLayout(mFormWidget); box = new DateSlidePickerBox(mFormWidget); - box->setObjectName("slider_one"); + box->setObjectName("slidePicker"); box->setSelectedValue("1990-01-01"); lbl_error = new QLabel(this); lbl_error->setObjectName("warn"); diff --git a/src/dialogs/SelectDialog.cpp b/src/dialogs/SelectDialog.cpp index d1c3da5..29f7a21 100644 --- a/src/dialogs/SelectDialog.cpp +++ b/src/dialogs/SelectDialog.cpp @@ -14,7 +14,7 @@ SelectDialog::SelectDialog(QWidget* parent, Qt::WindowFlags f) this->setFixedSize(360, 380); auto layout = new QVBoxLayout(mFormWidget); - mPickBox->setObjectName("slider_one"); + mPickBox->setObjectName("slidePicker"); layout->addWidget(mPickBox); } diff --git a/src/dialogs/guimessagedialog.cpp b/src/dialogs/guimessagedialog.cpp index 3c851ae..aa29174 100644 --- a/src/dialogs/guimessagedialog.cpp +++ b/src/dialogs/guimessagedialog.cpp @@ -25,10 +25,10 @@ GUIMessageDialog::GUIMessageDialog(QWidget *parent) void GUIMessageDialog::initBaseLayout() { mUI->lblMsg->setVisible(false); mUI->lblProgressIcon->setVisible(false); - mBtnMain->setObjectName("btn_main"); + mBtnMain->setObjectName("dialogBtn"); mBtnMain->setVisible(false); mBtnMain->setText("OK"); - mBtnAppend->setObjectName("btn_main"); + mBtnAppend->setObjectName("dialogBtn"); mBtnAppend->setVisible(false); mBtnAppend->setText("Stop"); auto btnContainer = new QWidget(this); diff --git a/src/forms/TopBarWidget.cpp b/src/forms/TopBarWidget.cpp index 8a73b9a..5aad24e 100644 --- a/src/forms/TopBarWidget.cpp +++ b/src/forms/TopBarWidget.cpp @@ -25,7 +25,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, company->setText(tr("浙江衡玖医疗科技")); QWidget* spacerLine0 = new QWidget(this); spacerLine0->setFixedWidth(2); - spacerLine0->setObjectName("spacer_2"); + spacerLine0->setObjectName("smallSpacer"); layout->addWidget(spacerLine0); QLabel * lbl_msglogo = new QLabel(this); lbl_msglogo->setObjectName("lbl_msglogo"); @@ -34,7 +34,6 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, QWidget* widgetMsg = new QWidget(this); 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); @@ -57,7 +56,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, status_layout->addWidget(nowDate); QWidget* spacerLine = new QWidget(this); spacerLine->setFixedWidth(2); - spacerLine->setObjectName("spacer_2"); + spacerLine->setObjectName("smallSpacer"); layout->addWidget(spacerLine); layout->addWidget(linkIcon); @@ -69,7 +68,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, auto w = new RollingMessageWidget(this); w->setMessageList(GUIErrorLW::getWARNMessages()); - w->setObjectName("need_border"); + 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")); diff --git a/src/forms/scan/PatientInformationForm.ui b/src/forms/scan/PatientInformationForm.ui index e6da4cf..d797a23 100644 --- a/src/forms/scan/PatientInformationForm.ui +++ b/src/forms/scan/PatientInformationForm.ui @@ -27,7 +27,7 @@ 0 - + 6 @@ -45,7 +45,7 @@ 0 - + Patient Information @@ -87,7 +87,7 @@ - + @@ -101,7 +101,7 @@ - + Current Protocol diff --git a/src/forms/scan/ScanFormWidget.cpp b/src/forms/scan/ScanFormWidget.cpp index 4f30668..6d99c62 100644 --- a/src/forms/scan/ScanFormWidget.cpp +++ b/src/forms/scan/ScanFormWidget.cpp @@ -46,21 +46,9 @@ ScanFormWidget::ScanFormWidget(QWidget* parent) , mLblParams(new QLabel(this)) , mLblE2(new QLabel(this)) { - const char* style = "QWidget#PatientInformationForm{min-width:300px;max-width:300px; margin-right:10}" - "QWidget#patientinformation_panel{ border-right:1px solid #0078d8}" - "QWidget#patientinformation_panel QLabel{font-size:20px; }" - "QWidget#param_widget{min-width:300px;max-width:300px;border-left:1px solid #0078d8}" - "QWidget#broadcast_widget{border:2px solid #515151; border-radius: 20px; background-color:black}" - "QWidget#broadcast_widget QLabel{background-color:black}" - "QLabel#lbl_protocol{font-size:32px; margin:0; color:silver}" - "QLabel#lbl_title,QLabel#lbl_ptitle{font-size:20px;margin:0; border-bottom:1px solid silver}" - "QLabel#lbl_end{font-size:20px;margin:0; border-top:1px solid #0078d8}" - "QLabel#lbl_e{font-size:20px;}" - ""; - this->setStyleSheet(this->styleSheet().append(style)); + auto layout = new QHBoxLayout(); ui->commandWidget->setLayout(layout); - initProtocolUI(layout); layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding)); addVerticalLine(layout); @@ -73,7 +61,7 @@ ScanFormWidget::ScanFormWidget(QWidget* parent) void ScanFormWidget::initProtocolUI(QHBoxLayout *layout) { mLblProtocol->setText(tr("Protocol")); mLblProtocol->setAlignment(Qt::AlignTop); - mLblProtocol->setObjectName("lbl_protocol"); + mLblProtocol->setObjectName("protocolPanelTitle"); layout->addWidget(mLblProtocol); addVerticalLine(layout); INIT_TOOL_BTN(Left, ":/icons/left.png") @@ -95,40 +83,40 @@ void ScanFormWidget::initScanContent() { ui->contentWidget->setLayout(contentLayout); contentLayout->addWidget(mPatInf); - auto param_widget = new QWidget(this); - auto broadcast_widget = new QWidget(this); - broadcast_widget->setObjectName("broadcast_widget"); + auto paramWidget = new QWidget(this); + auto broadcastWidget = new QWidget(this); + broadcastWidget->setObjectName("broadcastWidget"); mViewer->setObjectName("viewer"); mViewer->setFixedSize(800, 800); mViewer->setText(""); auto viewerLayout = new QHBoxLayout(mViewer); - broadcast_widget->setLayout(viewerLayout); + broadcastWidget->setLayout(viewerLayout); viewerLayout->addWidget(mViewer); - contentLayout->addWidget(broadcast_widget); - param_widget->setObjectName("param_widget"); - auto paramLayout = new QVBoxLayout(param_widget); + contentLayout->addWidget(broadcastWidget); + paramWidget->setObjectName("param_widget"); + auto paramLayout = new QVBoxLayout(paramWidget); mLblPreview->setText(tr("Preview Parameters")); - mLblPreview->setObjectName("lbl_title"); + mLblPreview->setObjectName("parameterTitle"); paramLayout->addWidget(mLblPreview); mLblE->setWordWrap(true); - mLblE->setObjectName("lbl_e"); + mLblE->setObjectName("placeholder"); mLblE->setText(tr("some settings\n\nparameters\n")); paramLayout->addWidget(mLblE); auto lbl_end = new QLabel(this); - lbl_end->setObjectName("lbl_end"); + lbl_end->setObjectName("endSpaceLine"); paramLayout->addWidget(lbl_end); mLblParams->setText(tr("Scan Parameters")); - mLblParams->setObjectName("lbl_title"); + mLblParams->setObjectName("parameterTitle"); paramLayout->addWidget(mLblParams); mLblE2->setWordWrap(true); - mLblE2->setObjectName("lbl_e"); + mLblE2->setObjectName("placeholder"); mLblE2->setText(tr("some settings\n\nparameters\n")); paramLayout->addWidget(mLblE2); auto lbl_end2 = new QLabel(this); - lbl_end2->setObjectName("lbl_end"); + lbl_end2->setObjectName("endSpaceLine"); paramLayout->addWidget(lbl_end2); paramLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding)); - contentLayout->addWidget(param_widget); + contentLayout->addWidget(paramWidget); } void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){ diff --git a/src/forms/select/PatientDetailForm.cpp b/src/forms/select/PatientDetailForm.cpp index 7776ea6..0bb5b73 100644 --- a/src/forms/select/PatientDetailForm.cpp +++ b/src/forms/select/PatientDetailForm.cpp @@ -26,15 +26,15 @@ PatientDetailForm::PatientDetailForm(QWidget* parent) : mUI->tbxDob->setDisplayFormat("yyyy/MM/dd"); mUI->tbxID->setEnabled(false); - mUI->tbxID->setObjectName("display_tbx"); + mUI->tbxID->setObjectName("displayLineEdit"); mUI->tbxDob->setEnabled(false); - mUI->tbxDob->setObjectName("display_tbx"); + mUI->tbxDob->setObjectName("displayLineEdit"); mUI->tbxName->setEnabled(false); - mUI->tbxName->setObjectName("display_tbx"); + mUI->tbxName->setObjectName("displayLineEdit"); mUI->tbxSex->setEnabled(false); - mUI->tbxSex->setObjectName("display_tbx"); + mUI->tbxSex->setObjectName("displayLineEdit"); mUI->rtbxComment->setEnabled(false); - mUI->rtbxComment->setObjectName("display_tbx"); + mUI->rtbxComment->setObjectName("displayLineEdit"); connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this,&PatientDetailForm::reloadLanguage); diff --git a/src/forms/select/SelectFormWidget.cpp b/src/forms/select/SelectFormWidget.cpp index a84f9e3..35acad9 100644 --- a/src/forms/select/SelectFormWidget.cpp +++ b/src/forms/select/SelectFormWidget.cpp @@ -187,7 +187,7 @@ void SelectFormWidget::selectPatient() { } void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare edit panel - mEditPatForm->setObjectName("edit_patient"); + mEditPatForm->setObjectName("patientDetailWidget"); mEditPatForm->hide(); contentLayout->addWidget(mEditPatForm); auto* btnShowEdit = new VerticalTextToolButton(this); diff --git a/src/forms/select/SelectFormWidget.h b/src/forms/select/SelectFormWidget.h index 806e95d..401c2cf 100644 --- a/src/forms/select/SelectFormWidget.h +++ b/src/forms/select/SelectFormWidget.h @@ -8,37 +8,54 @@ #include "forms/tabformwidget.h" #include "EditPatientDialog.h" + class PatientDetailForm; + class SlideTableView; + class QToolButton; -class SelectFormWidget: public TabFormWidget { - Q_OBJECT + +class SelectFormWidget : public TabFormWidget { +Q_OBJECT public: explicit SelectFormWidget(QWidget *parent = nullptr); + ~SelectFormWidget() override = default;; private: QString selectedPatientUID; - void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const; - QToolButton* mBtnAccount; - QToolButton* mBtnWorklist; - QToolButton* mBtnAdd; - QToolButton* mBtnEdit; - QToolButton* mBtnDelete; - QToolButton* mBtnSelect; - SlideTableView* mPatTable; - QSqlTableModel* mModel; - PatientDetailForm* mEditPatForm; + + void + setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const; + + QToolButton *mBtnAccount; + QToolButton *mBtnWorklist; + QToolButton *mBtnAdd; + QToolButton *mBtnEdit; + QToolButton *mBtnDelete; + QToolButton *mBtnSelect; + SlideTableView *mPatTable; + QSqlTableModel *mModel; + PatientDetailForm *mEditPatForm; void prepareButtons(bool disableALL); + void initGeneralButtons(QHBoxLayout *layout); + void initPatEditButtons(QHBoxLayout *layout); + void editPatient(); + void delPatient(); + void selectPatient(); + void initDataModel(); + void initDetailPanel(QHBoxLayout *contentLayout); + void initTableView(QHBoxLayout *contentLayout); + void reloadLanguage(); }; diff --git a/src/forms/settings/AdminSettingForm.cpp b/src/forms/settings/AdminSettingForm.cpp index 6de5d96..6033c18 100644 --- a/src/forms/settings/AdminSettingForm.cpp +++ b/src/forms/settings/AdminSettingForm.cpp @@ -24,7 +24,7 @@ AdminSettingForm::AdminSettingForm(QWidget* aParent, Qt::WindowFlags f) layout->setMargin(0); layout->setContentsMargins(0, 8, 0, 1); ui->contentWidget->setLayout(layout); - ui->contentWidget->setObjectName("contentWidgetWithBBorder"); + ui->contentWidget->setObjectName("settingContentWidget"); QListWidget* widget = new QListWidget(this); widget->setFixedWidth(250); QStringList menus; diff --git a/src/forms/tabformwidget.cpp b/src/forms/tabformwidget.cpp index d4992b0..37e4276 100644 --- a/src/forms/tabformwidget.cpp +++ b/src/forms/tabformwidget.cpp @@ -1,8 +1,6 @@ #include "tabformwidget.h" #include "ui_tabformwidget.h" #include -#include "components/RollingMessageWidget.h" -#include "event/EventCenter.h" #if defined(_MSC_VER) && (_MSC_VER >= 1600) # pragma execution_character_set("utf-8") @@ -13,7 +11,6 @@ TabFormWidget::TabFormWidget(QWidget* parent) : ui(new Ui::TabFormWidget) { ui->setupUi(this); - return; } TabFormWidget::~TabFormWidget() diff --git a/src/stylesheet/Dark2.css b/src/stylesheet/Dark2.css index 1a26add..7372131 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;} 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:none;border-bottom:1px solid #505050;color:grey;} QLineEdit:enabled{background-color: #505050;border-bottom-color:#4a88c7;color:#fcfcfc;} QLineEdit#display_tbx:disabled{background-color: #3c3c3c;border-bottom-color:#4a88c7;color:#fcfcfc;} QDateEdit{min-height:36px;max-height:36px; border:none;border-bottom:1px solid #505050;color:grey;border-radius:3px;} QDateEdit:disabled{background-color: #3c3c3c;border-bottom-color:#4a88c7;color:#fcfcfc;} QTextEdit{ border:1px solid #505050;color:grey;border-radius:3px;} QTextEdit:enabled{background-color: #505050; border:1px solid #4a88c7;color:#fcfcfc;} QTextEdit#display_tbx:disabled{background-color: #3c3c3c; border:1px solid #4a88c7;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#editvalBtn{font-size:20px;font-weight:normal;border:1px solid darkgray;background: #505050;}*/ QWidget QToolButton#editvalBtn{min-height:36px;max-height:36px;border:none;border-bottom:1px solid #505050;border-radius:0px;color:grey;} QWidget QToolButton#editvalBtn:enabled{background-color: #505050;border-bottom-color:#4a88c7;color:#fcfcfc;} 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; background: #505050; } 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;background: #505050; } QWidget QToolButton{border:none;border-radius:10%;font-size:26px; /*background: #505050;*/ background: qlineargradient(spread:pad,x1: 0.5, y1: 0, x2: 0.5, y2: 1.0,stop:0 #404040, stop:0.5 #505050,stop:1.0 #404040); 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.50, 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;*/ background: qlineargradient(spread:pad,x1: 0.5, y1: 0, x2: 0.5, y2: 1.0,stop:0 #404040, stop:0.5 #505050,stop:1.0 #404040); 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::down-arrow { subcontrol-position: center right; image: url(":/icons/arrow-down.png"); padding-right: 8px; } QHeaderView::up-arrow { subcontrol-position: center right; image: url(":/icons/arrow-up.png"); padding-right: 8px; } 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;} QLabel#sliderSpliterLabel{color:white;padding-top:35px;font-weight:normal;font-size:50px;} QWidget#topbarWidget{min-height:36px;max-height:36px;} QWidget#contentWidget{border-top:1px solid #505050;} QWidget#contentWidgetWithBBorder{border-top:1px solid #505050; border-bottom:1px solid #323232;} QWidget#commandWidget{min-height:123px;max-height:123px;border-top:1px solid #505050; border-bottom:1px solid #323232;} QWidget#commandWidgetnoBBorder{min-height:123px;max-height:123px;border-top:1px solid #505050; } 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:200px;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 + * { background-color: #3c3c3c; color: #fcfcfc; margin: 0; font-size: 16px; } /*------Widget------------------------------------*/ /* Global */ QWidget#verSpaceLine { border-right: 1px solid #0078d8; } QWidget#topBottomLine { border-top: 2px solid #0078d8; border-bottom: 2px solid #0078d8; background: transparent; } 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; } QWidget#smallSpacer { min-width: 2px; max-width: 2px; margin-top: 6px; margin-bottom: 6px; border-right: 1px solid #0078d8; } QWidget#borderWidget { border: 1px solid white }/* use in Topbar */ QWidget#slidePicker { border: 1px solid #505050; border-radius: 8px }/* use in SlidePickerBox */ /* use in GUIFormBaseDialog */ QWidget#formWidget { font-size: 30px; } /* use in MainWindow */ QWidget#topbarWidget { min-height: 36px; max-height: 36px; } /* use in TabFormWidget */ QWidget#contentWidget { border-top: 1px solid #505050; } /* use in SelectformWidget */ QWidget#patientDetailWidget { min-width: 300px; max-width: 300px; } /* use in AdminSetting */ QWidget#settingContentWidget { border-top: 1px solid #505050; border-bottom: 1px solid #323232; } /* use in ScanFormWidget */ QWidget#commandWidget { min-height: 123px; max-height: 123px; border-top: 1px solid #505050; border-bottom: 1px solid #323232; } QWidget#paramWidget { min-width: 300px; max-width: 300px; border-left: 1px solid #0078d8 } QWidget#broadcastWidget { border: 2px solid #515151; border-radius: 20px; background-color: black } QWidget#PatientInformationForm { min-width: 300px; max-width: 300px; margin-right: 10 } /* use in PatientInfomationForm */ QWidget#patientInfoPanel { border-right: 1px solid #0078d8 } /* use in AccountTableForm*/ QWidget#commandWidgetnoBBorder { min-height: 123px; max-height: 123px; border-top: 1px solid #505050; } /* use in TopBarWidget */ QWidget#statusBarWidget { min-width: 300px; } /* use in PatientDetailForm */ QWidget#editcmdWidget { min-height: 83px; max-height: 83px; } /*------Buttons----------------------------------*/ 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.50, y1: 0, x2: 0.5, y2: 1, stop: 0 #505050, stop: 1 #606060); } /* use in SystemSettingForm */ 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; } /* use in GUIFormBaseDialog */ QPushButton#btnOK { background: #365880; font-weight: bold } QToolButton { border: none; border-radius: 10%; font-size: 26px; background: qlineargradient(spread:pad, x1: 0.5, y1: 0, x2: 0.5, y2: 1.0, stop: 0 #404040, stop: 0.5 #505050, stop: 1.0 #404040); font-weight: Bold; padding: 5px; } QToolButton:disabled { border: none; color: #606060; background: #3c3c3c } QToolButton:hover { background: #505050; } QToolButton:checked { border: 5px solid darkorange; padding: 0; } /* use to call slide picker*/ QToolButton#editvalBtn { min-height: 36px; max-height: 36px; border: none; border-bottom: 1px solid #505050; border-radius: 0; color: grey; } QToolButton#editvalBtn:enabled { background-color: #505050; border-bottom-color: #4a88c7; color: #fcfcfc; } /* panel hide and show button */ 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; background: #505050; } 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; background: #505050; } /* use in GUIMessageDialog */ QToolButton#dialogBtn { border: 2px solid #0078d8; border-radius: 10%; font-size: 26px; font-weight: Bold; padding: 5px; } /* protocol buttons*/ QToolButton#sexBtn { min-width: 120px; max-width: 120px; font-size: 20px; padding: 2px; } QToolButton#sexBtn:checked { border: 2px solid darkorange; padding: 0px; } QGroupBox { border: 0px } /*------------------Tab----------------*/ 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 } /*-------------------Label------------------*/ QLabel { color: #fcfcfc; font-weight: bold; font-size: 16px; } /* blue line spacer*/ QLabel#endline { border-bottom: 1px solid grey } /* use for side picker */ QLabel#sliderPickerLabel { color: grey; padding: 0; background: #505050; font-weight: normal; font-size: 50px; } QLabel#sliderSpliterLabel { color: white; padding-top: 35px; font-weight: normal; font-size: 50px; } /* use in TopBarWidget */ QLabel#logo { min-width: 30px; max-width: 30px } QLabel#company { min-width: 150px; max-width: 150px; } QLabel#systemMsgBar { min-width: 500px; } /* warn message label */ QLabel#warn { color: #930000; background: transparent; font-size: 20px; } /* dialog title*/ QLabel#title { font-size: 30px; } /* use in AboutWidget */ QLabel#normal { color: #fcfcfc; font-weight: normal; font-size: 16px; } /* use in ScanFormWidget */ QLabel#protocolPanelTitle { font-size: 32px; margin: 0; color: silver } QLabel#parameterTitle,#protocolTitle,#patientTitle{ font-size: 20px; margin: 0; border-bottom: 1px solid silver } QLabel#endSpaceLine { font-size: 20px; margin: 0; border-top: 1px solid #0078d8 } QLabel#placeholder { font-size: 20px; } QWidget#patientInfoPanel QLabel { font-size: 20px; } QWidget#broadcastWidget QLabel { background-color: black } /*------editors----------------------------------*/ QLineEdit { min-height: 36px; max-height: 36px; border: none; border-bottom: 1px solid #505050; color: grey; } QLineEdit:enabled { background-color: #505050; border-bottom-color: #4a88c7; color: #fcfcfc; } QLineEdit#displayLineEdit:disabled { background-color: #3c3c3c; border-bottom-color: #4a88c7; color: #fcfcfc; } QPlainTextEdit { border: 0px } QDateEdit { min-height: 36px; max-height: 36px; border: none; border-bottom: 1px solid #505050; color: grey; border-radius: 3px; } QDateEdit:disabled { background-color: #3c3c3c; border-bottom-color: #4a88c7; color: #fcfcfc; } QTextEdit { border: 1px solid #505050; color: grey; border-radius: 3px; } QTextEdit:enabled { background-color: #505050; border: 1px solid #4a88c7; color: #fcfcfc; } QComboBox { text-align: center; min-height: 36px; max-height: 36px; border: 1px solid #505050 } QComboBox:enabled { background-color: #505050 } /*----------------Table & List View---------------*/ QTableView { border: none; alternate-background-color: #595959; selection-color: #fcfcfc; selection-background-color: #0078d8 } QListView { border: none; margin: 5px; font-weight: bold } QListView::item { background: qlineargradient(spread:pad, x1: 0.5, y1: 0, x2: 0.5, y2: 1.0, stop: 0 #404040, stop: 0.5 #505050, stop: 1.0 #404040); min-height: 30px; border: 1px solid #505050; border-radius: 5px } QListView::item:selected { background: #365880; font-weight: bold; color: #fcfcfc; } QHeaderView::down-arrow { subcontrol-position: center right; image: url(":/icons/arrow-down.png"); padding-right: 8px; } QHeaderView::up-arrow { subcontrol-position: center right; image: url(":/icons/arrow-up.png"); padding-right: 8px; } 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; } /*------Dialog-------------------------------------*/ QDialog#formDialog { border: 3px solid grey; border-radius: 8px } QDialog#MessageDialog QWidget QWidget { background: transparent; color: #3078d8; } QDialog#MessageDialog QWidget QWidget QLabel { font-size: 30px } /* use in LoginWindow */ QFrame#loginFrame { 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 { 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); } 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: 200px; 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 diff --git a/src/windows/LoginDialog.cpp b/src/windows/LoginDialog.cpp index 3e7c6ba..8495806 100644 --- a/src/windows/LoginDialog.cpp +++ b/src/windows/LoginDialog.cpp @@ -38,7 +38,7 @@ LoginDialog::~LoginDialog() void LoginDialog::initializeAllWidget() { - this->setObjectName("loginform"); + this->setObjectName("loginForm"); initializeTitle(); initializeDialogFrame(); @@ -88,7 +88,7 @@ void LoginDialog::initializeTitle() void LoginDialog::initializeDialogFrame() { - mDialogFrame->setObjectName("login_frame_username"); + mDialogFrame->setObjectName("loginFrame"); } void LoginDialog::initializeEdit() diff --git a/src/windows/MainWindow.cpp b/src/windows/MainWindow.cpp index 92fbac2..b95b95f 100644 --- a/src/windows/MainWindow.cpp +++ b/src/windows/MainWindow.cpp @@ -9,8 +9,9 @@ #include #include #include +#include -#include "ui_mainwindow.h" +#include "ui_MainWindow.h" #include "event/EventCenter.h" #include "forms/tabformwidget.h" #include "forms/select/SelectFormWidget.h" @@ -434,3 +435,19 @@ void MainWindow::swipeTriggered(QSwipeGesture* aSwipeGesture) //update(); } } + +void MainWindow::keyPressEvent(QKeyEvent *event) { + if (event->modifiers()==Qt::ControlModifier &&event->key()==Qt::Key_R){ + QFile file("D:\\workdir\\GUI\\src\\stylesheet\\Dark2.css"); + file.open(QFile::ReadOnly); + if (file.isOpen()) + { + QString styleSheet = this->styleSheet(); + styleSheet += QLatin1String(file.readAll()); + this->setStyleSheet(styleSheet); + } + this->update(); + } + + QWidget::keyPressEvent(event); +} diff --git a/src/windows/MainWindow.h b/src/windows/MainWindow.h index 360611b..e31a6ae 100644 --- a/src/windows/MainWindow.h +++ b/src/windows/MainWindow.h @@ -42,6 +42,8 @@ protected: void changeEvent(QEvent* aEvent); bool event(QEvent* aEvent) override; + void keyPressEvent(QKeyEvent *event) override; + private: void initializeTabWidget(); void initializeLayout();