File indexing completed on 2024-05-19 05:14:38
0001 /* 0002 This file is part of KAddressBook. 0003 0004 SPDX-FileCopyrightText: 2020 Konrad Czapla <kondzio89dev@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include <QStyledItemDelegate> 0012 0013 class StyleContactListDelegate : public QStyledItemDelegate 0014 { 0015 Q_OBJECT 0016 public: 0017 explicit StyleContactListDelegate(QObject *parent = nullptr); 0018 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; 0019 QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; 0020 0021 private: 0022 const QSize mKImageSize; 0023 const qreal mKMargin = 5.0; 0024 };