summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/GameList/ListProxyModel.h
blob: 914aba5bf8507412d8d30f3e37b3c72e7c6a59ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QSortFilterProxyModel>

// This subclass of QSortFilterProxyModel allows the data to be filtered by the view.
class ListProxyModel final : public QSortFilterProxyModel
{
  Q_OBJECT

public:
  explicit ListProxyModel(QObject* parent = nullptr);
  bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;

protected:
  bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
};