Akonadi

statisticsproxymodel.h
1 /*
2  SPDX-FileCopyrightText: 2009 Kevin Ottens <[email protected]>
3  2016 David Faure <[email protected]>s
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef AKONADI_STATISTICSPROXYMODEL_H
9 #define AKONADI_STATISTICSPROXYMODEL_H
10 
11 #include "akonadicore_export.h"
12 
13 #include <KExtraColumnsProxyModel>
14 
15 namespace Akonadi
16 {
17 
39 class AKONADICORE_EXPORT StatisticsProxyModel : public KExtraColumnsProxyModel
40 {
41  Q_OBJECT
42 
43 public:
49  explicit StatisticsProxyModel(QObject *parent = nullptr);
50 
54  ~StatisticsProxyModel() override;
55 
60  void setToolTipEnabled(bool enable);
61 
65  Q_REQUIRED_RESULT bool isToolTipEnabled() const;
66 
71  void setExtraColumnsEnabled(bool enable);
72 
76  Q_REQUIRED_RESULT bool isExtraColumnsEnabled() const;
77 
78  Q_REQUIRED_RESULT QVariant extraColumnData(const QModelIndex &parent, int row, int extraColumn, int role) const override;
79  Q_REQUIRED_RESULT QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
80  Q_REQUIRED_RESULT Qt::ItemFlags flags(const QModelIndex &index) const override;
81 
82  Q_REQUIRED_RESULT virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits = 1,
84 
85  void setSourceModel(QAbstractItemModel *model) override;
86 
87 private:
88  //@cond PRIVATE
89  class Private;
90  Private *const d;
91  //@endcond
92 };
93 
94 }
95 
96 #endif
typedef MatchFlags
DisplayRole
A proxy model that exposes collection statistics through extra columns.
Helper integration between Akonadi and Qt.
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 23:16:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.