KPeople

mergedelegate.h
1 /*
2  KPeople - Duplicates
3  SPDX-FileCopyrightText: 2013 Franck Arrecot <[email protected]>
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 
16 class QAbstractItemView;
17 class QItemSelection;
18 
19 class KPEOPLEWIDGETS_EXPORT MergeDelegate : public KExtendableItemDelegate
20 {
21  Q_OBJECT
22 
23 public:
24  explicit MergeDelegate(QAbstractItemView *parent);
25  ~MergeDelegate() override;
26 
27  static QSize pictureSize();
28 
29 public Q_SLOTS:
30  void onClickContactParent(const QModelIndex &parent);
31  void onSelectedContactsChanged(const QItemSelection &now, const QItemSelection &old);
32 
33 private:
34  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
35  QWidget *buildMultipleLineLabel(const QModelIndex &idx);
36 
37  static QSize s_arrowSize;
38  static QSize s_decorationSize;
39 };
40 
41 #endif // MERGEDELEGATE_H
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jan 27 2022 22:42:01 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.