MailTransport

transportsortproxymodel.h
1/*
2 SPDX-FileCopyrightText: 2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8#include "mailtransport_export.h"
9#include <QSortFilterProxyModel>
10namespace MailTransport
11{
12class TransportActivitiesAbstract;
13class MAILTRANSPORT_EXPORT TransportSortProxyModel : public QSortFilterProxyModel
14{
15 Q_OBJECT
16public:
17 explicit TransportSortProxyModel(QObject *parent = nullptr);
18 ~TransportSortProxyModel() override;
19
20 [[nodiscard]] TransportActivitiesAbstract *transportActivitiesAbstract() const;
21 void setTransportActivitiesAbstract(TransportActivitiesAbstract *newTransportActivitiesAbstract);
22
23 [[nodiscard]] bool enablePlasmaActivities() const;
24 void setEnablePlasmaActivities(bool newEnablePlasmaActivities);
25
26protected:
27 [[nodiscard]] bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
28
29private:
30 TransportActivitiesAbstract *mTransportActivitiesAbstract = nullptr;
31 bool mEnablePlasmaActivities = false;
32};
33}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.