Add a copy function to PatientInformationForm, and make it become a subclass of QObject
This commit is contained in:
@@ -27,11 +27,23 @@ enum PatientInformationEnum{
|
|||||||
#undef ADD_PATIENT_PROPERTY
|
#undef ADD_PATIENT_PROPERTY
|
||||||
};
|
};
|
||||||
|
|
||||||
class PatientInformation{
|
class PatientInformation:public QObject{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
#define ADD_PATIENT_PROPERTY(val) QString val;
|
#define ADD_PATIENT_PROPERTY(val) QString val;
|
||||||
EDIT_PATIENT();
|
EDIT_PATIENT();
|
||||||
#undef ADD_PATIENT_PROPERTY
|
#undef ADD_PATIENT_PROPERTY
|
||||||
|
PatientInformation* Copy()
|
||||||
|
{
|
||||||
|
PatientInformation* n=new PatientInformation;
|
||||||
|
n->PatientUID = this->PatientUID;
|
||||||
|
n->ID = this->ID;
|
||||||
|
n->Name = this->Name;
|
||||||
|
n->BirthDate = this->BirthDate;
|
||||||
|
n->Sex = this->Sex;
|
||||||
|
n->Comment = this->Comment;
|
||||||
|
return n;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
|
|||||||
Reference in New Issue
Block a user