1
/***************************************************************************
2
* Copyright Ravikiran Rajagopal 2003 *
3
* ravi@ee.eng.ohio-state.edu *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License (version 2) as *
7
* published by the Free Software Foundation. *
9
***************************************************************************/
11
#include <config-workspace.h>
16
#include <QHBoxLayout>
18
#include <kaboutdata.h>
21
#include <kstandarddirs.h>
23
#include "installer.h"
24
#include <KPluginFactory>
25
#include <KPluginLoader>
27
class KSplashThemeMgr : public KCModule
31
KSplashThemeMgr( QWidget *parent, const QVariantList &/*unused*/);
34
QString quickHelp() const;
39
virtual void defaults();
42
SplashInstaller *mInstaller;
45
K_PLUGIN_FACTORY(KSplashThemeMgrFactory,
46
registerPlugin< KSplashThemeMgr>();
48
K_EXPORT_PLUGIN(KSplashThemeMgrFactory("ksplashthemes"))
50
// -----------------------------------------------------------------------------------------
52
KSplashThemeMgr::KSplashThemeMgr( QWidget *parent, const QVariantList &args)
53
: KCModule( KSplashThemeMgrFactory::componentData(), parent, args ), mInstaller(new SplashInstaller(this))
58
QHBoxLayout *box = new QHBoxLayout(this);
59
QTabWidget *tab = new QTabWidget(this); // There will be more tabs in the future.
61
tab->addTab( mInstaller, i18n("&Theme Installer") );
63
QHBoxLayout *box = new QHBoxLayout(this);
65
box->addWidget(mInstaller);
67
connect( mInstaller, SIGNAL(changed(bool)), SIGNAL(changed(bool)) );
68
KAboutData *about = new KAboutData( "kcmksplash"
69
, 0,ki18n("KDE splash screen theme manager")
72
,KAboutData::License_GPL
73
,ki18n("(c) 2003 KDE developers") );
74
about->addAuthor(ki18n("Ravikiran Rajagopal"), KLocalizedString(), "ravi@ee.eng.ohio-state.edu");
75
about->addCredit(ki18n("Brian Ledbetter"), ki18n("Original KSplash/ML author"), "brian@shadowcom.net");
76
about->addCredit(ki18n("KDE Theme Manager authors" ), ki18n("Original installer code") );
77
// Once string freeze is over, replace second argument with "Icon"
78
about->addCredit(ki18n("Hans Karlsson"), KLocalizedString(), "karlsson.h@home.se" );
80
//setButtons( KCModule::Default|KCModule::Apply );
83
KSplashThemeMgr::~KSplashThemeMgr()
85
// Do not delete the installer as it is now owned by the tab widget.
88
QString KSplashThemeMgr::quickHelp() const
90
return i18n("<h1>Splash Screen Theme Manager </h1> Install and view splash screen themes.");
93
void KSplashThemeMgr::init()
95
KGlobal::dirs()->addResourceType("ksplashthemes", "data", "ksplash/Themes");
98
void KSplashThemeMgr::save()
103
void KSplashThemeMgr::load()
108
void KSplashThemeMgr::defaults()
110
mInstaller->defaults();