feat: Change recon transfer path in config file.
This commit is contained in:
@@ -37,7 +37,8 @@
|
|||||||
"ae": "",
|
"ae": "",
|
||||||
"ip": "",
|
"ip": "",
|
||||||
"name": "",
|
"name": "",
|
||||||
"port": ""
|
"port": "",
|
||||||
|
"transferPath": ""
|
||||||
},
|
},
|
||||||
"address": {
|
"address": {
|
||||||
"device": "eth0",
|
"device": "eth0",
|
||||||
|
|||||||
@@ -60,7 +60,8 @@
|
|||||||
"ae": "krad",
|
"ae": "krad",
|
||||||
"ip": "192.168.1.10",
|
"ip": "192.168.1.10",
|
||||||
"localAE": "3D recon",
|
"localAE": "3D recon",
|
||||||
"port": "5003"
|
"port": "5003",
|
||||||
|
"transferPath": "/home/eq9/Tools/ReconTest/storage/Raw"
|
||||||
},
|
},
|
||||||
"mpps": {
|
"mpps": {
|
||||||
"open": false,
|
"open": false,
|
||||||
@@ -115,4 +116,4 @@
|
|||||||
"patientlist": {
|
"patientlist": {
|
||||||
"expire": "7"
|
"expire": "7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,14 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "json/cJSON.h"
|
#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()
|
JsonObject::JsonObject()
|
||||||
{
|
{
|
||||||
loadcfg();
|
loadcfg();
|
||||||
@@ -88,6 +94,13 @@ void JsonObject::init()
|
|||||||
mReconHost.localAE = QString(getJsonString("recon", "localAE"));
|
mReconHost.localAE = QString(getJsonString("recon", "localAE"));
|
||||||
mReconHost.port = QString(getJsonString("recon", "port"));
|
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.ae = QString(getJsonString("mpps", "ae"));
|
||||||
mMppsHost.ip = QString(getJsonString("mpps", "ip"));
|
mMppsHost.ip = QString(getJsonString("mpps", "ip"));
|
||||||
mMppsHost.localAE = QString(getJsonString("mpps", "localAE"));
|
mMppsHost.localAE = QString(getJsonString("mpps", "localAE"));
|
||||||
@@ -641,3 +654,8 @@ void JsonObject::setMppsOpen(bool aIsOpen)
|
|||||||
mMppsOpen = aIsOpen;
|
mMppsOpen = aIsOpen;
|
||||||
setBool("mpps","open", aIsOpen, true);
|
setBool("mpps","open", aIsOpen, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString JsonObject::getReconTransferPath()
|
||||||
|
{
|
||||||
|
return mReconTransferPath;
|
||||||
|
}
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ public:
|
|||||||
int getOperationLogExpireDays();
|
int getOperationLogExpireDays();
|
||||||
int getPatientListExpireDays();
|
int getPatientListExpireDays();
|
||||||
|
|
||||||
|
QString getReconTransferPath();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setJsonString(const char* catergory, const char* stringName, const char* stringValue, bool save = true);
|
void setJsonString(const char* catergory, const char* stringName, const char* stringValue, bool save = true);
|
||||||
@@ -157,7 +159,7 @@ private:
|
|||||||
QString mInstitutionAddr;
|
QString mInstitutionAddr;
|
||||||
QString mInterfaceName;
|
QString mInterfaceName;
|
||||||
QString mGateway;
|
QString mGateway;
|
||||||
|
QString mReconTransferPath;
|
||||||
|
|
||||||
QStringList mLockScreenTimeList;
|
QStringList mLockScreenTimeList;
|
||||||
QStringList mProtocalList;
|
QStringList mProtocalList;
|
||||||
|
|||||||
Reference in New Issue
Block a user