feat: Add UserOperationLog : Ip Settings, Mpps Settings, Worklist Settings, Recon Settings, Pacs Settings, Rest Password, Add Account, Set Lock Screen, Set Anonymousmode, Set Screen Saver, Set Default Protocol,

This commit is contained in:
sunwen
2024-06-11 15:21:00 +08:00
parent 1e4af17daf
commit 26a6e86cc9
7 changed files with 29 additions and 11 deletions

View File

@@ -71,6 +71,7 @@ void AccountFormDialog::resetUserPassword()
{
if (DialogManager::Default()->requestAlertMessage(tr("Reset to default password?"),DialogButtonMode::OkAndCancel) == Accepted)
{
LOG_USER_OPERATION("Password Reset, ID:" + mLeUserCode->text());
User user;
if (!User::getUser(mUserID, user))
{
@@ -311,6 +312,7 @@ bool AccountFormDialog::updateReferenceData()
if (mRefModel->submit())
{
hideWarn();
LOG_USER_OPERATION("Add Account, ID:" + mLeUserName->text());
return true;
}
else

View File

@@ -5,6 +5,7 @@
#include "utilities/InputFormatValidator.h"
#include "device/networkmanager.h"
#include "DialogManager.h"
#include "log/UserOperationLog.h"
#include <QLabel>
#include <QVBoxLayout>
@@ -93,6 +94,7 @@ bool IpSettingsDialog::updateReferenceData()
connect(mThread, &QThread::started, this, &IpSettingsDialog::handleThreadStart);
connect(mThread, &QThread::finished, this, &IpSettingsDialog::handleThreadExit);
mThread->start();
LOG_USER_OPERATION("Set Ip Settings");
return false;
}

View File

@@ -3,6 +3,7 @@
#include "components/ULineEdit.h"
#include "dialogs/DicomSettingsArea.h"
#include "json/jsonobject.h"
#include "log/UserOperationLog.h"
#include <QVBoxLayout>
#include <QLabel>
@@ -105,7 +106,7 @@ bool MppsSettingsDialog::updateReferenceData()
serverInfo.port = serverPort;
JsonObject::Instance()->setServer(JsonObject::MPPS, serverInfo);
JsonObject::Instance()->setMppsOpen(mSettingsArea->getMppsIsOpen());
LOG_USER_OPERATION("Set MPPS Settings");
return true;
}

View File

@@ -1,6 +1,7 @@
#include "PacsSettingsDialog.h"
#include "dialogs/DicomSettingsArea.h"
#include "json/jsonobject.h"
#include "log/UserOperationLog.h"
#include <QVBoxLayout>
#include <QLabel>
@@ -101,6 +102,6 @@ bool PacsSettingsDialog::updateReferenceData()
serverInfo.localAE = myAETitle;
serverInfo.port = serverPort;
JsonObject::Instance()->setServer(JsonObject::PACS, serverInfo);
LOG_USER_OPERATION("Set PACS Settings");
return true;
}

View File

@@ -3,6 +3,7 @@
#include "dialogs/DicomSettingsArea.h"
#include "json/jsonobject.h"
#include "recon/ReconManager.h"
#include "log/UserOperationLog.h"
#include <QVBoxLayout>
#include <QLabel>
@@ -105,6 +106,6 @@ bool ReconSettingsDialog::updateReferenceData()
JsonObject::Instance()->setServer(JsonObject::RECON, serverInfo);
ReconManager::getInstance()->setReconIpAndPort(serverIp, serverPort);
QMetaObject::invokeMethod(ReconManager::getInstance(), "checkReconConnection", Qt::QueuedConnection);
LOG_USER_OPERATION("Set Recon Settings");
return true;
}

View File

@@ -2,6 +2,7 @@
#include "components/ULineEdit.h"
#include "dialogs/DicomSettingsArea.h"
#include "json/jsonobject.h"
#include "log/UserOperationLog.h"
#include <QVBoxLayout>
#include <QLabel>
@@ -102,6 +103,6 @@ bool WorklistSettingsDialog::updateReferenceData()
serverInfo.localAE = myAETitle;
serverInfo.port = serverPort;
JsonObject::Instance()->setServer(JsonObject::WORKLIST, serverInfo);
LOG_USER_OPERATION("Set Worklist Settings");
return true;
}

View File

@@ -180,7 +180,7 @@ GeneralForm::GeneralForm(QWidget* aParent)
QString lockTimeStr = result.ResultData.toString();
lockTime->setText(lockTimeStr);
GetLockScreenTimeHelper::setLockScreenTime(lockTimeStr);
LOG_USER_OPERATION(QString("Set Lock Screen, Time:%1").arg(lockTimeStr));
});
connect(btnLan, &QPushButton::clicked, [=]()
@@ -215,13 +215,19 @@ GeneralForm::GeneralForm(QWidget* aParent)
updateStorageUsed();
});
connect(anonyButton, &ImageSwitch::clicked, [=]() {
JsonObject::Instance()->setAnonymousMode(anonyButton->getChecked());
connect(anonyButton, &ImageSwitch::clicked, [=]()
{
bool isOpen = anonyButton->getChecked();
JsonObject::Instance()->setAnonymousMode(isOpen);
EventCenter::Default()->triggerEvent(AnonymousModeChanged,this,nullptr);
LOG_USER_OPERATION((isOpen ? QString("Open") : QString("Close")) + " AnonymousMode");
});
connect(screenSaverButton, &ImageSwitch::clicked, [=]() {
JsonObject::Instance()->setScreenSaverMode(screenSaverButton->getChecked());
connect(screenSaverButton, &ImageSwitch::clicked, [=]()
{
bool isOpen = screenSaverButton->getChecked();
JsonObject::Instance()->setScreenSaverMode(isOpen);
LOG_USER_OPERATION((isOpen ? QString("Open") : QString("Close")) + " Screen Saver");
});
connect(scanProtocolButton, &QPushButton::clicked, [=]()
@@ -232,13 +238,17 @@ GeneralForm::GeneralForm(QWidget* aParent)
QString pro = result.ResultData.toString();
//take effect
GetProtocalHelper::setProtocal(pro);
scanProtocolButton->setText(GetProtocalHelper::getProtocalStr());
QString protocal = GetProtocalHelper::getProtocalStr();
scanProtocolButton->setText(protocal);
LOG_USER_OPERATION(QString("Set Default Protocol:%1").arg(protocal));
}
});
connect(scanCompleteButton, &ImageSwitch::clicked, [=]()
{
JsonObject::Instance()->setCompleteNotify(scanCompleteButton->getChecked());
bool isOpen = scanCompleteButton->getChecked();
JsonObject::Instance()->setCompleteNotify(isOpen);
LOG_USER_OPERATION((isOpen ? QString("Open") : QString("Close")) + " Complete Notify");
});
}