blob: abad10bf47cc2503d0137af3a6989501ef407eb6 [file] [log] [blame]
Stepan Salenikovichc3fede22015-03-20 17:01:47 -04001/*
Guillaume Roguez2a6150d2017-07-19 18:24:47 -04002 * Copyright (C) 2015-2017 Savoir-faire Linux Inc.
Stepan Salenikovichc3fede22015-03-20 17:01:47 -04003 * Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Stepan Salenikovichc3fede22015-03-20 17:01:47 -040018 */
19
20#ifndef ACTIVEITEMPROXYMODEL_H
21#define ACTIVEITEMPROXYMODEL_H
22
23#include <QtCore/QAbstractItemModel>
24#include <QtCore/QSortFilterProxyModel>
25
26class ActiveItemProxyModel : public QSortFilterProxyModel
27{
28public:
29 ActiveItemProxyModel(QAbstractItemModel* parent) : QSortFilterProxyModel(parent)
30 {
31 setSourceModel(parent);
32 }
33 virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
34};
35
Stepan Salenikovichbe87d2c2016-01-25 14:14:34 -050036#endif /* ACTIVEITEMPROXYMODEL_H */