Mailcommon

invalidfilterlistmodel.h
1 /*
2  SPDX-FileCopyrightText: 2015-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "invalidfilterinfo.h"
10 #include <QAbstractListModel>
11 #include <QVector>
12 namespace MailCommon
13 {
14 class InvalidFilterListModel : public QAbstractListModel
15 {
16  Q_OBJECT
17 
18 public:
19  enum Role { InformationRole = Qt::UserRole + 1 };
20 
21  explicit InvalidFilterListModel(QObject *parent = nullptr);
22  ~InvalidFilterListModel() override;
23 
24  Q_REQUIRED_RESULT bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
25  Q_REQUIRED_RESULT bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
26  Q_REQUIRED_RESULT QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
27  Q_REQUIRED_RESULT int rowCount(const QModelIndex &parent = QModelIndex()) const override;
28 
29 private:
30  QVector<MailCommon::InvalidFilterInfo> mInvalidFilterItems;
31 };
32 }
Q_OBJECTQ_OBJECT
UserRole
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.