feat: Add DICOM connection test(CEcho) function to MppsSettingsDialog
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
#include "dialogs/DicomSettingsArea.h"
|
||||
#include "json/jsonobject.h"
|
||||
#include "log/LogManager.h"
|
||||
#include "DialogManager.h"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace
|
||||
@@ -18,6 +20,7 @@ MppsSettingsDialog::MppsSettingsDialog(QWidget* aParent, Qt::WindowFlags aWindow
|
||||
, mSettingsArea(new DicomSettingsArea(this))
|
||||
, mErrorText(new ErrorLabel(this))
|
||||
{
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
QVBoxLayout* layout = new QVBoxLayout(mFormWidget);
|
||||
layout->setSpacing(10);
|
||||
//Title
|
||||
@@ -28,6 +31,10 @@ MppsSettingsDialog::MppsSettingsDialog(QWidget* aParent, Qt::WindowFlags aWindow
|
||||
layout->addWidget(title);
|
||||
layout->addWidget(mSettingsArea);
|
||||
|
||||
QPushButton * cEchoBtn = new QPushButton(this);
|
||||
cEchoBtn->setObjectName("cechoButton");
|
||||
cEchoBtn->setText(tr("Test Connection"));
|
||||
layout->addWidget(cEchoBtn,Qt::AlignHCenter);
|
||||
QLabel* endline = new QLabel(this);
|
||||
endline->setFixedHeight(ENDLINE_SPACE);
|
||||
endline->setObjectName("endline");
|
||||
@@ -36,6 +43,26 @@ MppsSettingsDialog::MppsSettingsDialog(QWidget* aParent, Qt::WindowFlags aWindow
|
||||
mErrorText->hide();
|
||||
|
||||
initConfig();
|
||||
|
||||
connect(cEchoBtn, &QPushButton::clicked, [=](){
|
||||
QList<CEchoSetting> list;
|
||||
CEchoSetting setting;
|
||||
setting.AETitle = mSettingsArea->getMyAETitle().toStdString();
|
||||
setting.IP = mSettingsArea->getServerIpAddress().toStdString();
|
||||
setting.Port = mSettingsArea->getServerPort().toInt();
|
||||
setting.ServerTitle = mSettingsArea->getServerAETitle().toStdString();
|
||||
setting.Type = 0;
|
||||
list.append(setting);
|
||||
CEchoSetting remoteSetting;
|
||||
remoteSetting.IP = mSettingsArea->getServerIpAddress().toStdString();
|
||||
remoteSetting.Port = mSettingsArea->getServerPort().toInt();
|
||||
remoteSetting.ServerTitle = mSettingsArea->getServerAETitle().toStdString();
|
||||
remoteSetting.Type = 1;
|
||||
list.append(remoteSetting);
|
||||
|
||||
DialogManager::Default()->requestCEchoTest(list);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
MppsSettingsDialog::~MppsSettingsDialog()
|
||||
|
||||
Reference in New Issue
Block a user