/* SPDX-FileCopyrightText: 2013-2018 Jan Grulich SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #ifndef PLASMA_NM_EDITOR_PROXY_MODEL_H #define PLASMA_NM_EDITOR_PROXY_MODEL_H #include "plasmanm_internal_export.h" #include #include class PLASMANM_INTERNAL_EXPORT EditorProxyModel : public QSortFilterProxyModel { Q_OBJECT QML_ELEMENT Q_PROPERTY(QAbstractItemModel *sourceModel READ sourceModel WRITE setSourceModel) public: explicit EditorProxyModel(QObject *parent = nullptr); ~EditorProxyModel() override; protected: bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; bool lessThan(const QModelIndex &left, const QModelIndex &right) const override; }; #endif // PLASMA_NM_EDITOR_PROXY_MODEL_H