2 * Copyright (C) 2014 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/>.
18#ifndef FAKE_PREVIEWMODEL_H
19#define FAKE_PREVIEWMODEL_H
21#include <QAbstractListModel>
22#include <QSharedPointer>
25class PreviewWidgetModel;
27class PreviewModel : public QAbstractListModel
33 Q_PROPERTY(int widgetColumnCount READ widgetColumnCount WRITE setWidgetColumnCount NOTIFY widgetColumnCountChanged)
34 Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
35 Q_PROPERTY(bool processingAction READ processingAction NOTIFY processingActionChanged)
38 explicit PreviewModel(QObject* parent = 0);
44 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
45 QHash<int, QByteArray> roleNames() const override;
46 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
48 void setWidgetColumnCount(int count);
49 int widgetColumnCount() const;
51 bool processingAction() const;
52 void setProcessingAction(bool processing);
55 void widgetColumnCountChanged();
57 void processingActionChanged();
58 void triggered(QString const&, QString const&, QVariantMap const&);
61 QHash<int, QByteArray> m_roles;
62 QList<PreviewWidgetModel*> m_previewWidgetModels;
65Q_DECLARE_METATYPE(PreviewModel*)
67#endif // FAKE_PREVIEWMODEL_H
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