Mailcommon

invalidfilterlistmodel.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
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 <QList>
12namespace MailCommon
13{
14class InvalidFilterListModel : public QAbstractListModel
15{
17
18public:
19 enum Role {
20 InformationRole = Qt::UserRole + 1
21 };
22
23 explicit InvalidFilterListModel(QObject *parent = nullptr);
24 ~InvalidFilterListModel() override;
25
26 [[nodiscard]] bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
27 [[nodiscard]] bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
28 [[nodiscard]] QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
29 [[nodiscard]] int rowCount(const QModelIndex &parent = QModelIndex()) const override;
30
31private:
32 QList<MailCommon::InvalidFilterInfo> mInvalidFilterItems;
33};
34}
The filter dialog.
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
Q_OBJECTQ_OBJECT
QObject * parent() const const
UserRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.