1 // Copyright 2017 Dolphin Emulator Project 2 // Licensed under GPLv2+ 3 // Refer to the license.txt file included. 4 5 #pragma once 6 7 #include <QSortFilterProxyModel> 8 9 // This subclass of QSortFilterProxyModel allows the data to be filtered by the view. 10 class ListProxyModel final : public QSortFilterProxyModel 11 { 12 Q_OBJECT 13 14 public: 15 explicit ListProxyModel(QObject* parent = nullptr); 16 bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override; 17 18 protected: 19 bool lessThan(const QModelIndex& left, const QModelIndex& right) const override; 20 }; 21