From c34b2f04fd540622a671e4848a37e509a6721d2c Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sat, 8 Jul 2023 23:46:29 +0200 Subject: Replace ServiceItemDelegate with standard Qt item delegate We don't need a custom delegate here Using the standard one from Qt also slightly improves margins --- src/settings/serviceitemdelegate.h | 42 -------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 src/settings/serviceitemdelegate.h (limited to 'src/settings/serviceitemdelegate.h') diff --git a/src/settings/serviceitemdelegate.h b/src/settings/serviceitemdelegate.h deleted file mode 100644 index d7b243878..000000000 --- a/src/settings/serviceitemdelegate.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2011 Peter Penz - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef SERVICEITEMDELEGATE_H -#define SERVICEITEMDELEGATE_H - -#include - -/** - * @brief Widget item delegate for a service that can be enabled or disabled. - * - * Additionally it is possible to configure a service. - * @see ServiceModel - */ -class ServiceItemDelegate : public KWidgetItemDelegate -{ - Q_OBJECT - -public: - explicit ServiceItemDelegate(QAbstractItemView *itemView, QObject *parent = nullptr); - ~ServiceItemDelegate() override; - - QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; - - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; - - QList createItemWidgets(const QModelIndex &) const override; - - void updateItemWidgets(const QList &widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const override; - -Q_SIGNALS: - void requestServiceConfiguration(const QModelIndex &index); - -private Q_SLOTS: - void slotCheckBoxClicked(bool checked); - void slotConfigureButtonClicked(); -}; - -#endif -- cgit v1.3