3 Copyright 2008 Albert Astals Cid <aacid@kde.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3 or any later version
9 accepted by the membership of KDE e.V. (or its successor approved
10 by the membership of KDE e.V.), which shall act as a proxy
11 defined in Section 14 of version 3 of the license.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "spellchecking.h"
25 #include <kgenericfactory.h>
26 #include <sonnet/configwidget.h>
30 K_PLUGIN_FACTORY(SpellFactory
, registerPlugin
<SonnetSpellCheckingModule
>();)
31 K_EXPORT_PLUGIN(SpellFactory( "kcmspellchecking" ))
33 SonnetSpellCheckingModule::SonnetSpellCheckingModule(QWidget
* parent
, const QVariantList
&):
34 KCModule(SpellFactory::componentData(), parent
)
36 QBoxLayout
*layout
= new QVBoxLayout( this );
37 m_config
= new KConfig("sonnetrc");
38 m_configWidget
= new Sonnet::ConfigWidget( m_config
, this );
39 layout
->addWidget(m_configWidget
);
40 connect(m_configWidget
, SIGNAL(configChanged()), this, SLOT(changed()));
43 SonnetSpellCheckingModule::~SonnetSpellCheckingModule()
48 void SonnetSpellCheckingModule::save()
50 m_configWidget
->save();
53 void SonnetSpellCheckingModule::defaults()
55 m_configWidget
->slotDefault();
58 #include "spellchecking.moc"