Use Qss instead of some image path in code.
This commit is contained in:
@@ -59,11 +59,9 @@ EditPatientDialog::EditPatientDialog(QWidget* parent, Qt::WindowFlags f) : GUIFo
|
||||
btnSex = new ListBox(this);
|
||||
btnSex->setText(tr("Female"));
|
||||
btnSex->setProperty("idx", 0);
|
||||
btnSex->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
btnSex->setLayoutDirection(Qt::RightToLeft);
|
||||
btnSex->setObjectName("editvalBtn");
|
||||
btnSex->setIcon(QIcon(":/icons/arrow-down.png"));
|
||||
btnSex->setIconSize({ 30, 30 });
|
||||
|
||||
btnSex->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
connect(btnSex, &QToolButton::clicked, [=]() {
|
||||
@@ -91,11 +89,9 @@ EditPatientDialog::EditPatientDialog(QWidget* parent, Qt::WindowFlags f) : GUIFo
|
||||
|
||||
layout->addWidget(lbl_date);
|
||||
btnDate = new ListBox(this);
|
||||
btnDate->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
btnDate->setLayoutDirection(Qt::RightToLeft);
|
||||
btnDate->setObjectName("editvalBtn");
|
||||
btnDate->setIcon(QIcon(":/icons/arrow-down.png"));
|
||||
btnDate->setIconSize({ 30, 30 });
|
||||
btnDate->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
btnDate->setText("1990-06-15");
|
||||
connect(btnDate, &QToolButton::clicked, [=]() {
|
||||
|
||||
@@ -104,12 +104,9 @@ void AccountFormDialog::changeSelfPassword()
|
||||
void AccountFormDialog::addButtonPwd(QHBoxLayout* layout)
|
||||
{
|
||||
mBtnPwd = new QToolButton(this);
|
||||
mBtnPwd->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
mBtnPwd->setObjectName("editvalBtn");
|
||||
mBtnPwd->setIcon(QIcon(":/icons/edit.png"));
|
||||
mBtnPwd->setIconSize({ 30, 30 });
|
||||
mBtnPwd->setText(mMode == Self ? tr("Change Password") : tr("Reset Password"));
|
||||
mBtnPwd->setObjectName("changePwdBtn");
|
||||
mBtnPwd->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
mBtnPwd->setText(mMode == Self ? tr("Change Password") : tr("Reset Password"));
|
||||
layout->addWidget(mBtnPwd);
|
||||
}
|
||||
|
||||
@@ -164,12 +161,9 @@ void AccountFormDialog::addTitleLabel(QVBoxLayout* layout)
|
||||
void AccountFormDialog::addSelfModeUI(QHBoxLayout* hlayout)
|
||||
{
|
||||
auto btnLogout = new QToolButton(this);
|
||||
btnLogout->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
btnLogout->setIcon(QIcon(":/icons/logout.png"));
|
||||
btnLogout->setIconSize({ 30, 30 });
|
||||
btnLogout->setText(tr("Logout"));
|
||||
btnLogout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
btnLogout->setObjectName("editvalBtn");
|
||||
btnLogout->setObjectName("logoutBtn");
|
||||
|
||||
hlayout->addWidget(btnLogout);
|
||||
connect(btnLogout, &QAbstractButton::clicked, [=]() {
|
||||
|
||||
@@ -28,12 +28,12 @@ GUIMessageDialog::GUIMessageDialog(QWidget *parent)
|
||||
void GUIMessageDialog::initBaseLayout() {
|
||||
mUI->lblMsg->setVisible(false);
|
||||
mUI->lblProgressIcon->setVisible(false);
|
||||
mBtnMain->setObjectName("dialogBtn");
|
||||
mBtnMain->setObjectName("dialogBtnStop");
|
||||
mBtnMain->setVisible(false);
|
||||
mBtnMain->setText("OK");
|
||||
mBtnAppend->setObjectName("dialogBtn");
|
||||
mBtnMain->setText("Stop");
|
||||
mBtnAppend->setObjectName("dialogBtnOK");
|
||||
mBtnAppend->setVisible(false);
|
||||
mBtnAppend->setText("Stop");
|
||||
mBtnAppend->setText("OK");
|
||||
auto btnContainer = new QWidget(this);
|
||||
auto hLayout = new QHBoxLayout(btnContainer);
|
||||
hLayout->setMargin(0);
|
||||
@@ -97,7 +97,6 @@ void GUIMessageDialog::startLoading() {
|
||||
LOG_USER_OPERATION(Stop);
|
||||
});
|
||||
mTimerID = startTimer(100);
|
||||
mBtnMain->setText("Stop");
|
||||
mBtnMain->setVisible(true);
|
||||
}
|
||||
|
||||
@@ -107,10 +106,11 @@ void GUIMessageDialog::showMessage(const QString& msg) {
|
||||
}
|
||||
|
||||
void GUIMessageDialog::showExitButton() {
|
||||
mBtnMain->setText("OK");
|
||||
mBtnMain->setVisible(true);
|
||||
disconnect(mBtnMain, nullptr, nullptr, nullptr);
|
||||
connect(mBtnMain, &QToolButton::clicked, [=](){
|
||||
mBtnMain->setVisible(false);
|
||||
mBtnAppend->setVisible(true);
|
||||
mBtnAppend->setText(tr("OK"));
|
||||
disconnect(mBtnAppend, nullptr, nullptr, nullptr);
|
||||
connect(mBtnAppend, &QToolButton::clicked, [=](){
|
||||
if (mTimerID != -1){
|
||||
killTimer(mTimerID);
|
||||
mTimerID = -1;
|
||||
@@ -126,8 +126,8 @@ void GUIMessageDialog::hideMessage() {
|
||||
}
|
||||
|
||||
void GUIMessageDialog::hideExitButton() {
|
||||
mBtnMain->setVisible(false);
|
||||
disconnect(mBtnMain, nullptr, nullptr, nullptr);
|
||||
mBtnAppend->setVisible(false);
|
||||
disconnect(mBtnAppend, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
void GUIMessageDialog::setOpacity(double opacity) {
|
||||
@@ -141,6 +141,7 @@ void GUIMessageDialog::startPending() {
|
||||
stopPending();
|
||||
});
|
||||
mBtnAppend->setText("Next");
|
||||
mBtnAppend->setObjectName("dialogBtnOK");
|
||||
mBtnAppend->setVisible(true);
|
||||
mPending = true;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,6 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
QLabel * logo = new QLabel(this);
|
||||
QPixmap img(":/icons/logo.png");
|
||||
logo->setPixmap(img.scaledToHeight(33, Qt::SmoothTransformation));
|
||||
logo->setObjectName("logo");
|
||||
layout->addWidget(logo);
|
||||
QLabel * company = new QLabel(this);
|
||||
@@ -28,8 +26,7 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
||||
spacerLine0->setObjectName("smallSpacer");
|
||||
layout->addWidget(spacerLine0);
|
||||
QLabel * lbl_msglogo = new QLabel(this);
|
||||
lbl_msglogo->setObjectName("lbl_msglogo");
|
||||
lbl_msglogo->setPixmap(QPixmap(":/icons/msg.png").scaledToHeight(26, Qt::SmoothTransformation));
|
||||
lbl_msglogo->setObjectName("msglogo");
|
||||
layout->addWidget(lbl_msglogo);
|
||||
|
||||
QWidget* widgetMsg = new QWidget(this);
|
||||
@@ -43,9 +40,9 @@ TopBarWidget::TopBarWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent,
|
||||
QLabel* nowDate = new QLabel(this);
|
||||
nowDate->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
|
||||
QLabel* linkIcon = new QLabel(this);
|
||||
linkIcon->setPixmap(QPixmap(":/icons/link_g.png").scaledToHeight(22, Qt::SmoothTransformation));
|
||||
linkIcon->setObjectName("link");
|
||||
QLabel* readyIcon = new QLabel(this);
|
||||
readyIcon->setPixmap(QPixmap(":/icons/ready.png").scaledToHeight(22, Qt::SmoothTransformation));
|
||||
readyIcon->setObjectName("ready");
|
||||
QLabel* lockIcon = new QLabel(this);
|
||||
lockIcon->setText("");
|
||||
// lockIcon->setPixmap(QPixmap(":/icons/lock.png").scaledToHeight(22,Qt::SmoothTransformation));
|
||||
|
||||
@@ -93,7 +93,7 @@ void ScanFormWidget::initScanContent() {
|
||||
broadcastWidget->setLayout(viewerLayout);
|
||||
viewerLayout->addWidget(mViewer);
|
||||
contentLayout->addWidget(broadcastWidget);
|
||||
paramWidget->setObjectName("param_widget");
|
||||
paramWidget->setObjectName("paramWidget");
|
||||
auto paramLayout = new QVBoxLayout(paramWidget);
|
||||
mLblPreview->setText(tr("Preview Parameters"));
|
||||
mLblPreview->setObjectName("parameterTitle");
|
||||
@@ -177,8 +177,7 @@ void ScanFormWidget::setPreviewing(bool val) {
|
||||
void ScanFormWidget::renderLoading() {
|
||||
setPreviewing(true);
|
||||
uchar c_data[PREVIEW_ROW][PREVIEW_COL];
|
||||
for (int i = 0; i < PREVIEW_ROW; i++) {
|
||||
uchar* data_ptr = c_data[i];
|
||||
for (auto data_ptr : c_data) {
|
||||
memset(data_ptr, 0, PREVIEW_COL);
|
||||
}
|
||||
QImage img(c_data[0], PREVIEW_COL, PREVIEW_ROW, QImage::Format_Grayscale8);
|
||||
@@ -203,8 +202,7 @@ void ScanFormWidget::renderPreviewData(const QObject *data) {
|
||||
auto array = (QByteArray*)data;
|
||||
auto raw_dataptr = (uchar*)array->data();
|
||||
uchar c_data[PREVIEW_ROW][PREVIEW_COL];
|
||||
for (int i = 0; i < PREVIEW_ROW; i++) {
|
||||
uchar* data_ptr = c_data[i];
|
||||
for (auto data_ptr : c_data) {
|
||||
memcpy(data_ptr, raw_dataptr, PREVIEW_COL);
|
||||
raw_dataptr += PREVIEW_COL;
|
||||
}
|
||||
@@ -221,7 +219,7 @@ void ScanFormWidget::renderPreviewData(const QObject *data) {
|
||||
font.setBold(true);
|
||||
painter.setFont(font);
|
||||
painter.setPen(pen);
|
||||
static int borderSpacing = round(((PIXEL_SPACING * (PREVIEW_ROW * 0.5f) - HALF_ROI_WIDTH) * (800.0f / (1.5f * 140.0f))));
|
||||
static int borderSpacing = (int)roundf(((PIXEL_SPACING * (PREVIEW_ROW * 0.5f) - HALF_ROI_WIDTH) * (800.0f / (1.5f * 140.0f))));
|
||||
painter.drawLine(borderSpacing, borderSpacing, borderSpacing, 800 - borderSpacing);
|
||||
painter.drawLine(borderSpacing + 1, borderSpacing, 800 - borderSpacing, borderSpacing);
|
||||
painter.drawLine(borderSpacing + 1, 800 - borderSpacing, 800 - borderSpacing, 800 - borderSpacing);
|
||||
|
||||
@@ -15,9 +15,6 @@ PatientDetailForm::PatientDetailForm(QWidget* parent) :
|
||||
mUI->setupUi(this);
|
||||
mUI->hideBtn->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Preferred);
|
||||
mUI->hideBtn->setObjectName("hideeditBtn");
|
||||
mUI->hideBtn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
mUI->hideBtn->setIcon(QIcon(":/icons/hidearrow.png"));
|
||||
mUI->hideBtn->setIconSize({30, 30});
|
||||
mUI->hideBtn->setText(tr(" Hide Panel"));
|
||||
connect(mUI->hideBtn, &QToolButton::clicked, [=](){
|
||||
emit hideBtnClicked();
|
||||
|
||||
@@ -1,152 +1,176 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PatientDetailForm</class>
|
||||
<widget class="QWidget" name="PatientDetailForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>466</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="hideBtn">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_ID">
|
||||
<property name="text">
|
||||
<string>ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ULineEdit" name="tbxID" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_Name">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<class>PatientDetailForm</class>
|
||||
<widget class="QWidget" name="PatientDetailForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>466</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="ULineEdit" name="tbxName" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolButton" name="hideBtn">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_ID">
|
||||
<property name="text">
|
||||
<string>ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_Sex">
|
||||
<property name="text">
|
||||
<string>Gender</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="ULineEdit" name="tbxID">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ULineEdit" name="tbxSex" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="lbl_Name">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_DOB">
|
||||
<property name="text">
|
||||
<string>Date Of Birth</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="ULineEdit" name="tbxName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDateEdit" name="tbxDob">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="lbl_Sex">
|
||||
<property name="text">
|
||||
<string>Gender</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="ULineEdit" name="tbxSex">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_Comment">
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="lbl_DOB">
|
||||
<property name="text">
|
||||
<string>Date Of Birth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="UTextEdit" name="rtbxComment">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDateEdit" name="tbxDob">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="editcmdWidget" native="true"/>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ULineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>components/ULineEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>UTextEdit</class>
|
||||
<extends>QTextEdit</extends>
|
||||
<header>components/UTextEdit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_Comment">
|
||||
<property name="text">
|
||||
<string>Comment</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="UTextEdit" name="rtbxComment">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="editcmdWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ULineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>components/ULineEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>UTextEdit</class>
|
||||
<extends>QTextEdit</extends>
|
||||
<header>components/UTextEdit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -191,9 +191,6 @@ void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare e
|
||||
contentLayout->addWidget(mEditPatForm);
|
||||
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("Patient Detail");
|
||||
contentLayout->addWidget(btnShowEdit);
|
||||
|
||||
@@ -33,10 +33,8 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
mUI->lbl_used->setText(tr("Loading..."));
|
||||
|
||||
//style init
|
||||
mUI->btn_dicom->setIcon(QIcon(":/icons/dicomsettings.png"));
|
||||
mUI->btn_dicom->setIconSize(QSize(80, 80));
|
||||
mUI->btn_network->setIcon(QIcon(":/icons/networksettings.png"));
|
||||
mUI->btn_network->setIconSize(QSize(80, 80));
|
||||
mUI->btnDICOM->setObjectName("btnDICOM");
|
||||
mUI->btnNetwork->setObjectName("btnNetwork");
|
||||
mUI->swt_verify->setChecked(true);
|
||||
mUI->lbl_verify->setFixedWidth(100);
|
||||
|
||||
@@ -100,7 +98,7 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
connect(scanCompleteButton, &ImageSwitch::clicked, [=]() {
|
||||
JsonObject::Instance()->setCompleteNotify(scanCompleteButton->getChecked());
|
||||
});
|
||||
connect(mUI->btn_network, &QToolButton::clicked, [=]() {
|
||||
connect(mUI->btnNetwork, &QToolButton::clicked, [=]() {
|
||||
GetAdminPsw dialog(this);
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
@@ -111,7 +109,7 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
}
|
||||
});
|
||||
|
||||
connect(mUI->btn_dicom, &QToolButton::clicked, [=]() {
|
||||
connect(mUI->btnDICOM, &QToolButton::clicked, [=]() {
|
||||
DicomCfgDialog dia(this);
|
||||
dia.setWindowModality(Qt::WindowModal);
|
||||
dia.exec();
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
<widget class="QWidget" name="widget_4" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_network">
|
||||
<widget class="QToolButton" name="btnNetwork">
|
||||
<property name="text">
|
||||
<string>IP</string>
|
||||
</property>
|
||||
@@ -248,7 +248,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="btn_dicom">
|
||||
<widget class="QToolButton" name="btnDICOM">
|
||||
<property name="text">
|
||||
<string>DICOM</string>
|
||||
</property>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -171,26 +171,6 @@ MainWindow::MainWindow(QWidget* aParent)
|
||||
centerWidgetHide();
|
||||
}
|
||||
|
||||
void MainWindow::resetRoleLayout() {
|
||||
if (User::Current()->isAdmin())
|
||||
{
|
||||
if (mAdminTabIndex == -1)
|
||||
{
|
||||
AdminSettingForm* form = new AdminSettingForm(this);
|
||||
mAdminTabIndex = mTabWidget->addTab(form, tr("Settings"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mAdminTabIndex != -1)
|
||||
{
|
||||
mTabWidget->removeTab(mAdminTabIndex);
|
||||
mAdminTabIndex = -1;
|
||||
}
|
||||
}
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
mThread->terminate();
|
||||
@@ -214,7 +194,7 @@ void MainWindow::loadStyleSheet(const QString& aSheetName)
|
||||
|
||||
void MainWindow::initializeLayout()
|
||||
{
|
||||
QVBoxLayout* layout = new QVBoxLayout(mUI->mCentralWidget);
|
||||
auto layout = new QVBoxLayout(mUI->mCentralWidget);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
QWidget* topBarWidget = new TopBarWidget(this);
|
||||
@@ -228,11 +208,11 @@ void MainWindow::initializeTabWidget()
|
||||
mTabWidget->setTabPosition(QTabWidget::South);
|
||||
mTabWidget->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
SelectFormWidget* selectForm = new SelectFormWidget(this);
|
||||
auto selectForm = new SelectFormWidget(this);
|
||||
mTabWidget->addTab(selectForm, tr("Select"));
|
||||
ScanFormWidget* scanForm = new ScanFormWidget(this);
|
||||
auto scanForm = new ScanFormWidget(this);
|
||||
mTabWidget->addTab(scanForm, tr("Scan"));
|
||||
TabFormWidget* verifyForm = new TabFormWidget(this);
|
||||
auto verifyForm = new TabFormWidget(this);
|
||||
mTabWidget->addTab(verifyForm, tr("Verify"));
|
||||
mTabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
}
|
||||
@@ -271,10 +251,9 @@ bool MainWindow::event(QEvent* aEvent)
|
||||
{
|
||||
return gestureEvent(static_cast<QGestureEvent*>(aEvent));
|
||||
}
|
||||
return QWidget::event(aEvent);
|
||||
return QMainWindow::event(aEvent);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::changeEvent(QEvent* aEvent)
|
||||
{
|
||||
if (aEvent->type() == QEvent::LanguageChange)
|
||||
@@ -285,6 +264,7 @@ void MainWindow::changeEvent(QEvent* aEvent)
|
||||
QWidget::changeEvent(aEvent);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::keyPressEvent(QKeyEvent *event) {
|
||||
if (event->modifiers()==Qt::ControlModifier &&event->key()==Qt::Key_R){
|
||||
QFile file("D:\\workdir\\GUI\\src\\stylesheet\\Dark2.css");
|
||||
@@ -403,6 +383,26 @@ void MainWindow::requestLogin()
|
||||
centerWidgetShow();
|
||||
}
|
||||
|
||||
void MainWindow::resetRoleLayout() {
|
||||
if (User::Current()->isAdmin())
|
||||
{
|
||||
if (mAdminTabIndex == -1)
|
||||
{
|
||||
AdminSettingForm* form = new AdminSettingForm(this);
|
||||
mAdminTabIndex = mTabWidget->addTab(form, tr("Settings"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mAdminTabIndex != -1)
|
||||
{
|
||||
mTabWidget->removeTab(mAdminTabIndex);
|
||||
mAdminTabIndex = -1;
|
||||
}
|
||||
}
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
//------log out about----------------------------------------------------------
|
||||
|
||||
QTextEdit* MainWindow::getEdit()
|
||||
|
||||
Reference in New Issue
Block a user