2 * Copyright (C) 2013 Canonical, Ltd.
5 * Michał Sawicz <michal.sawicz@canonical.com>
6 * Michal Hruby <michal.hruby@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/>.
26#include <UnityCore/Scope.h>
29#include "deelistmodel.h"
35class Categories : public DeeListModel
42 explicit Categories(QObject* parent = 0);
57 Q_INVOKABLE void overrideResults(const QString& categoryId, QAbstractItemModel* model);
59 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
61 QHash<int, QByteArray> roleNames() const;
64 void setUnityScope(const unity::dash::Scope::Ptr& scope);
67 void onCountChanged();
68 void onRowCountChanged();
69 void onEmitCountChanged();
70 void onOverrideModelDestroyed();
73 void onCategoriesModelChanged(unity::glib::Object<DeeModel> model);
75 DeeListModel* getResults(int index) const;
77 unity::dash::Scope::Ptr m_unityScope;
79 QSet<int> m_updatedCategories;
80 QHash<int, QByteArray> m_roles;
81 QMap<QString, QAbstractItemModel*> m_overriddenCategories;
82 mutable QMap<int, DeeListModel*> m_results;
83 sigc::connection m_categoriesChangedConnection;
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