|
|
|
@ -1,10 +1,11 @@
|
|
|
|
|
#include "ethernetsettings.h"
|
|
|
|
|
#include "ui_genericsettings.h"
|
|
|
|
|
|
|
|
|
|
EthernetSettings::EthernetSettings(QString title, QWidget *parent) :
|
|
|
|
|
EthernetSettings::EthernetSettings(QString title, QString connUuidStr, QWidget *parent) :
|
|
|
|
|
QDialog(parent),
|
|
|
|
|
ui(new Ui::GenericSettings)
|
|
|
|
|
{
|
|
|
|
|
targetConnUuidStr = connUuidStr;
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
this->setWindowTitle(title);
|
|
|
|
|
ui->connectionNameLineEdit->setText(title);
|
|
|
|
@ -12,6 +13,10 @@ EthernetSettings::EthernetSettings(QString title, QWidget *parent) :
|
|
|
|
|
ethernetSettingsTab = new EthernetSettingsTab();
|
|
|
|
|
ui->tabWidget->addTab(generalSettingsTab, "General");
|
|
|
|
|
ui->tabWidget->addTab(ethernetSettingsTab, "Ethernet");
|
|
|
|
|
QVariantMap connSettings = ConnectionSettingsEngine::readConnectionSettings(connUuidStr);
|
|
|
|
|
generalSettingsTab->loadSettings(connSettings);
|
|
|
|
|
connect(ui->cancelButton, &QPushButton::clicked, this, &EthernetSettings::onCancelButtonClicked);
|
|
|
|
|
connect(ui->saveButton, &QPushButton::clicked, this, &EthernetSettings::onSaveButtonClicked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EthernetSettings::~EthernetSettings()
|
|
|
|
@ -20,3 +25,15 @@ EthernetSettings::~EthernetSettings()
|
|
|
|
|
delete generalSettingsTab;
|
|
|
|
|
delete ethernetSettingsTab;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EthernetSettings::onCancelButtonClicked()
|
|
|
|
|
{
|
|
|
|
|
this->done(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void EthernetSettings::onSaveButtonClicked()
|
|
|
|
|
{
|
|
|
|
|
QVariantMap settings = generalSettingsTab->readSettings();
|
|
|
|
|
ConnectionSettingsEngine::modifyConnectionSettings(targetConnUuidStr, settings);
|
|
|
|
|
this->done(0);
|
|
|
|
|
}
|
|
|
|
|