User operation log, v1

This commit is contained in:
Krad
2021-11-19 15:36:12 +08:00
parent bca10e3e60
commit 99754ab84f
9 changed files with 144 additions and 44 deletions

View File

@@ -14,6 +14,7 @@
#include <QImage>
#include <QPainter>
#include <qdebug.h>
#include <src/log/UserOperationLog.h>
#ifdef WIN32
#else
@@ -209,21 +210,21 @@ ScanFormWidget::ScanFormWidget(QWidget *parent) : TabFormWidget(parent) {
patient_information->setPatientInformation((PatientInformation*)data);
});
connect(btnRefresh,&QToolButton::clicked,[=](){
qDebug()<<"Get patient Json string start!";
QString patientInf(patient_information->getCurrentPatientJsonString(false));
qDebug()<<"Get patient Json string end! string:"<<patientInf;
LOG_USER_OPERATION(StartRefresh);
EventCenter::Default()->triggerEvent(GUIEvents::RequestEmptyScan, nullptr, (QObject*)(&patientInf));
});
connect(btnPreview,&QToolButton::clicked,[=](){
LOG_USER_OPERATION(StartPreview);
EventCenter::Default()->triggerEvent(GUIEvents::RequestPreviewScan, nullptr, nullptr);
});
connect(btnScan,&QToolButton::clicked,[=](){
qDebug()<<"Get patient Json string start!";
QString patientInf(patient_information->getCurrentPatientJsonString(false));
qDebug()<<"Get patient Json string end! string:"<<patientInf;
LOG_USER_OPERATION(StartScan);
EventCenter::Default()->triggerEvent(GUIEvents::RequestPatientScan, nullptr, (QObject*)(&patientInf));
});
connect(btnStop,&QToolButton::clicked,[=](){
LOG_USER_OPERATION(Stop);
EventCenter::Default()->triggerEvent(GUIEvents::RequestStop, nullptr, nullptr);
});