feat: Change Mpps settings in new recon interface.
This commit is contained in:
@@ -95,12 +95,16 @@ void DicomSettingsArea::setMppsMode()
|
||||
if(isMppsOpen)
|
||||
{
|
||||
mMppsOpen->setChecked(true);
|
||||
setEnable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
setEnable(false);
|
||||
}
|
||||
connect(mMppsOpen, &ImageSwitch::clicked, [this]()
|
||||
{
|
||||
bool isMppsOpen = mMppsOpen->getChecked();
|
||||
setEnable(!isMppsOpen);
|
||||
setEnable(isMppsOpen);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,11 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
|
||||
connect(mUI->mMppsButton, &QToolButton::clicked, [&]()
|
||||
{
|
||||
DialogManager::Default()->requestMppsSettings();
|
||||
if(DialogManager::Default()->requestMppsSettings() == QDialog::Accepted)
|
||||
{
|
||||
auto server = JsonObject::Instance()->getServer(JsonObject::MPPS);
|
||||
emit mppsSettingsSaved(JsonObject::Instance()->getMppsOpen(), server.ae, server.ip, server.port.toInt());
|
||||
}
|
||||
});
|
||||
|
||||
// connect(mUI->btnDICOM, &QToolButton::clicked, [&]() {
|
||||
@@ -102,8 +106,9 @@ SystemSettingForm::SystemSettingForm(QWidget* parent)
|
||||
// });
|
||||
|
||||
connect(ReconManager::getInstance(), &ReconManager::setPacsSettingsResponsed, this, &SystemSettingForm::processPacsSettingsResponsed);
|
||||
connect(ReconManager::getInstance(), &ReconManager::setMppsSettingsResponsed, this, &SystemSettingForm::processPacsSettingsResponsed);
|
||||
connect(this, &SystemSettingForm::pacsSettingsSaved, ReconManager::getInstance(), &ReconManager::setPacsSettings, Qt::QueuedConnection);
|
||||
|
||||
connect(this, &SystemSettingForm::mppsSettingsSaved, ReconManager::getInstance(), &ReconManager::setMppsSettings, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
SystemSettingForm::~SystemSettingForm()
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
|
||||
signals:
|
||||
void pacsSettingsSaved(const QString& aClientAETitle, const QString& aServerAETitle, const QString& aServerIP, int aServerPort);
|
||||
void mppsSettingsSaved(bool aIsOpen, const QString& aServerAETitle, const QString& aServerIP, int aServerPort);
|
||||
|
||||
private slots:
|
||||
void processPacsSettingsResponsed(bool aResult, const QVariant& aMessage);
|
||||
|
||||
@@ -135,6 +135,21 @@ void ReconManager::setPacsSettings(const QString& aClientAETitle, const QString&
|
||||
emit setPacsSettingsResponsed(true, QVariant::fromValue(QString("Set PACS settings succeed.")));
|
||||
}
|
||||
|
||||
void ReconManager::setMppsSettings(bool aIsOpen, const QString& aServerAETitle, const QString& aServerIP, int aServerPort)
|
||||
{
|
||||
MPPSSetting settings = {aIsOpen ? 1 : 0, aServerAETitle.toStdString(), aServerIP.toStdString(), aServerPort};
|
||||
auto response = mReconClient->SetMPPSSetting(settings);
|
||||
if(response.bad())
|
||||
{
|
||||
QString msg = QString("Set MPPS settings failed : ") + response.error().data();
|
||||
qDebug()<< msg;
|
||||
emit setMppsSettingsResponsed(false, QVariant::fromValue(msg));
|
||||
return;
|
||||
}
|
||||
|
||||
emit setMppsSettingsResponsed(true, QVariant::fromValue(QString("Set MPPS settings succeed.")));
|
||||
}
|
||||
|
||||
void ReconManager::getReconVersion()
|
||||
{
|
||||
auto result = mReconClient->QueryVersion();
|
||||
|
||||
@@ -23,6 +23,7 @@ public slots:
|
||||
void createScan(const QString& aScanID, const QString& aStudyUID,const QString& aMPPSUID, const QString& aReferenceID, const QString& aPath);
|
||||
void queryReconStatus(const QStringList& aScanIDs);
|
||||
void setPacsSettings(const QString& aClientAETitle, const QString& aServerAETitle, const QString& aServerIP, int aServerPort);
|
||||
void setMppsSettings(bool aIsOpen, const QString& aServerAETitle, const QString& aServerIP, int aServerPort);
|
||||
void checkReconConnection();
|
||||
void getReconVersion();
|
||||
|
||||
@@ -35,6 +36,7 @@ signals:
|
||||
void createScanResponsed(bool aResult, const QString& aScanID, const QString& aMessage = "");
|
||||
void queryReconStateResponsed(bool aResult, const QVariant& aData);
|
||||
void setPacsSettingsResponsed(bool aResult, const QVariant& aMessage);
|
||||
void setMppsSettingsResponsed(bool aResult, const QVariant& aMessage);
|
||||
void checkReconConnectionResponsed(bool aResult);
|
||||
void getReconVersionResponsed(const QString& aResult);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user