2 * Copyright (C) 2011, 2013 Canonical, Ltd.
5 * Florian Boucault <florian.boucault@canonical.com>
6 * Pawel Stolowski <pawel.stolowski@canonical.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 3.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25#include <QAbstractListModel>
29#include <UnityCore/Filters.h>
30#include <UnityCore/Filter.h>
34class Filters : public QAbstractListModel
41 explicit Filters(unity::dash::Filters::Ptr unityFilters, QObject *parent = nullptr);
45 RoleId = Qt::UserRole,
55 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
56 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
57 QHash<int, QByteArray> roleNames() const override;
59 Filter* getFilter(const QString& id) const;
62 void onFilterAdded(unity::dash::Filter::Ptr unityFilter);
63 void onFilterChanged(unity::dash::Filter::Ptr unityFilter);
64 void onFilterRemoved(unity::dash::Filter::Ptr unityFilter);
66 void addFilter(unity::dash::Filter::Ptr unityFilter, int index);
67 void removeFilter(int index);
69 int indexForFilter(unity::dash::Filter::Ptr unityFilter);
71 unity::dash::Filters::Ptr m_unityFilters;
72 QList<Filter*> m_filters;
75Q_DECLARE_METATYPE(Filters*)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list