Refactor css file.
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="patientinformation_panel" native="true">
|
||||
<widget class="QWidget" name="patientInfoPanel" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
@@ -45,7 +45,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_title">
|
||||
<widget class="QLabel" name="patientTitle">
|
||||
<property name="text">
|
||||
<string>Patient Information</string>
|
||||
</property>
|
||||
@@ -87,7 +87,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblSpacer">
|
||||
<widget class="QLabel" name="endSpaceLine">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -101,7 +101,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_ptitle">
|
||||
<widget class="QLabel" name="protocolTitle">
|
||||
<property name="text">
|
||||
<string>Current Protocol</string>
|
||||
</property>
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -8,18 +8,26 @@
|
||||
|
||||
#include "forms/tabformwidget.h"
|
||||
#include "EditPatientDialog.h"
|
||||
|
||||
class PatientDetailForm;
|
||||
|
||||
class SlideTableView;
|
||||
|
||||
class QToolButton;
|
||||
|
||||
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;
|
||||
|
||||
void
|
||||
setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const;
|
||||
|
||||
QToolButton *mBtnAccount;
|
||||
QToolButton *mBtnWorklist;
|
||||
QToolButton *mBtnAdd;
|
||||
@@ -31,14 +39,23 @@ private:
|
||||
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();
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#include "tabformwidget.h"
|
||||
#include "ui_tabformwidget.h"
|
||||
#include <QDateTime>
|
||||
#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()
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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()
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
#include <QDockWidget>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ protected:
|
||||
void changeEvent(QEvent* aEvent);
|
||||
bool event(QEvent* aEvent) override;
|
||||
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
void initializeTabWidget();
|
||||
void initializeLayout();
|
||||
|
||||
Reference in New Issue
Block a user