feat: Change recon transfer path in config file.
This commit is contained in:
@@ -8,8 +8,14 @@
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include "json/cJSON.h"
|
||||
const char* strProductFileName = "./cfgs/usct-product.json";
|
||||
const char* strProductFileNameDefault = "./cfgs/usct-product";
|
||||
|
||||
namespace
|
||||
{
|
||||
const char* strProductFileName = "./cfgs/usct-product.json";
|
||||
const char* strProductFileNameDefault = "./cfgs/usct-product";
|
||||
const QString DEFAULT_RECON_TRANSFER_PATH = "/home/eq9/Tools/ReconTest/storage/Raw";
|
||||
}
|
||||
|
||||
JsonObject::JsonObject()
|
||||
{
|
||||
loadcfg();
|
||||
@@ -88,6 +94,13 @@ void JsonObject::init()
|
||||
mReconHost.localAE = QString(getJsonString("recon", "localAE"));
|
||||
mReconHost.port = QString(getJsonString("recon", "port"));
|
||||
|
||||
QString path = QString(getJsonString("recon", "transferPath"));
|
||||
mReconTransferPath = path.isEmpty() ? DEFAULT_RECON_TRANSFER_PATH : path;
|
||||
if(mReconTransferPath.back() == '/')
|
||||
{
|
||||
mReconTransferPath.chop(1);
|
||||
}
|
||||
|
||||
mMppsHost.ae = QString(getJsonString("mpps", "ae"));
|
||||
mMppsHost.ip = QString(getJsonString("mpps", "ip"));
|
||||
mMppsHost.localAE = QString(getJsonString("mpps", "localAE"));
|
||||
@@ -641,3 +654,8 @@ void JsonObject::setMppsOpen(bool aIsOpen)
|
||||
mMppsOpen = aIsOpen;
|
||||
setBool("mpps","open", aIsOpen, true);
|
||||
}
|
||||
|
||||
QString JsonObject::getReconTransferPath()
|
||||
{
|
||||
return mReconTransferPath;
|
||||
}
|
||||
|
||||
@@ -124,6 +124,8 @@ public:
|
||||
int getOperationLogExpireDays();
|
||||
int getPatientListExpireDays();
|
||||
|
||||
QString getReconTransferPath();
|
||||
|
||||
|
||||
private:
|
||||
void setJsonString(const char* catergory, const char* stringName, const char* stringValue, bool save = true);
|
||||
@@ -157,7 +159,7 @@ private:
|
||||
QString mInstitutionAddr;
|
||||
QString mInterfaceName;
|
||||
QString mGateway;
|
||||
|
||||
QString mReconTransferPath;
|
||||
|
||||
QStringList mLockScreenTimeList;
|
||||
QStringList mProtocalList;
|
||||
|
||||
Reference in New Issue
Block a user