File indexing completed on 2024-10-06 04:31:43
0001 /* This file is part of the KDE project 0002 0003 Copyright (C) 2008 Lukas Appelhans <l.appelhans@gmx.de> 0004 0005 This program is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 */ 0010 #include "pluginselector.h" 0011 0012 #include "core/kget.h" 0013 0014 #include <KConfigGroup> 0015 #include <KLocalizedString> 0016 #include <KSharedConfig> 0017 #include <QDialog> 0018 0019 PluginSelector::PluginSelector(QDialog *parent) 0020 : KPluginWidget(parent) 0021 { 0022 setConfig(KConfigGroup(KSharedConfig::openConfig(), "Plugins")); 0023 addPlugins(KGet::self()->plugins(), i18n("Plugins")); 0024 0025 connect(parent, &QDialog::accepted, this, &PluginSelector::saveState); 0026 connect(parent, &QDialog::rejected, this, &PluginSelector::loadDefaults); 0027 } 0028 0029 PluginSelector::~PluginSelector() 0030 { 0031 } 0032 0033 void PluginSelector::saveState() 0034 { 0035 save(); 0036 KGet::loadPlugins(); 0037 } 0038 0039 void PluginSelector::loadDefaults() 0040 { 0041 defaults(); 0042 } 0043 0044 #include "moc_pluginselector.cpp"