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