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.
21
#include <QStringList>
23
#include <KPluginFactory>
24
#include <KPluginLoader>
26
#include <kaboutdata.h>
35
#include <QVBoxLayout>
36
#include <QHBoxLayout>
37
#include <QTreeWidget>
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");
61
KGlobal::locale()->insertCatalog("kcm_infobase");
63
QHBoxLayout* layout = new QHBoxLayout(this);
64
layout->setSpacing(0);
67
tree = new QTreeWidget(this);
68
layout->addWidget(tree);
69
tree->setSelectionMode(QAbstractItemView::ExtendedSelection);
70
tree->setAllColumnsShowFocus(true);
71
tree->setRootIsDecorated(false);
72
tree->setWhatsThis(i18n("This list displays PCI information.") );
82
kDebug() << "Loading PCI information..." << endl;
85
//Resize the column width to the maximum needed
87
tree->resizeColumnToContents( 0 );
91
QString KCMPci::quickHelp() const {
92
return i18n("This display shows information about your computer's PCI slots and the related connected devices.");
95
#include "kcm_pci.moc"