KLdap

ldapsortproxymodel.h
1// SPDX-FileCopyrightText: 2024 Laurent Montel <montel@kde.org>
2// SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
3
4#pragma once
5#include "kldap_core_export.h"
6
7#include <QSortFilterProxyModel>
8
9namespace KLDAPCore
10{
11class LdapActivitiesAbstract;
12class KLDAP_CORE_EXPORT LdapSortProxyModel : public QSortFilterProxyModel
13{
14 Q_OBJECT
15public:
16 explicit LdapSortProxyModel(QObject *parent);
17 ~LdapSortProxyModel() override;
18
19 [[nodiscard]] LdapActivitiesAbstract *ldapActivitiesAbstract() const;
20 void setLdapActivitiesAbstract(LdapActivitiesAbstract *newldapActivitiesAbstract);
21
22 [[nodiscard]] bool enablePlasmaActivities() const;
23 void setEnablePlasmaActivities(bool newEnablePlasmaActivities);
24
25protected:
26 [[nodiscard]] bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
27 [[nodiscard]] bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
28
29private:
30 LdapActivitiesAbstract *mLdapActivitiesAbstract = nullptr;
31 bool mEnablePlasmaActivities = false;
32};
33}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.