From efd9268255c261066332198ef8ed36fd2dc27d47 Mon Sep 17 00:00:00 2001 From: Krad Date: Tue, 12 Oct 2021 17:40:23 +0800 Subject: [PATCH] Add a copy function to PatientInformationForm, and make it become a subclass of QObject --- src/editpatientform.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/editpatientform.h b/src/editpatientform.h index 723cca1..3873de3 100644 --- a/src/editpatientform.h +++ b/src/editpatientform.h @@ -27,11 +27,23 @@ enum PatientInformationEnum{ #undef ADD_PATIENT_PROPERTY }; -class PatientInformation{ +class PatientInformation:public QObject{ +Q_OBJECT public: #define ADD_PATIENT_PROPERTY(val) QString val; EDIT_PATIENT(); #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;