4 * Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
6 * Requires the Qt widget libraries, available at no cost at
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include <QVBoxLayout>
28 #include <kaboutdata.h>
31 #include "iconthemes.h"
33 #include <KPluginFactory>
34 #include <KPluginLoader>
36 /**** DLL Interface ****/
37 K_PLUGIN_FACTORY(IconsFactory
,
38 registerPlugin
<IconModule
>();
40 K_EXPORT_PLUGIN(IconsFactory("kcmicons"))
42 /**** IconModule ****/
44 IconModule::IconModule(QWidget
*parent
, const QVariantList
&)
45 : KCModule(IconsFactory::componentData(), parent
)
47 QVBoxLayout
*layout
= new QVBoxLayout(this);
50 tab
= new QTabWidget(this);
51 layout
->addWidget(tab
);
53 tab1
= new IconThemesConfig(IconsFactory::componentData(), this);
54 tab1
->setObjectName( "themes" );
55 tab
->addTab(tab1
, i18n("&Theme"));
56 connect(tab1
, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
58 tab2
= new KIconConfig(IconsFactory::componentData(), this);
59 tab2
->setObjectName( "effects" );
60 tab
->addTab(tab2
, i18n("Ad&vanced"));
61 connect(tab2
, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
63 KAboutData
* about
= new KAboutData("kcmicons", 0, ki18n("Icons"), "3.0",
64 ki18n("Icons Control Panel Module"),
65 KAboutData::License_GPL
,
66 ki18n("(c) 2000-2003 Geert Jansen"));
67 about
->addAuthor(ki18n("Geert Jansen"), KLocalizedString(), "jansen@kde.org");
68 about
->addAuthor(ki18n("Antonio Larrosa Jimenez"), KLocalizedString(), "larrosa@kde.org");
69 about
->addCredit(ki18n("Torsten Rahn"), KLocalizedString(), "torsten@kde.org");
70 setAboutData( about
);
74 void IconModule::load()
81 void IconModule::save()
88 void IconModule::defaults()
95 void IconModule::moduleChanged(bool state
)
100 QString
IconModule::quickHelp() const
102 return i18n("<h1>Icons</h1>"
103 "This module allows you to choose the icons for your desktop.<p>"
104 "To choose an icon theme, click on its name and apply your choice by pressing the \"Apply\" button below. If you do not want to apply your choice you can press the \"Reset\" button to discard your changes.</p>"
105 "<p>By pressing the \"Install New Theme\" button you can install your new icon theme by writing its location in the box or browsing to the location."
106 " Press the \"OK\" button to finish the installation.</p>"
107 "<p>The \"Remove Theme\" button will only be activated if you select a theme that you installed using this module."
108 " You are not able to remove globally installed themes here.</p>"
109 "<p>You can also specify effects that should be applied to the icons.</p>");