File indexing completed on 2024-04-14 04:51:44

0001 /**
0002  * SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef DEVICESSORTPROXYMODEL_H
0008 #define DEVICESSORTPROXYMODEL_H
0009 
0010 #include "kdeconnectinterfaces_export.h"
0011 #include <QSortFilterProxyModel>
0012 
0013 class DevicesModel;
0014 
0015 class KDECONNECTINTERFACES_EXPORT DevicesSortProxyModel : public QSortFilterProxyModel
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit DevicesSortProxyModel(DevicesModel *devicesModel = nullptr);
0020     bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
0021     bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
0022 };
0023 
0024 #endif // DEVICESSORTPROXYMODEL_H