add more spacing
[personal-kdebase.git] / apps / konqueror / settings / performance / kcmperformance.cpp
blobce99fd24c9dd7677b37f8448413e846f1504e24a
1 /*
2 * Copyright (c) 2003 Lubos Lunak <l.lunak@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 // Own
20 #include "kcmperformance.h"
22 // Qt
23 #include <QtGui/QLayout>
24 #include <QtGui/QTabWidget>
25 #include <QtGui/QBoxLayout>
27 // KDE
28 #include <klocale.h>
29 #include <kdialog.h>
30 #include <KDebug>
31 // Local
32 #include "konqueror.h"
33 #include "system.h"
34 #include <KPluginFactory>
35 #include <KPluginLoader>
36 K_PLUGIN_FACTORY(KCMPerformanceConfigFactory,
37 registerPlugin<KCMPerformance::Config>("performance");
38 registerPlugin<KCMPerformance::KonquerorConfig>("konqueror");
40 K_EXPORT_PLUGIN(KCMPerformanceConfigFactory("kcmperformance"))
42 namespace KCMPerformance
45 Config::Config( QWidget* parent_P, const QVariantList & )
46 : KCModule( KCMPerformanceConfigFactory::componentData(), parent_P )
48 setQuickHelp( i18n( "<h1>KDE Performance</h1>"
49 " You can configure settings that improve KDE performance here." ));
51 QVBoxLayout *topLayout = new QVBoxLayout( this );
52 QTabWidget* tabs = new QTabWidget( this );
53 konqueror_widget = new Konqueror;
54 konqueror_widget->layout()->setMargin( KDialog::marginHint() );
55 connect( konqueror_widget, SIGNAL( changed()), SLOT( changed()));
56 tabs->addTab( konqueror_widget, i18n( "Konqueror" ));
57 system_widget = new SystemWidget;
58 system_widget->layout()->setMargin( KDialog::marginHint() );
59 connect( system_widget, SIGNAL( changed()), SLOT( changed()));
60 tabs->addTab( system_widget, i18n( "System" ));
61 topLayout->addWidget( tabs );
64 void Config::load()
66 konqueror_widget->load();
67 system_widget->load();
70 void Config::save()
72 konqueror_widget->save();
73 system_widget->save();
76 void Config::defaults()
78 konqueror_widget->defaults();
79 system_widget->defaults();
82 KonquerorConfig::KonquerorConfig( QWidget* parent_P, const QVariantList & )
83 : KCModule( KCMPerformanceConfigFactory::componentData(), parent_P )
85 setQuickHelp( i18n( "<h1>Konqueror Performance</h1>"
86 " You can configure several settings that improve Konqueror performance here."
87 " These include options for reusing already running instances"
88 " and for keeping instances preloaded." ));
90 QVBoxLayout *topLayout = new QVBoxLayout( this );
91 topLayout->setMargin( 0 );
92 widget = new Konqueror( this );
93 connect( widget, SIGNAL( changed()), SLOT( changed()));
94 topLayout->addWidget( widget );
97 void KonquerorConfig::load()
99 widget->load();
102 void KonquerorConfig::save()
104 widget->save();
107 void KonquerorConfig::defaults()
109 widget->defaults();
112 } // namespace
114 #include "kcmperformance.moc"