Add a copy function to PatientInformationForm, and make it become a subclass of QObject

This commit is contained in:
Krad
2021-10-12 17:40:23 +08:00
parent 6f9a3d4f46
commit efd9268255

View File

@@ -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;