delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kcontrol / componentchooser / kcm_componentchooser.cpp
blobdbd99cd6d64c75fe6edb5a13eccfb7a182793245
1 /***************************************************************************
2 kcm_componentchooser.cpp - description
3 -------------------
4 copyright : (C) 2002 by Joseph Wenninger
5 email : jowenn@kde.org
6 ***************************************************************************/
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License version 2 as *
12 * published by the Free Software Foundation *
13 * *
14 ***************************************************************************/
16 #include <QLayout>
17 //Added by qt3to4:
18 #include <QVBoxLayout>
19 #include <klocale.h>
21 #include <kaboutdata.h>
22 #include <kglobal.h>
23 #include <kcomponentdata.h>
25 #include "kcm_componentchooser.h"
26 #include <KPluginFactory>
27 #include "kcm_componentchooser.moc"
29 K_PLUGIN_FACTORY(KCMComponentChooserFactory,
30 registerPlugin<KCMComponentChooser>();
32 K_EXPORT_PLUGIN(KCMComponentChooserFactory("kcmcomponentchooser"))
34 KCMComponentChooser::KCMComponentChooser(QWidget *parent, const QVariantList &):
35 KCModule(KCMComponentChooserFactory::componentData(), parent) {
37 QVBoxLayout *lay = new QVBoxLayout(this);
38 lay->setMargin(0);
40 m_chooser=new ComponentChooser(this);
41 lay->addWidget(m_chooser);
42 connect(m_chooser,SIGNAL(changed(bool)),this,SIGNAL(changed(bool)));
43 setButtons( Apply );
45 KAboutData *about =
46 new KAboutData(I18N_NOOP("kcmcomponentchooser"), 0, ki18n("Component Chooser"),
47 0, KLocalizedString(), KAboutData::License_GPL,
48 ki18n("(c), 2002 Joseph Wenninger"));
50 about->addAuthor(ki18n("Joseph Wenninger"), KLocalizedString() , "jowenn@kde.org");
51 setAboutData( about );
55 void KCMComponentChooser::load(){
56 m_chooser->load();
59 void KCMComponentChooser::save(){
60 m_chooser->save();
63 void KCMComponentChooser::defaults(){
64 m_chooser->restoreDefault();