2 * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * Nick Dedekind <nick.dedekind@canonical.com>
21#include <QtQml/qqml.h>
27#include "actionrootstate.h"
28#include "indicators.h"
29#include "indicatorsmanager.h"
30#include "indicatorsmodel.h"
31#include "menucontentactivator.h"
32#include "modelactionrootstate.h"
33#include "modelprinter.h"
34#include "sharedunitymenumodel.h"
35#include "unitymenumodelcache.h"
36#include "unitymenumodelstack.h"
37#include "visibleindicatorsmodel.h"
39#include <unitymenumodel.h>
41static QObject* menuModelCacheSingleton(QQmlEngine* engine, QJSEngine* scriptEngine) {
43 Q_UNUSED(scriptEngine);
44 return UnityMenuModelCache::singleton();
47void IndicatorsPlugin::registerTypes(const char *uri)
49 qRegisterMetaType<UnityMenuModel*>("UnityMenuModel*");
51 qmlRegisterType<IndicatorsManager>(uri, 0, 1, "IndicatorsManager");
52 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
53 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
54 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
55 qmlRegisterType<ModelActionRootState>(uri, 0, 1, "ModelActionRootState");
56 qmlRegisterType<ActionRootState>(uri, 0, 1, "ActionRootState");
57 qmlRegisterType<ModelPrinter>(uri, 0, 1, "ModelPrinter");
58 qmlRegisterType<VisibleIndicatorsModel>(uri, 0, 1, "VisibleIndicatorsModel");
59 qmlRegisterType<SharedUnityMenuModel>(uri, 0, 1, "SharedUnityMenuModel");
61 qmlRegisterSingletonType<UnityMenuModelCache>(uri, 0, 1, "UnityMenuModelCache", menuModelCacheSingleton);
63 qmlRegisterUncreatableType<MenuContentState>(uri, 0, 1, "MenuContentState", "Can't create MenuContentState class");
64 qmlRegisterUncreatableType<ActionState>(uri, 0, 1, "ActionState", "Can't create ActionState class");
65 qmlRegisterUncreatableType<NetworkActionState>(uri, 0, 1, "NetworkActionState", "Can't create NetworkActionState class");
66 qmlRegisterUncreatableType<NetworkConnection>(uri, 0, 1, "NetworkConnection", "Can't create NetworkConnection class");
67 qmlRegisterUncreatableType<IndicatorsModelRole>(uri, 0, 1, "IndicatorsModelRole", "Can't create IndicatorsModelRole class");
68 qmlRegisterUncreatableType<FlatMenuProxyModelRole>(uri, 0, 1, "FlatMenuProxyModelRole", "Can't create FlatMenuProxyModelRole class");
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