Hook KConfigXT to the main window
This commit is contained in:
parent
39e3a76e4b
commit
9620581a2f
1 changed files with 12 additions and 1 deletions
|
@ -32,12 +32,14 @@
|
||||||
#include <KStandardAction>
|
#include <KStandardAction>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KDeclarative/KDeclarative>
|
#include <KDeclarative/KDeclarative>
|
||||||
|
#include <KConfigDialog>
|
||||||
|
|
||||||
#include "libdanbooru/danbooruservice.h"
|
#include "libdanbooru/danbooruservice.h"
|
||||||
#include "libdanbooru/danboorupost.h"
|
#include "libdanbooru/danboorupost.h"
|
||||||
#include "model/danboorupostmodel.h"
|
#include "model/danboorupostmodel.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "danbooruconnectwidget.h"
|
#include "danbooruconnectwidget.h"
|
||||||
|
#include "danboorusettings.h"
|
||||||
|
|
||||||
namespace Danbooru
|
namespace Danbooru
|
||||||
{
|
{
|
||||||
|
@ -170,7 +172,16 @@ void DanbooruMainWindow::downloadPosts()
|
||||||
|
|
||||||
void DanbooruMainWindow::optionsPreferences()
|
void DanbooruMainWindow::optionsPreferences()
|
||||||
{
|
{
|
||||||
|
KConfigDialog* dialog = new KConfigDialog(this, "danboorusettings",
|
||||||
|
DanbooruSettings::self());
|
||||||
|
connect(dialog, &KConfigDialog::settingsChanged, [this](){
|
||||||
|
auto preferences = DanbooruSettings::self();
|
||||||
|
qDebug() << preferences->boards();
|
||||||
|
qDebug() << preferences->cacheSize();
|
||||||
|
qDebug() << preferences->maxPosts();
|
||||||
|
qDebug() << preferences->tagBlacklist();
|
||||||
|
});
|
||||||
|
dialog->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Danbooru
|
} // namespace Danbooru
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue