Make select patient can change to scan page.
This commit is contained in:
@@ -40,6 +40,7 @@ ADD_EVENT_VALUE(DoWorkListSearch)\
|
||||
ADD_EVENT_VALUE(WarningMessageRaise)\
|
||||
ADD_EVENT_VALUE(ErrorStateActive)\
|
||||
ADD_EVENT_VALUE(ErrorStateUnactive)\
|
||||
ADD_EVENT_VALUE(StartScanProcess)\
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -329,8 +329,9 @@ void ScanFormWidget::initEvents()
|
||||
DialogResult result = DialogManager::Default()->reuqestConfirmStartScan(patientInfo);
|
||||
if(result.ResultCode == QDialog::Accepted)
|
||||
{
|
||||
|
||||
mPatInf->setPatientInformation(patientInfo->Copy());
|
||||
LOG_USER_OPERATION(QString("Select Patient, ID: %1").arg(patientInfo->ID))
|
||||
EventCenter::Default()->triggerEvent(StartScanProcess, nullptr, patientInfo);
|
||||
}
|
||||
|
||||
// mBtnScan->setEnabled(true);
|
||||
|
||||
@@ -77,6 +77,12 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::AnonymousModeChanged, this, &SelectFormWidget::updateDataByAnonymousMode);
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::StartScanProcess, this, [=](QObject* sender, QObject* data)
|
||||
{
|
||||
PatientInformation* patientInfo = (PatientInformation*)data;
|
||||
this->setSelectedPatient(patientInfo);
|
||||
});
|
||||
|
||||
//first prepare buttons!
|
||||
prepareButtons(false);
|
||||
|
||||
@@ -176,8 +182,11 @@ void SelectFormWidget::delPatient() {
|
||||
|
||||
void SelectFormWidget::selectPatient() {
|
||||
EventCenter::Default()->triggerEvent(PatientSelected, nullptr, (QObject*)patientDetailForm->getPatientInformation());
|
||||
selectedPatientUID = patientDetailForm->getPatientInformation()->PatientUID;
|
||||
LOG_USER_OPERATION(QString("Select Patient, ID: %1").arg(patientDetailForm->getPatientInformation()->ID))
|
||||
}
|
||||
|
||||
void SelectFormWidget::setSelectedPatient(PatientInformation* aPatient)
|
||||
{
|
||||
selectedPatientUID = aPatient->PatientUID;
|
||||
}
|
||||
|
||||
void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare edit panel
|
||||
|
||||
@@ -43,6 +43,8 @@ private:
|
||||
|
||||
void selectPatient();
|
||||
|
||||
void setSelectedPatient(PatientInformation* aPatient);
|
||||
|
||||
void initDataModel();
|
||||
|
||||
void initDetailPanel(QHBoxLayout *contentLayout);
|
||||
|
||||
@@ -153,18 +153,18 @@ void MainWindow::initializeTabWidget()
|
||||
mTabWidget->setContentsMargins(0, 0, 0, 0);
|
||||
auto verifyForm = new ReconFormWidget(this);
|
||||
mTabWidget->insertTab(0,verifyForm, tr("Recon"));
|
||||
auto scanForm = new ScanFormWidget(this);
|
||||
mTabWidget->insertTab(0,scanForm, tr("Scan"));
|
||||
auto selectForm = new SelectFormWidget(this);
|
||||
mTabWidget->insertTab(0,selectForm, tr("Select"));
|
||||
auto scanForm = new ScanFormWidget(this);
|
||||
mTabWidget->insertTab(0,scanForm, tr("Scan"));
|
||||
|
||||
mAdminTabIndex+=3;
|
||||
mTabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
}
|
||||
|
||||
void MainWindow::reloadLanguage() {
|
||||
mTabWidget->setTabText(0, tr("Select"));
|
||||
mTabWidget->setTabText(1, tr("Scan"));
|
||||
mTabWidget->setTabText(0, tr("Scan"));
|
||||
mTabWidget->setTabText(1, tr("Select"));
|
||||
mTabWidget->setTabText(2, tr("Recon"));
|
||||
mTabWidget->setTabText(3, tr("Settings"));
|
||||
}
|
||||
@@ -181,7 +181,7 @@ void MainWindow::processShutdownDmsFailed()
|
||||
}
|
||||
|
||||
void MainWindow::switchToScanTab(QObject* sender, QObject* data) {
|
||||
if (data)mTabWidget->setCurrentIndex(1);
|
||||
if (data)mTabWidget->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
void MainWindow::centerWidgetHide()
|
||||
|
||||
Reference in New Issue
Block a user