Commit dea6e449 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement save settings

parent bf88dd45
Pipeline #35344 failed with stage
in 73 minutes and 15 seconds
...@@ -30,7 +30,7 @@ FolderConfigureSettingsDialog::FolderConfigureSettingsDialog(QWidget *parent) ...@@ -30,7 +30,7 @@ FolderConfigureSettingsDialog::FolderConfigureSettingsDialog(QWidget *parent)
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok, this); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel|QDialogButtonBox::Ok, this);
buttonBox->setObjectName(QStringLiteral("buttonbox")); buttonBox->setObjectName(QStringLiteral("buttonbox"));
connect(buttonBox, &QDialogButtonBox::rejected, this, &FolderConfigureSettingsDialog::reject); connect(buttonBox, &QDialogButtonBox::rejected, this, &FolderConfigureSettingsDialog::reject);
connect(buttonBox, &QDialogButtonBox::accepted, this, &FolderConfigureSettingsDialog::accept); connect(buttonBox, &QDialogButtonBox::accepted, this, &FolderConfigureSettingsDialog::slotSave);
mainLayout->addWidget(buttonBox); mainLayout->addWidget(buttonBox);
readConfig(); readConfig();
} }
...@@ -40,6 +40,12 @@ FolderConfigureSettingsDialog::~FolderConfigureSettingsDialog() ...@@ -40,6 +40,12 @@ FolderConfigureSettingsDialog::~FolderConfigureSettingsDialog()
writeConfig(); writeConfig();
} }
void FolderConfigureSettingsDialog::slotSave()
{
mFolderConfigureSettingsWidget->save();
accept();
}
void FolderConfigureSettingsDialog::readConfig() void FolderConfigureSettingsDialog::readConfig()
{ {
KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName); KConfigGroup grp(KSharedConfig::openConfig(), myConfigGroupName);
......
...@@ -18,6 +18,7 @@ public: ...@@ -18,6 +18,7 @@ public:
~FolderConfigureSettingsDialog(); ~FolderConfigureSettingsDialog();
private: private:
void slotSave();
void readConfig(); void readConfig();
void writeConfig(); void writeConfig();
FolderConfigureSettingsWidget *mFolderConfigureSettingsWidget = nullptr; FolderConfigureSettingsWidget *mFolderConfigureSettingsWidget = nullptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment