Refactor css file.
This commit is contained in:
@@ -11,7 +11,7 @@ DateSelectDialog::DateSelectDialog(QWidget *parent, Qt::WindowFlags f) : GUIForm
|
|||||||
this->setFixedSize(460, 380);
|
this->setFixedSize(460, 380);
|
||||||
QVBoxLayout* layout = new QVBoxLayout(mFormWidget);
|
QVBoxLayout* layout = new QVBoxLayout(mFormWidget);
|
||||||
box = new DateSlidePickerBox(mFormWidget);
|
box = new DateSlidePickerBox(mFormWidget);
|
||||||
box->setObjectName("slider_one");
|
box->setObjectName("slidePicker");
|
||||||
box->setSelectedValue("1990-01-01");
|
box->setSelectedValue("1990-01-01");
|
||||||
lbl_error = new QLabel(this);
|
lbl_error = new QLabel(this);
|
||||||
lbl_error->setObjectName("warn");
|
lbl_error->setObjectName("warn");
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ SelectDialog::SelectDialog(QWidget* parent, Qt::WindowFlags f)
|
|||||||
|
|
||||||
this->setFixedSize(360, 380);
|
this->setFixedSize(360, 380);
|
||||||
auto layout = new QVBoxLayout(mFormWidget);
|
auto layout = new QVBoxLayout(mFormWidget);
|
||||||
mPickBox->setObjectName("slider_one");
|
mPickBox->setObjectName("slidePicker");
|
||||||
layout->addWidget(mPickBox);
|
layout->addWidget(mPickBox);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ GUIMessageDialog::GUIMessageDialog(QWidget *parent)
|
|||||||
void GUIMessageDialog::initBaseLayout() {
|
void GUIMessageDialog::initBaseLayout() {
|
||||||
mUI->lblMsg->setVisible(false);
|
mUI->lblMsg->setVisible(false);
|
||||||
mUI->lblProgressIcon->setVisible(false);
|
mUI->lblProgressIcon->setVisible(false);
|
||||||
mBtnMain->setObjectName("btn_main");
|
mBtnMain->setObjectName("dialogBtn");
|
||||||
mBtnMain->setVisible(false);
|
mBtnMain->setVisible(false);
|
||||||
mBtnMain->setText("OK");
|
mBtnMain->setText("OK");
|
||||||
mBtnAppend->setObjectName("btn_main");
|
mBtnAppend->setObjectName("dialogBtn");
|
||||||
mBtnAppend->setVisible(false);
|
mBtnAppend->setVisible(false);
|
||||||
mBtnAppend->setText("Stop");
|
mBtnAppend->setText("Stop");
|
||||||
auto btnContainer = new QWidget(this);
|
auto btnContainer = new QWidget(this);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
|||||||
company->setText(tr("浙江衡玖医疗科技"));
|
company->setText(tr("浙江衡玖医疗科技"));
|
||||||
QWidget* spacerLine0 = new QWidget(this);
|
QWidget* spacerLine0 = new QWidget(this);
|
||||||
spacerLine0->setFixedWidth(2);
|
spacerLine0->setFixedWidth(2);
|
||||||
spacerLine0->setObjectName("spacer_2");
|
spacerLine0->setObjectName("smallSpacer");
|
||||||
layout->addWidget(spacerLine0);
|
layout->addWidget(spacerLine0);
|
||||||
QLabel * lbl_msglogo = new QLabel(this);
|
QLabel * lbl_msglogo = new QLabel(this);
|
||||||
lbl_msglogo->setObjectName("lbl_msglogo");
|
lbl_msglogo->setObjectName("lbl_msglogo");
|
||||||
@@ -34,7 +34,6 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
|||||||
|
|
||||||
QWidget* widgetMsg = new QWidget(this);
|
QWidget* widgetMsg = new QWidget(this);
|
||||||
layout->addWidget(widgetMsg,1);
|
layout->addWidget(widgetMsg,1);
|
||||||
// widgetMsg->setObjectName("need_border");
|
|
||||||
widgetMsg->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
|
widgetMsg->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
|
||||||
layout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
|
layout->addSpacerItem(new QSpacerItem(10, 10, QSizePolicy::Expanding));
|
||||||
QWidget* statusBarWidget = new QWidget(this);
|
QWidget* statusBarWidget = new QWidget(this);
|
||||||
@@ -57,7 +56,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
|||||||
status_layout->addWidget(nowDate);
|
status_layout->addWidget(nowDate);
|
||||||
QWidget* spacerLine = new QWidget(this);
|
QWidget* spacerLine = new QWidget(this);
|
||||||
spacerLine->setFixedWidth(2);
|
spacerLine->setFixedWidth(2);
|
||||||
spacerLine->setObjectName("spacer_2");
|
spacerLine->setObjectName("smallSpacer");
|
||||||
|
|
||||||
layout->addWidget(spacerLine);
|
layout->addWidget(spacerLine);
|
||||||
layout->addWidget(linkIcon);
|
layout->addWidget(linkIcon);
|
||||||
@@ -69,7 +68,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
|||||||
auto w = new RollingMessageWidget(this);
|
auto w = new RollingMessageWidget(this);
|
||||||
|
|
||||||
w->setMessageList(GUIErrorLW::getWARNMessages());
|
w->setMessageList(GUIErrorLW::getWARNMessages());
|
||||||
w->setObjectName("need_border");
|
w->setObjectName("borderWidget");
|
||||||
l->addWidget(w);
|
l->addWidget(w);
|
||||||
connect(EventCenter::Default(), &EventCenter::ResponseDeviceTemperature, [=](QObject*, QObject* msg) {
|
connect(EventCenter::Default(), &EventCenter::ResponseDeviceTemperature, [=](QObject*, QObject* msg) {
|
||||||
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
|
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="patientinformation_panel" native="true">
|
<widget class="QWidget" name="patientInfoPanel" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_title">
|
<widget class="QLabel" name="patientTitle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Patient Information</string>
|
<string>Patient Information</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lblSpacer">
|
<widget class="QLabel" name="endSpaceLine">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_ptitle">
|
<widget class="QLabel" name="protocolTitle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Current Protocol</string>
|
<string>Current Protocol</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -46,21 +46,9 @@ ScanFormWidget::ScanFormWidget(QWidget* parent)
|
|||||||
, mLblParams(new QLabel(this))
|
, mLblParams(new QLabel(this))
|
||||||
, mLblE2(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();
|
auto layout = new QHBoxLayout();
|
||||||
ui->commandWidget->setLayout(layout);
|
ui->commandWidget->setLayout(layout);
|
||||||
|
|
||||||
initProtocolUI(layout);
|
initProtocolUI(layout);
|
||||||
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
addVerticalLine(layout);
|
addVerticalLine(layout);
|
||||||
@@ -73,7 +61,7 @@ ScanFormWidget::ScanFormWidget(QWidget* parent)
|
|||||||
void ScanFormWidget::initProtocolUI(QHBoxLayout *layout) {
|
void ScanFormWidget::initProtocolUI(QHBoxLayout *layout) {
|
||||||
mLblProtocol->setText(tr("Protocol"));
|
mLblProtocol->setText(tr("Protocol"));
|
||||||
mLblProtocol->setAlignment(Qt::AlignTop);
|
mLblProtocol->setAlignment(Qt::AlignTop);
|
||||||
mLblProtocol->setObjectName("lbl_protocol");
|
mLblProtocol->setObjectName("protocolPanelTitle");
|
||||||
layout->addWidget(mLblProtocol);
|
layout->addWidget(mLblProtocol);
|
||||||
addVerticalLine(layout);
|
addVerticalLine(layout);
|
||||||
INIT_TOOL_BTN(Left, ":/icons/left.png")
|
INIT_TOOL_BTN(Left, ":/icons/left.png")
|
||||||
@@ -95,40 +83,40 @@ void ScanFormWidget::initScanContent() {
|
|||||||
ui->contentWidget->setLayout(contentLayout);
|
ui->contentWidget->setLayout(contentLayout);
|
||||||
|
|
||||||
contentLayout->addWidget(mPatInf);
|
contentLayout->addWidget(mPatInf);
|
||||||
auto param_widget = new QWidget(this);
|
auto paramWidget = new QWidget(this);
|
||||||
auto broadcast_widget = new QWidget(this);
|
auto broadcastWidget = new QWidget(this);
|
||||||
broadcast_widget->setObjectName("broadcast_widget");
|
broadcastWidget->setObjectName("broadcastWidget");
|
||||||
mViewer->setObjectName("viewer");
|
mViewer->setObjectName("viewer");
|
||||||
mViewer->setFixedSize(800, 800);
|
mViewer->setFixedSize(800, 800);
|
||||||
mViewer->setText("");
|
mViewer->setText("");
|
||||||
auto viewerLayout = new QHBoxLayout(mViewer);
|
auto viewerLayout = new QHBoxLayout(mViewer);
|
||||||
broadcast_widget->setLayout(viewerLayout);
|
broadcastWidget->setLayout(viewerLayout);
|
||||||
viewerLayout->addWidget(mViewer);
|
viewerLayout->addWidget(mViewer);
|
||||||
contentLayout->addWidget(broadcast_widget);
|
contentLayout->addWidget(broadcastWidget);
|
||||||
param_widget->setObjectName("param_widget");
|
paramWidget->setObjectName("param_widget");
|
||||||
auto paramLayout = new QVBoxLayout(param_widget);
|
auto paramLayout = new QVBoxLayout(paramWidget);
|
||||||
mLblPreview->setText(tr("Preview Parameters"));
|
mLblPreview->setText(tr("Preview Parameters"));
|
||||||
mLblPreview->setObjectName("lbl_title");
|
mLblPreview->setObjectName("parameterTitle");
|
||||||
paramLayout->addWidget(mLblPreview);
|
paramLayout->addWidget(mLblPreview);
|
||||||
mLblE->setWordWrap(true);
|
mLblE->setWordWrap(true);
|
||||||
mLblE->setObjectName("lbl_e");
|
mLblE->setObjectName("placeholder");
|
||||||
mLblE->setText(tr("some settings\n\nparameters\n"));
|
mLblE->setText(tr("some settings\n\nparameters\n"));
|
||||||
paramLayout->addWidget(mLblE);
|
paramLayout->addWidget(mLblE);
|
||||||
auto lbl_end = new QLabel(this);
|
auto lbl_end = new QLabel(this);
|
||||||
lbl_end->setObjectName("lbl_end");
|
lbl_end->setObjectName("endSpaceLine");
|
||||||
paramLayout->addWidget(lbl_end);
|
paramLayout->addWidget(lbl_end);
|
||||||
mLblParams->setText(tr("Scan Parameters"));
|
mLblParams->setText(tr("Scan Parameters"));
|
||||||
mLblParams->setObjectName("lbl_title");
|
mLblParams->setObjectName("parameterTitle");
|
||||||
paramLayout->addWidget(mLblParams);
|
paramLayout->addWidget(mLblParams);
|
||||||
mLblE2->setWordWrap(true);
|
mLblE2->setWordWrap(true);
|
||||||
mLblE2->setObjectName("lbl_e");
|
mLblE2->setObjectName("placeholder");
|
||||||
mLblE2->setText(tr("some settings\n\nparameters\n"));
|
mLblE2->setText(tr("some settings\n\nparameters\n"));
|
||||||
paramLayout->addWidget(mLblE2);
|
paramLayout->addWidget(mLblE2);
|
||||||
auto lbl_end2 = new QLabel(this);
|
auto lbl_end2 = new QLabel(this);
|
||||||
lbl_end2->setObjectName("lbl_end");
|
lbl_end2->setObjectName("endSpaceLine");
|
||||||
paramLayout->addWidget(lbl_end2);
|
paramLayout->addWidget(lbl_end2);
|
||||||
paramLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
paramLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
||||||
contentLayout->addWidget(param_widget);
|
contentLayout->addWidget(paramWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){
|
void ScanFormWidget::initScanControlBar(QHBoxLayout *layout){
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ PatientDetailForm::PatientDetailForm(QWidget* parent) :
|
|||||||
mUI->tbxDob->setDisplayFormat("yyyy/MM/dd");
|
mUI->tbxDob->setDisplayFormat("yyyy/MM/dd");
|
||||||
|
|
||||||
mUI->tbxID->setEnabled(false);
|
mUI->tbxID->setEnabled(false);
|
||||||
mUI->tbxID->setObjectName("display_tbx");
|
mUI->tbxID->setObjectName("displayLineEdit");
|
||||||
mUI->tbxDob->setEnabled(false);
|
mUI->tbxDob->setEnabled(false);
|
||||||
mUI->tbxDob->setObjectName("display_tbx");
|
mUI->tbxDob->setObjectName("displayLineEdit");
|
||||||
mUI->tbxName->setEnabled(false);
|
mUI->tbxName->setEnabled(false);
|
||||||
mUI->tbxName->setObjectName("display_tbx");
|
mUI->tbxName->setObjectName("displayLineEdit");
|
||||||
mUI->tbxSex->setEnabled(false);
|
mUI->tbxSex->setEnabled(false);
|
||||||
mUI->tbxSex->setObjectName("display_tbx");
|
mUI->tbxSex->setObjectName("displayLineEdit");
|
||||||
mUI->rtbxComment->setEnabled(false);
|
mUI->rtbxComment->setEnabled(false);
|
||||||
mUI->rtbxComment->setObjectName("display_tbx");
|
mUI->rtbxComment->setObjectName("displayLineEdit");
|
||||||
|
|
||||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this,&PatientDetailForm::reloadLanguage);
|
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this,&PatientDetailForm::reloadLanguage);
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ void SelectFormWidget::selectPatient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare edit panel
|
void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare edit panel
|
||||||
mEditPatForm->setObjectName("edit_patient");
|
mEditPatForm->setObjectName("patientDetailWidget");
|
||||||
mEditPatForm->hide();
|
mEditPatForm->hide();
|
||||||
contentLayout->addWidget(mEditPatForm);
|
contentLayout->addWidget(mEditPatForm);
|
||||||
auto* btnShowEdit = new VerticalTextToolButton(this);
|
auto* btnShowEdit = new VerticalTextToolButton(this);
|
||||||
|
|||||||
@@ -8,37 +8,54 @@
|
|||||||
|
|
||||||
#include "forms/tabformwidget.h"
|
#include "forms/tabformwidget.h"
|
||||||
#include "EditPatientDialog.h"
|
#include "EditPatientDialog.h"
|
||||||
|
|
||||||
class PatientDetailForm;
|
class PatientDetailForm;
|
||||||
|
|
||||||
class SlideTableView;
|
class SlideTableView;
|
||||||
|
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
class SelectFormWidget: public TabFormWidget {
|
|
||||||
Q_OBJECT
|
class SelectFormWidget : public TabFormWidget {
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SelectFormWidget(QWidget *parent = nullptr);
|
explicit SelectFormWidget(QWidget *parent = nullptr);
|
||||||
|
|
||||||
~SelectFormWidget() override = default;;
|
~SelectFormWidget() override = default;;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString selectedPatientUID;
|
QString selectedPatientUID;
|
||||||
void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const;
|
|
||||||
QToolButton* mBtnAccount;
|
void
|
||||||
QToolButton* mBtnWorklist;
|
setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const;
|
||||||
QToolButton* mBtnAdd;
|
|
||||||
QToolButton* mBtnEdit;
|
QToolButton *mBtnAccount;
|
||||||
QToolButton* mBtnDelete;
|
QToolButton *mBtnWorklist;
|
||||||
QToolButton* mBtnSelect;
|
QToolButton *mBtnAdd;
|
||||||
SlideTableView* mPatTable;
|
QToolButton *mBtnEdit;
|
||||||
QSqlTableModel* mModel;
|
QToolButton *mBtnDelete;
|
||||||
PatientDetailForm* mEditPatForm;
|
QToolButton *mBtnSelect;
|
||||||
|
SlideTableView *mPatTable;
|
||||||
|
QSqlTableModel *mModel;
|
||||||
|
PatientDetailForm *mEditPatForm;
|
||||||
|
|
||||||
void prepareButtons(bool disableALL);
|
void prepareButtons(bool disableALL);
|
||||||
|
|
||||||
void initGeneralButtons(QHBoxLayout *layout);
|
void initGeneralButtons(QHBoxLayout *layout);
|
||||||
|
|
||||||
void initPatEditButtons(QHBoxLayout *layout);
|
void initPatEditButtons(QHBoxLayout *layout);
|
||||||
|
|
||||||
void editPatient();
|
void editPatient();
|
||||||
|
|
||||||
void delPatient();
|
void delPatient();
|
||||||
|
|
||||||
void selectPatient();
|
void selectPatient();
|
||||||
|
|
||||||
void initDataModel();
|
void initDataModel();
|
||||||
|
|
||||||
void initDetailPanel(QHBoxLayout *contentLayout);
|
void initDetailPanel(QHBoxLayout *contentLayout);
|
||||||
|
|
||||||
void initTableView(QHBoxLayout *contentLayout);
|
void initTableView(QHBoxLayout *contentLayout);
|
||||||
|
|
||||||
void reloadLanguage();
|
void reloadLanguage();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ AdminSettingForm::AdminSettingForm(QWidget* aParent, Qt::WindowFlags f)
|
|||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->setContentsMargins(0, 8, 0, 1);
|
layout->setContentsMargins(0, 8, 0, 1);
|
||||||
ui->contentWidget->setLayout(layout);
|
ui->contentWidget->setLayout(layout);
|
||||||
ui->contentWidget->setObjectName("contentWidgetWithBBorder");
|
ui->contentWidget->setObjectName("settingContentWidget");
|
||||||
QListWidget* widget = new QListWidget(this);
|
QListWidget* widget = new QListWidget(this);
|
||||||
widget->setFixedWidth(250);
|
widget->setFixedWidth(250);
|
||||||
QStringList menus;
|
QStringList menus;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#include "tabformwidget.h"
|
#include "tabformwidget.h"
|
||||||
#include "ui_tabformwidget.h"
|
#include "ui_tabformwidget.h"
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include "components/RollingMessageWidget.h"
|
|
||||||
#include "event/EventCenter.h"
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||||
# pragma execution_character_set("utf-8")
|
# pragma execution_character_set("utf-8")
|
||||||
@@ -13,7 +11,6 @@ TabFormWidget::TabFormWidget(QWidget* parent) :
|
|||||||
ui(new Ui::TabFormWidget)
|
ui(new Ui::TabFormWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TabFormWidget::~TabFormWidget()
|
TabFormWidget::~TabFormWidget()
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -38,7 +38,7 @@ LoginDialog::~LoginDialog()
|
|||||||
|
|
||||||
void LoginDialog::initializeAllWidget()
|
void LoginDialog::initializeAllWidget()
|
||||||
{
|
{
|
||||||
this->setObjectName("loginform");
|
this->setObjectName("loginForm");
|
||||||
|
|
||||||
initializeTitle();
|
initializeTitle();
|
||||||
initializeDialogFrame();
|
initializeDialogFrame();
|
||||||
@@ -88,7 +88,7 @@ void LoginDialog::initializeTitle()
|
|||||||
|
|
||||||
void LoginDialog::initializeDialogFrame()
|
void LoginDialog::initializeDialogFrame()
|
||||||
{
|
{
|
||||||
mDialogFrame->setObjectName("login_frame_username");
|
mDialogFrame->setObjectName("loginFrame");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoginDialog::initializeEdit()
|
void LoginDialog::initializeEdit()
|
||||||
|
|||||||
@@ -9,8 +9,9 @@
|
|||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_MainWindow.h"
|
||||||
#include "event/EventCenter.h"
|
#include "event/EventCenter.h"
|
||||||
#include "forms/tabformwidget.h"
|
#include "forms/tabformwidget.h"
|
||||||
#include "forms/select/SelectFormWidget.h"
|
#include "forms/select/SelectFormWidget.h"
|
||||||
@@ -434,3 +435,19 @@ void MainWindow::swipeTriggered(QSwipeGesture* aSwipeGesture)
|
|||||||
//update();
|
//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);
|
void changeEvent(QEvent* aEvent);
|
||||||
bool event(QEvent* aEvent) override;
|
bool event(QEvent* aEvent) override;
|
||||||
|
|
||||||
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initializeTabWidget();
|
void initializeTabWidget();
|
||||||
void initializeLayout();
|
void initializeLayout();
|
||||||
|
|||||||
Reference in New Issue
Block a user