Add StartScanProcessDialog.

This commit is contained in:
sunwen
2024-04-29 17:57:04 +08:00
parent 076bea7f81
commit db1d589622
5 changed files with 582 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
#include "dialogs/ReconSettingsDialog.h"
#include "dialogs/IpSettingsDialog.h"
#include "dialogs/MppsSettingsDialog.h"
#include "dialogs/StartScanProcessDialog.h"
#include "network/DicomCfgDialog.h"
#include "network/GetAdminPsw.h"
@@ -394,6 +395,17 @@ DialogResult DialogManager::requestEditRouteInfo(const QStringList& aEditData)
return DialogResult(ret,dialog.getList());
}
DialogResult DialogManager::reuqestConfirmStartScan(PatientInformation* aPatient)
{
StartScanProcessDialog dialog(mTopWidget);
dialog.setPatientDetailForm(aPatient);
setTopWidget(&dialog);
dialog.setWindowModality(Qt::WindowModal);;
int ret = dialog.exec();
releaseTopWidget(&dialog);
return DialogResult(ret,QVariant(""));
}
int DialogManager::requestPatientConfirm(PatientInformation* patientInf, int type)
{
PatientConfirmDialog dialog(mTopWidget);

View File

@@ -11,10 +11,10 @@
class GUIMessageDialog;
class QSqlTableModel;
class QTableView;
class PatientInformation;
class LoginDialog;
class ScreenSaverWindow;
class GetWorkListDialog;
class PatientInformation;
enum MessageLevel:unsigned int;
@@ -71,6 +71,7 @@ public:
DialogResult requestEditIpAndNetMask(const QStringList& aEditData);
DialogResult requestEditRouteInfo();
DialogResult requestEditRouteInfo(const QStringList& aEditData);
DialogResult reuqestConfirmStartScan(PatientInformation* aPatient);
void requestChangePassword();
void raiseDeviceError(QObject* parent, QObject* msg);
void raiseDeviceInfo(QObject* parent, QObject* aInfoData);

View File

@@ -0,0 +1,67 @@
#include "StartScanProcessDialog.h"
#include "ui_StartScanProcessDialog.h"
#include "forms/select/PatientInformation.h"
#include "json/jsonobject.h"
#include <QButtonGroup>
StartScanProcessDialog::StartScanProcessDialog(QWidget *aParent) :
QDialog(aParent),
mUI(new Ui::StartScanProcessDialog)
{
mUI->setupUi(this);
setObjectName("formDialog");
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);
initButtons();
}
StartScanProcessDialog::~StartScanProcessDialog()
{
delete mUI;
}
void StartScanProcessDialog::initButtons()
{
connect(mUI->mExecuteButton, &QPushButton::clicked, this, &StartScanProcessDialog::accept);
connect(mUI->mCancelButton, &QPushButton::clicked, this, &QDialog::reject);
QButtonGroup* buttonGroup = new QButtonGroup(this);
buttonGroup->setExclusive(true);
buttonGroup->addButton(mUI->mLeftToRightButton);
buttonGroup->addButton(mUI->mRightToLeftButton);
buttonGroup->addButton(mUI->mOnlyLeftButton);
buttonGroup->addButton(mUI->mOnlyRightButton);
QString protocol = JsonObject::Instance()->defaultProtocal();
if(protocol == "LSTAND")
{
mUI->mLeftToRightButton->setChecked(true);
}
else if(protocol == "RSTAND")
{
mUI->mRightToLeftButton->setChecked(true);
}
else if(protocol == "LONE")
{
mUI->mOnlyLeftButton->setChecked(true);
}
else
{
mUI->mOnlyRightButton->setChecked(true);
}
}
void StartScanProcessDialog::setPatientDetailForm(PatientInformation* aPatient)
{
mUI->mPatientID->setText(aPatient->ID);
mUI->mPatienName->setText(aPatient->Name);
mUI->mPatientGender->setText(aPatient->Sex);
mUI->mPatientBirth->setText(aPatient->BirthDate);
mUI->mAccessionNumber->setText(aPatient->AccessionNumber);
}
void StartScanProcessDialog::accept()
{
QDialog::accept();
}

View File

@@ -0,0 +1,31 @@
#ifndef STARTSCANPROCESSDIALOG_H
#define STARTSCANPROCESSDIALOG_H
#include <QDialog>
class PatientInformation;
namespace Ui {
class StartScanProcessDialog;
}
class StartScanProcessDialog : public QDialog
{
Q_OBJECT
public:
explicit StartScanProcessDialog(QWidget *aParent = nullptr);
~StartScanProcessDialog() override;
void setPatientDetailForm(PatientInformation* aPatient);
public slots:
void accept() override;
private:
void initButtons();
private:
Ui::StartScanProcessDialog *mUI;
};
#endif // STARTSCANPROCESSDIALOG_H

View File

@@ -0,0 +1,470 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>StartScanProcessDialog</class>
<widget class="QDialog" name="StartScanProcessDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>638</width>
<height>468</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="mTitle">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:30px;
border-bottom: 1px solid gray;</string>
</property>
<property name="text">
<string>Patien Information</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="mPatientInformationArea" native="true">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="2">
<widget class="QLabel" name="mPatientBirthLabel">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string>PatientBirth:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="mAccessionNumber">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mPatientGenderLabel">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string>PatientGender:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="mPatienName">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="mPatientGender">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mAccessionNumberLabel">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string>AccessionNumber:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="mPatientNameLabel">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string>PatientName:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="mPatientBirth">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="mPatientIDLabel">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string>PatientID:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="mPatientID">
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">font-size:28px</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="mProtocolSettingsLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>-1</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">border-top: 1px solid #0078d8;
border-bottom: 1px solid gray;
font-size:28px;</string>
</property>
<property name="text">
<string>Protocol Settings</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="mProtocolButtonArea" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QPushButton
{
font-size: 28px;
}
</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="mLeftToRightButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:checked
{
border: 5px solid darkorange;
}</string>
</property>
<property name="text">
<string>left-&gt;right</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mRightToLeftButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:checked
{
border: 5px solid darkorange;
padding: 0px;
}</string>
</property>
<property name="text">
<string>right-&gt;left</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mOnlyLeftButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:checked
{
border: 5px solid darkorange;
padding: 0px;
}</string>
</property>
<property name="text">
<string>only left</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mOnlyRightButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:checked
{
border: 5px solid darkorange;
padding: 0px;
}</string>
</property>
<property name="text">
<string>only right</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="endSpaceLine">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>3</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="mDilaogButtonArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>80</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mExecuteButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">font-size: 28px;</string>
</property>
<property name="text">
<string>start Scan</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mCancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">font-size: 28px;</string>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>