]>
cloud.milkyroute.net Git - dolphin.git/blob - src/settings/serviceitemdelegate.h
2 * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #ifndef SERVICEITEMDELEGATE_H
8 #define SERVICEITEMDELEGATE_H
10 #include <KWidgetItemDelegate>
13 * @brief Widget item delegate for a service that can be enabled or disabled.
15 * Additionally it is possible to configure a service.
18 class ServiceItemDelegate
: public KWidgetItemDelegate
23 explicit ServiceItemDelegate(QAbstractItemView
*itemView
, QObject
*parent
= nullptr);
24 ~ServiceItemDelegate() override
;
26 QSize
sizeHint(const QStyleOptionViewItem
&option
, const QModelIndex
&index
) const override
;
28 void paint(QPainter
*painter
, const QStyleOptionViewItem
&option
, const QModelIndex
&index
) const override
;
30 QList
<QWidget
*> createItemWidgets(const QModelIndex
&) const override
;
32 void updateItemWidgets(const QList
<QWidget
*> widgets
, const QStyleOptionViewItem
&option
, const QPersistentModelIndex
&index
) const override
;
35 void requestServiceConfiguration(const QModelIndex
&index
);
38 void slotCheckBoxClicked(bool checked
);
39 void slotConfigureButtonClicked();