MauiKit Calendar

commandbarfiltermodel.h
1// SPDX-FileCopyrightText: 2021 Waqar Ahmed <waqar.17a@gmail.com>
2// SPDX-License-Identifier: LGPL-2.0-or-later
3
4#include <QSortFilterProxyModel>
5
6class CommandBarFilterModel final : public QSortFilterProxyModel
7{
9 Q_PROPERTY(QString filterString READ filterString WRITE setFilterString NOTIFY filterStringChanged)
10public:
11 explicit CommandBarFilterModel(QObject *parent = nullptr);
12
13 QString filterString() const;
14
15 void setFilterString(const QString &string);
16
18 void filterStringChanged();
19
20protected:
21 bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight) const override;
22
23 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
24
25private:
26 QString m_pattern;
27};
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:50:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.