/*
* Copyright (C) 2015 Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
// Qt
#include
#include
#include
#include
#include
// local
#include "plugin.h"
#include "windowstatestorage.h"
#include "constants.h"
// plugin
#include
#include
#include
#include
#include
#include
#include
#include
static QObject *createWindowStateStorage(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return new WindowStateStorage();
}
static QObject *createConstants(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return new Constants();
}
void FakeUtilsPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("Utils"));;
qmlRegisterType();
qmlRegisterType(uri, 0, 1, "LimitProxyModel");
qmlRegisterType(uri, 0, 1, "UnitySortFilterProxyModel");
qmlRegisterType(uri, 0, 1, "UnityMenuModelPaths");
qmlRegisterType(uri, 0, 1, "TimeFormatter");
qmlRegisterType(uri, 0, 1, "WindowKeysFilter");
qmlRegisterType(uri, 0, 1, "GDateTimeFormatter");
qmlRegisterType(uri, 0, 1, "EasingCurve");
qmlRegisterType(uri, 0, 1, "RelativeTimeFormatter");
qmlRegisterSingletonType(uri, 0, 1, "WindowStateStorage", createWindowStateStorage);
qmlRegisterType(uri, 0, 1, "InputWatcher");
qmlRegisterSingletonType(uri, 0, 1, "Constants", createConstants);
}
void FakeUtilsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
QQmlExtensionPlugin::initializeEngine(engine, uri);
}