2 * Copyright (C) 2015 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#include <QtQml/qqml.h>
19#include <QDBusConnection>
21#include <QtQuick/QQuickWindow>
26#include "inputwatcher.h"
27#include "qlimitproxymodelqml.h"
28#include "unitysortfilterproxymodelqml.h"
29#include "relativetimeformatter.h"
30#include "timeformatter.h"
31#include "unitymenumodelpaths.h"
32#include "windowkeysfilter.h"
33#include "easingcurve.h"
34#include "windowstatestorage.h"
38#include <inputwatcher.h>
39#include <qlimitproxymodelqml.h>
40#include <unitysortfilterproxymodelqml.h>
41#include <relativetimeformatter.h>
42#include <timeformatter.h>
43#include <unitymenumodelpaths.h>
44#include <windowkeysfilter.h>
45#include <windowscreenshotprovider.h>
46#include <easingcurve.h>
48static QObject *createWindowStateStorage(QQmlEngine *engine, QJSEngine *scriptEngine)
51 Q_UNUSED(scriptEngine)
52 return new WindowStateStorage();
55static QObject *createConstants(QQmlEngine *engine, QJSEngine *scriptEngine)
58 Q_UNUSED(scriptEngine)
59 return new Constants();
62void FakeUtilsPlugin::registerTypes(const char *uri)
64 Q_ASSERT(uri == QLatin1String("Utils"));
65 qmlRegisterType<QAbstractItemModel>();
66 qmlRegisterType<QLimitProxyModelQML>(uri, 0, 1, "LimitProxyModel");
67 qmlRegisterType<UnitySortFilterProxyModelQML>(uri, 0, 1, "UnitySortFilterProxyModel");
68 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
69 qmlRegisterType<TimeFormatter>(uri, 0, 1, "TimeFormatter");
70 qmlRegisterType<WindowKeysFilter>(uri, 0, 1, "WindowKeysFilter");
71 qmlRegisterType<GDateTimeFormatter>(uri, 0, 1, "GDateTimeFormatter");
72 qmlRegisterType<EasingCurve>(uri, 0, 1, "EasingCurve");
73 qmlRegisterType<RelativeTimeFormatter>(uri, 0, 1, "RelativeTimeFormatter");
74 qmlRegisterSingletonType<WindowStateStorage>(uri, 0, 1, "WindowStateStorage", createWindowStateStorage);
75 qmlRegisterType<InputWatcher>(uri, 0, 1, "InputWatcher");
76 qmlRegisterSingletonType<Constants>(uri, 0, 1, "Constants", createConstants);
79void FakeUtilsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
81 QQmlExtensionPlugin::initializeEngine(engine, uri);
83 engine->addImageProvider(QLatin1String("window"), new WindowScreenshotProvider);
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