2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 * Author: Nick Dedekind <nick.dedekind@canonical.com>
23#include "fake_scope.h"
26#include <QAbstractListModel>
30class Scopes : public QAbstractListModel
34 Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
38 explicit Scopes(QObject *parent = 0);
48 Q_INVOKABLE int rowCount(const QModelIndex& parent = QModelIndex()) const;
50 Q_INVOKABLE QVariant get(int row) const;
51 Q_INVOKABLE QVariant get(const QString& scope_id) const;
53 Q_INVOKABLE void addScope(Scope* scope);
55 Q_INVOKABLE void clear();
56 Q_INVOKABLE void load();
58 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
59 QHash<int, QByteArray> roleNames() const;
60 QModelIndex parent ( const QModelIndex & index ) const;
66 void activateScopeRequested(const QString& scope_id);
67 void loadedChanged(bool);
74 QList<Scope*> m_scopes;
75 QHash<int, QByteArray> m_roles;
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