1 /* This file is part of the KDE project
2 Copyright (C) 2003 Waldo Bastian <bastian@kde.org>
3 Copyright (C) 2003 David Faure <faure@kde.org>
4 Copyright (C) 2002 Daniel Molkentin <molkentin@kde.org>
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public
8 License version 2 or at your option version 3 as published
9 by the Free Software Foundation.
11 This program 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 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #ifndef _KSERVICELISTWIDGET_H
23 #define _KSERVICELISTWIDGET_H
26 #include <QtGui/QListWidget>
32 class KServiceListItem
: public QListWidgetItem
35 KServiceListItem( /*TODO const &*/ KService::Ptr pService
, int kind
);
42 * This widget holds a list of services, with 5 buttons to manage it.
43 * It's a separate class so that it can be used by both tabs of the
44 * module, once for applications and once for services.
45 * The "kind" is determined by the argument given to the constructor.
47 class KServiceListWidget
: public QGroupBox
51 enum { SERVICELIST_APPLICATIONS
, SERVICELIST_SERVICES
};
52 explicit KServiceListWidget(int kind
, QWidget
*parent
= 0);
54 void setMimeTypeData( MimeTypeData
* item
);
60 void promoteService();
65 void enableMoveButtons();
68 void updatePreferredServices();
72 QListWidget
*servicesLB
;
73 QPushButton
*servUpButton
, *servDownButton
;
74 QPushButton
*servNewButton
, *servEditButton
, *servRemoveButton
;
75 MimeTypeData
*m_mimeTypeData
;