KPeople

mergedelegate.h
1/*
2 KPeople - Duplicates
3 SPDX-FileCopyrightText: 2013 Franck Arrecot <franck.arrecot@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef MERGEDELEGATE_H
9#define MERGEDELEGATE_H
10
11#include <kpeople/widgets/kpeoplewidgets_export.h>
12
13#include <KExtendableItemDelegate>
14#include <QItemSelection>
15
17class QItemSelection;
18
19class KPEOPLEWIDGETS_EXPORT MergeDelegate : public KExtendableItemDelegate
20{
21 Q_OBJECT
22
23public:
24 explicit MergeDelegate(QAbstractItemView *parent);
25 ~MergeDelegate() override;
26
27 static QSize pictureSize();
28
29public Q_SLOTS:
30 void onClickContactParent(const QModelIndex &parent);
31 void onSelectedContactsChanged(const QItemSelection &now, const QItemSelection &old);
32
33private:
34 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
35
36private:
37 KPEOPLEWIDGETS_NO_EXPORT QWidget *buildMultipleLineLabel(const QModelIndex &idx);
38
39 static QSize s_arrowSize;
40 static QSize s_decorationSize;
41};
42
43#endif // MERGEDELEGATE_H
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.