/* * Copyright 2013 Canonical Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . * * Authors: * Nick Dedekind */ // Qt #include // self #include "plugin.h" // local #include "actionrootstate.h" #include "indicators.h" #include "indicatorsmanager.h" #include "indicatorsmodel.h" #include "menucontentactivator.h" #include "modelactionrootstate.h" #include "modelprinter.h" #include "sharedunitymenumodel.h" #include "unitymenumodelcache.h" #include "unitymenumodelstack.h" #include static QObject* menuModelCacheSingleton(QQmlEngine* engine, QJSEngine* scriptEngine) { Q_UNUSED(engine); Q_UNUSED(scriptEngine); return UnityMenuModelCache::singleton(); } void IndicatorsPlugin::registerTypes(const char *uri) { qRegisterMetaType("UnityMenuModel*"); qmlRegisterType(uri, 0, 1, "IndicatorsManager"); qmlRegisterType(uri, 0, 1, "IndicatorsModel"); qmlRegisterType(uri, 0, 1, "MenuContentActivator"); qmlRegisterType(uri, 0, 1, "UnityMenuModelStack"); qmlRegisterType(uri, 0, 1, "ModelActionRootState"); qmlRegisterType(uri, 0, 1, "ActionRootState"); qmlRegisterType(uri, 0, 1, "ModelPrinter"); qmlRegisterType(uri, 0, 1, "SharedUnityMenuModel"); qmlRegisterSingletonType(uri, 0, 1, "UnityMenuModelCache", menuModelCacheSingleton); qmlRegisterUncreatableType(uri, 0, 1, "MenuContentState", QStringLiteral("Can't create MenuContentState class")); qmlRegisterUncreatableType(uri, 0, 1, "ActionState", QStringLiteral("Can't create ActionState class")); qmlRegisterUncreatableType(uri, 0, 1, "NetworkActionState", QStringLiteral("Can't create NetworkActionState class")); qmlRegisterUncreatableType(uri, 0, 1, "NetworkConnection", QStringLiteral("Can't create NetworkConnection class")); qmlRegisterUncreatableType(uri, 0, 1, "IndicatorsModelRole", QStringLiteral("Can't create IndicatorsModelRole class")); qmlRegisterUncreatableType(uri, 0, 1, "FlatMenuProxyModelRole", QStringLiteral("Can't create FlatMenuProxyModelRole class")); }