Warning, file /network/ruqola/src/core/model/commandsmodelfilterproxymodel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "libruqola_private_export.h" 0010 #include <QSortFilterProxyModel> 0011 class RocketChatAccount; 0012 class LIBRUQOLACORE_TESTS_EXPORT CommandsModelFilterProxyModel : public QSortFilterProxyModel 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit CommandsModelFilterProxyModel(RocketChatAccount *account, QObject *parent = nullptr); 0017 ~CommandsModelFilterProxyModel() override; 0018 0019 void setRoomId(const QString &roomId); 0020 0021 protected: 0022 [[nodiscard]] bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; 0023 [[nodiscard]] bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; 0024 0025 private: 0026 QString mRoomId; 0027 RocketChatAccount *const mRocketChatAccount; 0028 };