Add start scan process from worklist and add scan protocal display in scan page.
This commit is contained in:
@@ -400,7 +400,7 @@ DialogResult DialogManager::reuqestConfirmStartScan(PatientInformation* aPatient
|
||||
dialog.setWindowModality(Qt::WindowModal);;
|
||||
int ret = dialog.exec();
|
||||
releaseTopWidget(&dialog);
|
||||
return DialogResult(ret,QVariant(""));
|
||||
return DialogResult(ret,dialog.getSelectedProtocal());
|
||||
}
|
||||
|
||||
int DialogManager::requestPatientConfirm(PatientInformation* patientInf, int type)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "action/GetWorkListAction.h"
|
||||
#include "action/ActionCreator.h"
|
||||
#include "log/UserOperationLog.h"
|
||||
#include "event/EventCenter.h"
|
||||
|
||||
GetWorkListDialog::GetWorkListDialog(QSqlTableModel* aSqlModel, QTableView* aTableView, QWidget* aParent, Qt::WindowFlags aFlags)
|
||||
: AsyncActionDialog(ActionCreator::getAsyncAction<GetWorkListAction>("GetWorkListAction"),"Work List", aParent, aFlags)
|
||||
@@ -256,6 +257,7 @@ void GetWorkListDialog::insertPatient(PatientInformationPointer aPatient)
|
||||
mSqlModel->data(mSqlModel->index(i, accessionNumberIndex)) == aPatient->AccessionNumber)
|
||||
{
|
||||
mTableView->selectRow(i);
|
||||
EventCenter::Default()->triggerEvent(PatientSelected, nullptr, (QObject*)(aPatient.data()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -276,6 +278,8 @@ void GetWorkListDialog::insertPatient(PatientInformationPointer aPatient)
|
||||
}
|
||||
mTableView->selectRow(0);
|
||||
LOG_USER_OPERATION(QString("Add Patient, ID:%1").arg(aPatient->ID));
|
||||
|
||||
EventCenter::Default()->triggerEvent(PatientSelected, nullptr, (QObject*)(aPatient.data()));
|
||||
}
|
||||
|
||||
void GetWorkListDialog::showEvent(QShowEvent *aEvent)
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
StartScanProcessDialog::StartScanProcessDialog(QWidget *aParent) :
|
||||
QDialog(aParent),
|
||||
mUI(new Ui::StartScanProcessDialog)
|
||||
mUI(new Ui::StartScanProcessDialog),
|
||||
mScanProtocal(LSTAND)
|
||||
{
|
||||
mUI->setupUi(this);
|
||||
setObjectName("formDialog");
|
||||
@@ -27,28 +28,33 @@ void StartScanProcessDialog::initButtons()
|
||||
connect(mUI->mCancelButton, &QPushButton::clicked, this, &QDialog::reject);
|
||||
|
||||
QButtonGroup* buttonGroup = new QButtonGroup(this);
|
||||
connect(buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked), this, &StartScanProcessDialog::setSelectedScanProtocal);
|
||||
buttonGroup->setExclusive(true);
|
||||
buttonGroup->addButton(mUI->mLeftToRightButton);
|
||||
buttonGroup->addButton(mUI->mRightToLeftButton);
|
||||
buttonGroup->addButton(mUI->mOnlyLeftButton);
|
||||
buttonGroup->addButton(mUI->mOnlyRightButton);
|
||||
buttonGroup->addButton(mUI->mLeftToRightButton, LSTAND);
|
||||
buttonGroup->addButton(mUI->mRightToLeftButton, RSTAND);
|
||||
buttonGroup->addButton(mUI->mOnlyLeftButton, LONE);
|
||||
buttonGroup->addButton(mUI->mOnlyRightButton, RONE);
|
||||
|
||||
QString protocol = JsonObject::Instance()->defaultProtocal();
|
||||
if(protocol == "LSTAND")
|
||||
{
|
||||
mUI->mLeftToRightButton->setChecked(true);
|
||||
mScanProtocal = LSTAND;
|
||||
}
|
||||
else if(protocol == "RSTAND")
|
||||
{
|
||||
mUI->mRightToLeftButton->setChecked(true);
|
||||
mScanProtocal = RSTAND;
|
||||
}
|
||||
else if(protocol == "LONE")
|
||||
{
|
||||
mUI->mOnlyLeftButton->setChecked(true);
|
||||
mScanProtocal = LONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
mUI->mOnlyRightButton->setChecked(true);
|
||||
mScanProtocal = RONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,3 +71,14 @@ void StartScanProcessDialog::accept()
|
||||
{
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
ScanProtocal StartScanProcessDialog::getSelectedProtocal()
|
||||
{
|
||||
return mScanProtocal;
|
||||
}
|
||||
|
||||
void StartScanProcessDialog::setSelectedScanProtocal(int aButtonIndex)
|
||||
{
|
||||
mScanProtocal = static_cast<ScanProtocal>(aButtonIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define STARTSCANPROCESSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "forms/scan/PatientInformationForm.h"
|
||||
|
||||
class PatientInformation;
|
||||
|
||||
@@ -17,15 +18,18 @@ public:
|
||||
explicit StartScanProcessDialog(QWidget *aParent = nullptr);
|
||||
~StartScanProcessDialog() override;
|
||||
void setPatientDetailForm(PatientInformation* aPatient);
|
||||
ScanProtocal getSelectedProtocal();
|
||||
|
||||
public slots:
|
||||
void accept() override;
|
||||
void setSelectedScanProtocal(int aButtonIndex);
|
||||
|
||||
private:
|
||||
void initButtons();
|
||||
|
||||
private:
|
||||
Ui::StartScanProcessDialog *mUI;
|
||||
ScanProtocal mScanProtocal;
|
||||
};
|
||||
|
||||
#endif // STARTSCANPROCESSDIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user