add more spacing
[personal-kdebase.git] / apps / kinfocenter / pci / kcm_pci.cpp
blobfb977e589999a36d7106d82f4beaf3f8b6928bf4
1 /*
2 * Copyright (C) 2008 Nicolas Ternisien <nicolas.ternisien@gmail.com>
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 #include "kcm_pci.h"
21 #include <QStringList>
23 #include <KPluginFactory>
24 #include <KPluginLoader>
26 #include <kaboutdata.h>
27 #include <kdialog.h>
28 #include <kdebug.h>
30 #include <QLayout>
31 #include <QPainter>
33 #include <QPixmap>
34 #include <QLabel>
35 #include <QVBoxLayout>
36 #include <QHBoxLayout>
37 #include <QTreeWidget>
39 #include <klocale.h>
40 #include <kglobal.h>
41 #include <kseparator.h>
43 K_PLUGIN_FACTORY(KCMPciFactory,
44 registerPlugin<KCMPci>();
46 K_EXPORT_PLUGIN(KCMPciFactory("kcm_pci"))
48 KCMPci::KCMPci(QWidget *parent, const QVariantList &) :
49 KCModule(KCMPciFactory::componentData(), parent) {
51 KAboutData *about = new KAboutData(I18N_NOOP("kcm_pci"), 0,
52 ki18n("KDE PCI Information Control Module"),
53 0, KLocalizedString(), KAboutData::License_GPL,
54 ki18n( "(c) 2008 Nicolas Ternisien"
55 "(c) 1998 - 2002 Helge Deller"));
57 about->addAuthor(ki18n("Nicolas Ternisien"), KLocalizedString(), "nicolas.ternisien@gmail.com");
58 about->addAuthor(ki18n("Helge Deller"), KLocalizedString(), "deller@gmx.de");
59 setAboutData(about);
62 QHBoxLayout* layout = new QHBoxLayout(this);
63 layout->setSpacing(0);
64 layout->setMargin(0);
66 tree = new QTreeWidget(this);
67 layout->addWidget(tree);
68 tree->setSelectionMode(QAbstractItemView::ExtendedSelection);
69 tree->setAllColumnsShowFocus(true);
70 tree->setRootIsDecorated(false);
71 tree->setWhatsThis(i18n("This list displays PCI information.") );
76 KCMPci::~KCMPci() {
80 void KCMPci::load() {
81 kDebug() << "Loading PCI information..." << endl;
82 GetInfo_PCI(tree);
85 QString KCMPci::quickHelp() const {
86 return i18n("This display shows information about your computer's PCI slots and the related connected devices.");
89 #include "kcm_pci.moc"