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/>.
19#include <QGuiApplication>
21#include <QtQml/qqml.h>
22#include <QStringListModel>
25#include <QGuiApplication>
27#include "verticaljournal.h"
31class DummyModel : public QAbstractListModel {
34 DummyModel() : m_count(0) {}
36 int rowCount(const QModelIndex & /*parent*/) const override
41 QVariant data(const QModelIndex & /*index*/, int /*role*/) const override
46 void setCount(int count)
56 beginInsertRows(QModelIndex(), m_count, m_count);
63 beginRemoveRows(QModelIndex(), m_count - 1, m_count - 1);
72int main(int argc, char *argv[])
74 QGuiApplication a(argc, argv);
76 QQuickView *view = new QQuickView();
77 view->setResizeMode(QQuickView::SizeRootObjectToView);
82 QStringListModel listModel;
83 listModel.setStringList(QStringList() << QString());
85 view->rootContext()->setContextProperty("listModel", &listModel);
86 view->rootContext()->setContextProperty("gridModel", &model);
88 view->setSource(QUrl::fromLocalFile(testDataDir() + "/" TEST_DIR "/organicgridtry.qml"));
91 view->resize(530, 400);
93 QObject::connect(view->rootObject(), SIGNAL(add()), &model, SLOT(addItem()));
94 QObject::connect(view->rootObject(), SIGNAL(remove()), &model, SLOT(removeLast()));
99#include "organicgridtry.moc"
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