Refactory ScanFormWidget.
This commit is contained in:
@@ -26,6 +26,7 @@ enum PatientInformationEnum{
|
||||
* @brief this class was designed to be a edit form,
|
||||
* but now has been change to a detail display class.
|
||||
*/
|
||||
|
||||
class PatientInformation:public QObject{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -47,9 +48,9 @@ public:
|
||||
this->AddDate = other.AddDate;
|
||||
}
|
||||
QString ScheduledStartDate;
|
||||
PatientInformation* Copy()
|
||||
QSharedPointer<PatientInformation> Copy()
|
||||
{
|
||||
PatientInformation* n=new PatientInformation;
|
||||
QSharedPointer<PatientInformation> n= QSharedPointer<PatientInformation>(new PatientInformation);
|
||||
n->PatientUID = this->PatientUID;
|
||||
n->ID = this->ID;
|
||||
n->Name = this->Name;
|
||||
@@ -61,5 +62,7 @@ public:
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
typedef QSharedPointer<PatientInformation> PatientInformationPointer;
|
||||
|
||||
#endif //GUI_PATIENTINFORMATION_H
|
||||
|
||||
@@ -175,7 +175,7 @@ void SelectFormWidget::delPatient() {
|
||||
}
|
||||
|
||||
void SelectFormWidget::selectPatient() {
|
||||
EventCenter::Default()->triggerEvent(PatientSelected, nullptr, patientDetailForm->getPatientInformation()->Copy());
|
||||
EventCenter::Default()->triggerEvent(PatientSelected, nullptr, (QObject*)patientDetailForm->getPatientInformation());
|
||||
selectedPatientUID = patientDetailForm->getPatientInformation()->PatientUID;
|
||||
LOG_USER_OPERATION(QString("Select Patient, ID: %1").arg(patientDetailForm->getPatientInformation()->ID))
|
||||
}
|
||||
@@ -255,7 +255,7 @@ void SelectFormWidget::initDataModel() {
|
||||
mModel->setData(mModel->index(0,7),"");
|
||||
}
|
||||
|
||||
mModel->setHeaderData(1, Qt::Horizontal, "ID");
|
||||
mModel->setHeaderData(1, Qt::Horizontal, tr("ID"));
|
||||
mModel->setHeaderData(2, Qt::Horizontal, tr("AccessionNumber"));
|
||||
mModel->setHeaderData(3, Qt::Horizontal, tr("Name"));
|
||||
mModel->setHeaderData(4, Qt::Horizontal, tr("Birth Date"));
|
||||
|
||||
Reference in New Issue
Block a user