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