refactor: Change struct host's property name to localAE.
This commit is contained in:
@@ -47,26 +47,26 @@
|
||||
"worklist": {
|
||||
"ae": "DCM4CHEE",
|
||||
"ip": "192.168.1.10",
|
||||
"name": "gui",
|
||||
"localAE": "gui",
|
||||
"port": "11112"
|
||||
},
|
||||
"pacs": {
|
||||
"ae": "ORTHANC",
|
||||
"ip": "192.168.1.10",
|
||||
"name": "Radiant",
|
||||
"localAE": "Radiant",
|
||||
"port": "4242"
|
||||
},
|
||||
"recon": {
|
||||
"ae": "krad",
|
||||
"ip": "192.168.1.10",
|
||||
"name": "3D recon",
|
||||
"localAE": "3D recon",
|
||||
"port": "5003"
|
||||
},
|
||||
"mpps": {
|
||||
"open": false,
|
||||
"ae": "mpps",
|
||||
"ip": "192.168.1.15",
|
||||
"name": "Mpps Server",
|
||||
"localAE": "Mpps Server",
|
||||
"port": "5002"
|
||||
},
|
||||
"address": {
|
||||
|
||||
@@ -49,7 +49,7 @@ void MppsSettingsDialog::initConfig()
|
||||
serverInfo = JsonObject::Instance()->getServer(JsonObject::MPPS);
|
||||
mSettingsArea->setServerAETitle(serverInfo.ae);
|
||||
mSettingsArea->setServerIpAddress(serverInfo.ip);
|
||||
mSettingsArea->setMyAETitle(serverInfo.name);
|
||||
mSettingsArea->setMyAETitle(serverInfo.localAE);
|
||||
mSettingsArea->setServerPort(serverInfo.port);
|
||||
mSettingsArea->setMppsMode();
|
||||
}
|
||||
@@ -101,7 +101,7 @@ bool MppsSettingsDialog::updateReferenceData()
|
||||
host serverInfo;
|
||||
serverInfo.ip = serverIp;
|
||||
serverInfo.ae = serverAETitle;
|
||||
serverInfo.name = myAETitle;
|
||||
serverInfo.localAE = myAETitle;
|
||||
serverInfo.port = serverPort;
|
||||
JsonObject::Instance()->setServer(JsonObject::MPPS, serverInfo);
|
||||
JsonObject::Instance()->setMppsOpen(mSettingsArea->getMppsIsOpen());
|
||||
|
||||
@@ -47,7 +47,7 @@ void PacsSettingsDialog::initConfig()
|
||||
serverInfo = JsonObject::Instance()->getServer(JsonObject::PACS);
|
||||
mSettingsArea->setServerAETitle(serverInfo.ae);
|
||||
mSettingsArea->setServerIpAddress(serverInfo.ip);
|
||||
mSettingsArea->setMyAETitle(serverInfo.name);
|
||||
mSettingsArea->setMyAETitle(serverInfo.localAE);
|
||||
mSettingsArea->setServerPort(serverInfo.port);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ bool PacsSettingsDialog::updateReferenceData()
|
||||
host serverInfo;
|
||||
serverInfo.ip = serverIp;
|
||||
serverInfo.ae = serverAETitle;
|
||||
serverInfo.name = myAETitle;
|
||||
serverInfo.localAE = myAETitle;
|
||||
serverInfo.port = serverPort;
|
||||
JsonObject::Instance()->setServer(JsonObject::PACS, serverInfo);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ void ReconSettingsDialog::initConfig()
|
||||
serverInfo = JsonObject::Instance()->getServer(JsonObject::RECON);
|
||||
mSettingsArea->setServerAETitle(serverInfo.ae);
|
||||
mSettingsArea->setServerIpAddress(serverInfo.ip);
|
||||
mSettingsArea->setMyAETitle(serverInfo.name);
|
||||
mSettingsArea->setMyAETitle(serverInfo.localAE);
|
||||
mSettingsArea->setServerPort(serverInfo.port);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ bool ReconSettingsDialog::updateReferenceData()
|
||||
host serverInfo;
|
||||
serverInfo.ip = serverIp;
|
||||
serverInfo.ae = serverAETitle;
|
||||
serverInfo.name = myAETitle;
|
||||
serverInfo.localAE = myAETitle;
|
||||
serverInfo.port = serverPort;
|
||||
JsonObject::Instance()->setServer(JsonObject::RECON, serverInfo);
|
||||
ReconManager::getInstance()->setReconIpAndPort(serverIp, serverPort);
|
||||
|
||||
@@ -48,7 +48,7 @@ void WorklistSettingsDialog::initConfig()
|
||||
serverInfo = JsonObject::Instance()->getServer(JsonObject::WORKLIST);
|
||||
mSettingsArea->setServerAETitle(serverInfo.ae);
|
||||
mSettingsArea->setServerIpAddress(serverInfo.ip);
|
||||
mSettingsArea->setMyAETitle(serverInfo.name);
|
||||
mSettingsArea->setMyAETitle(serverInfo.localAE);
|
||||
mSettingsArea->setServerPort(serverInfo.port);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ bool WorklistSettingsDialog::updateReferenceData()
|
||||
host serverInfo;
|
||||
serverInfo.ip = serverIp;
|
||||
serverInfo.ae = serverAETitle;
|
||||
serverInfo.name = myAETitle;
|
||||
serverInfo.localAE = myAETitle;
|
||||
serverInfo.port = serverPort;
|
||||
JsonObject::Instance()->setServer(JsonObject::WORKLIST, serverInfo);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
if(DialogManager::Default()->requestPacsSettings() == QDialog::Accepted)
|
||||
{
|
||||
auto server = JsonObject::Instance()->getServer(JsonObject::PACS);
|
||||
emit pacsSettingsSaved(server.name, server.ae, server.ip, server.port.toInt());
|
||||
emit pacsSettingsSaved(server.localAE, server.ae, server.ip, server.port.toInt());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -70,27 +70,27 @@ void JsonObject::init()
|
||||
|
||||
mWorklistHost.ae = QString(getJsonString("worklist", "ae"));
|
||||
mWorklistHost.ip = QString(getJsonString("worklist", "ip"));
|
||||
mWorklistHost.name = QString(getJsonString("worklist", "name"));
|
||||
mWorklistHost.localAE = QString(getJsonString("worklist", "localAE"));
|
||||
mWorklistHost.port = QString(getJsonString("worklist", "port"));
|
||||
|
||||
mPacsHost.ae = QString(getJsonString("pacs", "ae"));
|
||||
mPacsHost.ip = QString(getJsonString("pacs", "ip"));
|
||||
mPacsHost.name = QString(getJsonString("pacs", "name"));
|
||||
mPacsHost.localAE = QString(getJsonString("pacs", "localAE"));
|
||||
mPacsHost.port = QString(getJsonString("pacs", "port"));
|
||||
|
||||
mLocalHost.ae = QString(getJsonString("address", "ae"));
|
||||
mLocalHost.ip = QString(getJsonString("address", "ip"));
|
||||
mLocalHost.name = QString(getJsonString("address", "name"));
|
||||
mLocalHost.localAE = QString(getJsonString("address", "localAE"));
|
||||
mLocalHost.port = QString(getJsonString("address", "port"));
|
||||
|
||||
mReconHost.ae = QString(getJsonString("recon", "ae"));
|
||||
mReconHost.ip = QString(getJsonString("recon", "ip"));
|
||||
mReconHost.name = QString(getJsonString("recon", "name"));
|
||||
mReconHost.localAE = QString(getJsonString("recon", "localAE"));
|
||||
mReconHost.port = QString(getJsonString("recon", "port"));
|
||||
|
||||
mMppsHost.ae = QString(getJsonString("mpps", "ae"));
|
||||
mMppsHost.ip = QString(getJsonString("mpps", "ip"));
|
||||
mMppsHost.name = QString(getJsonString("mpps", "name"));
|
||||
mMppsHost.localAE = QString(getJsonString("mpps", "localAE"));
|
||||
mMppsHost.port = QString(getJsonString("mpps", "port"));
|
||||
mMppsOpen = getBool("mpps","open");
|
||||
|
||||
@@ -447,7 +447,7 @@ void JsonObject::setServer(ServerType type, const host& list)
|
||||
}
|
||||
setJsonString(typeName.toStdString().c_str(), "ae", list.ae.toStdString().c_str(), false);
|
||||
setJsonString(typeName.toStdString().c_str(), "ip", list.ip.toStdString().c_str(), false);
|
||||
setJsonString(typeName.toStdString().c_str(), "name", list.name.toStdString().c_str(), false);
|
||||
setJsonString(typeName.toStdString().c_str(), "localAE", list.localAE.toStdString().c_str(), false);
|
||||
setJsonString(typeName.toStdString().c_str(), "port", list.port.toStdString().c_str(), false);
|
||||
|
||||
savecfg();
|
||||
|
||||
@@ -8,7 +8,7 @@ class QTranslator;
|
||||
|
||||
#include <QString>
|
||||
struct host {
|
||||
QString name;
|
||||
QString localAE;
|
||||
QString ae;
|
||||
QString ip;
|
||||
QString port;
|
||||
|
||||
@@ -48,21 +48,21 @@ void DicomCfgDialog::loadServersInfo()
|
||||
mUi->recon_AE->setText(serverInfo.ae);
|
||||
mUi->recon_IP->setText(serverInfo.ip);
|
||||
mUi->recon_IP->setValidator(validator);
|
||||
mUi->recon_Name->setText(serverInfo.name);
|
||||
mUi->recon_Name->setText(serverInfo.localAE);
|
||||
mUi->recon_Port->setText(serverInfo.port);
|
||||
|
||||
serverInfo = JsonObject::Instance()->getServer(JsonObject::PACS);
|
||||
mUi->pacs_AE->setText(serverInfo.ae);
|
||||
mUi->pacs_IP->setText(serverInfo.ip);
|
||||
mUi->pacs_IP->setValidator(validator);
|
||||
mUi->pacs_Name->setText(serverInfo.name);
|
||||
mUi->pacs_Name->setText(serverInfo.localAE);
|
||||
mUi->pacs_Port->setText(serverInfo.port);
|
||||
|
||||
serverInfo = JsonObject::Instance()->getServer(JsonObject::WORKLIST);
|
||||
mUi->wl_AE->setText(serverInfo.ae);
|
||||
mUi->wl_IP->setText(serverInfo.ip);
|
||||
mUi->wl_IP->setValidator(validator);
|
||||
mUi->wl_Name->setText(serverInfo.name);
|
||||
mUi->wl_Name->setText(serverInfo.localAE);
|
||||
mUi->wl_Port->setText(serverInfo.port);
|
||||
}
|
||||
|
||||
@@ -72,19 +72,19 @@ void DicomCfgDialog::saveServersInfo()
|
||||
host serverInfo;
|
||||
serverInfo.ae = mUi->recon_AE->text();
|
||||
serverInfo.ip = mUi->recon_IP->text();
|
||||
serverInfo.name = mUi->recon_Name->text();
|
||||
serverInfo.localAE = mUi->recon_Name->text();
|
||||
serverInfo.port = mUi->recon_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::RECON, serverInfo);
|
||||
|
||||
serverInfo.ae = mUi->pacs_AE->text();
|
||||
serverInfo.ip = mUi->pacs_IP->text();
|
||||
serverInfo.name = mUi->pacs_Name->text();
|
||||
serverInfo.localAE = mUi->pacs_Name->text();
|
||||
serverInfo.port = mUi->pacs_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::PACS, serverInfo);
|
||||
|
||||
serverInfo.ip = mUi->wl_IP->text();
|
||||
serverInfo.ae = mUi->wl_AE->text();
|
||||
serverInfo.name = mUi->wl_Name->text();
|
||||
serverInfo.localAE = mUi->wl_Name->text();
|
||||
serverInfo.port = mUi->wl_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::WORKLIST, serverInfo);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ bool NetworkCfgDialog::isJsonModified()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (mUi->daq_Name->text() != hostInfo.name)
|
||||
if (mUi->daq_Name->text() != hostInfo.localAE)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void NetworkCfgDialog::loadJsonData()
|
||||
const host& hostInfo = NetworkManager::getLocalHost();
|
||||
mUi->daq_AE->setText(hostInfo.ae);
|
||||
mUi->daq_IP->setText(hostInfo.ip);
|
||||
mUi->daq_Name->setText(hostInfo.name);
|
||||
mUi->daq_Name->setText(hostInfo.localAE);
|
||||
mUi->daq_Port->setText(hostInfo.port);
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ void NetworkCfgDialog::saveJsonData()
|
||||
host hostInfo;
|
||||
hostInfo.ip = mUi->daq_IP->text();
|
||||
hostInfo.ae = mUi->daq_AE->text();
|
||||
hostInfo.name = mUi->daq_Name->text();
|
||||
hostInfo.localAE = mUi->daq_Name->text();
|
||||
hostInfo.port = mUi->daq_Port->text();
|
||||
NetworkManager::setLocalHost(hostInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user