Add StartScanProcessDialog.
This commit is contained in:
67
src/dialogs/StartScanProcessDialog.cpp
Normal file
67
src/dialogs/StartScanProcessDialog.cpp
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user