Add Anonymous mode
This commit is contained in:
@@ -24,11 +24,23 @@ PatientInformationForm::~PatientInformationForm()
|
||||
}
|
||||
|
||||
void PatientInformationForm::setPatientInformation(PatientInformation* information) {
|
||||
mUI->lbl_ID->setText(information->ID);
|
||||
mUI->lbl_Date->setText(information->BirthDate);
|
||||
mUI->lbl_Name->setText(information->Name);
|
||||
mUI->lbl_Sex->setText(information->Sex);
|
||||
mUI->lbl_Acc->setText(information->AccessionNumber);
|
||||
if(information){
|
||||
mUI->lbl_ID->setText(information->ID);
|
||||
mUI->lbl_Date->setText(information->BirthDate);
|
||||
mUI->lbl_Name->setText(information->Name);
|
||||
mUI->lbl_Sex->setText(information->Sex);
|
||||
mUI->lbl_Acc->setText(information->AccessionNumber);
|
||||
}
|
||||
else{
|
||||
mUI->lbl_ID->clear();
|
||||
mUI->lbl_Date->clear();
|
||||
mUI->lbl_Name->clear();
|
||||
mUI->lbl_Sex->clear();
|
||||
mUI->lbl_Acc->clear();
|
||||
}
|
||||
if (mInfo){
|
||||
mInfo->deleteLater();
|
||||
}
|
||||
mInfo = information;
|
||||
}
|
||||
|
||||
|
||||
@@ -295,13 +295,18 @@ void ScanFormWidget::renderPreviewData(const QObject* /*sender*/,const QObject *
|
||||
|
||||
void ScanFormWidget::initEvents() {//Events---------------------------------------------------------------
|
||||
connect(EventCenter::Default(), &EventCenter::PatientSelected, [=](QObject* sender, QObject* data) {
|
||||
if (mUnInited)
|
||||
if (data)
|
||||
{
|
||||
mBtnScan->setEnabled(true);
|
||||
mBtnRefresh->setEnabled(true);
|
||||
mBtnPreview->setEnabled(true);
|
||||
mBtnStop->setEnabled(true);
|
||||
mUnInited = false;
|
||||
}
|
||||
else{
|
||||
mBtnScan->setEnabled(false);
|
||||
mBtnRefresh->setEnabled(false);
|
||||
mBtnPreview->setEnabled(false);
|
||||
mBtnStop->setEnabled(false);
|
||||
}
|
||||
mPatInf->setPatientInformation((PatientInformation*)data);
|
||||
});
|
||||
@@ -310,9 +315,6 @@ void ScanFormWidget::initEvents() {//Events-------------------------------------
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::ResponsePreview, this,&ScanFormWidget::renderLoading);
|
||||
connect(EventCenter::Default(), &EventCenter::ResponsePreviewData, this,&ScanFormWidget::renderPreviewData);
|
||||
connect(EventCenter::Default(), &EventCenter::PatientSelected, [=](QObject* sender, QObject* data) {
|
||||
mPatInf->setPatientInformation((PatientInformation*)data);
|
||||
});
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this, &ScanFormWidget::reloadLanguage);
|
||||
connect(EventCenter::Default(), &EventCenter::DeviceErrorRaise, [=](QObject* parent, QObject* msg){
|
||||
printf("signal:%d\r\n",senderSignalIndex());
|
||||
|
||||
Reference in New Issue
Block a user