2 * This file is part of the System Settings package
3 * Copyright (C) 2005 Benjamin C Meyer
4 * <ben+systempreferences at meyerhome dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef MODULEICONITEM_H
23 #define MODULEICONITEM_H
25 #include <QItemDelegate>
26 #include <QListWidgetItem>
28 #include <QPainterPath>
35 * Stores information about what modules goes with this item.
36 * Also provides means of loading the enabled/disabled image (see kcmsearch).
38 class ModuleIconItem
: public QListWidgetItem
42 ModuleIconItem( QListWidget
*parent
, const KCModuleInfo
& module
);
44 ModuleIconItem( QListWidget
*parent
, const QString
&text
, const QString
&imageName
);
47 * Update the icon to either be enabled or not.
49 void loadIcon( bool enabled
= true );
51 // The modules that go with this item
52 QList
<KCModuleInfo
> modules
;
60 #endif // MODULEICONITEM_H