2
* Copyright (C) 2012 Lasath Fernando <kde@lasath.org>
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
#include "messages-config.h"
20
#include "plugin-config-manager.h"
22
#include <QVBoxLayout>
24
#include <KPluginInfo>
25
#include <KPluginFactory>
26
#include <KPluginSelector>
29
K_PLUGIN_FACTORY(KTpMessagesConfigFactory, registerPlugin<MessagesConfig>();)
30
K_EXPORT_PLUGIN(KTpMessagesConfigFactory("ktp_chat_messages", "kcm_ktp_chat_messages"))
32
MessagesConfig::MessagesConfig(QWidget *parent, const QVariantList &args)
33
: PluginPage(KTpMessagesConfigFactory::componentData(), parent, args)
35
pluginSelector()->addPlugins(
36
PluginConfigManager::self()->allPlugins(),
37
KPluginSelector::ReadConfigFile,
40
PluginConfigManager::self()->sharedConfig() //why won't this take a KConfigGroup?
43
//Am surprised that PluginPage() doesn't do this for me
44
QLayout *layout = new QVBoxLayout();
45
layout->addWidget(pluginSelector());