2 * Copyright 2012 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 * Renato Araujo Oliveira Filho <renato@canonical.com>
20#include "widgetsmap.h"
26 \brief The WidgetsMap class defines a auxiliary map class with all widgets registered by the plugins.
28 \b {This component is under heavy development.}
33 baseDir: "/usr/share/indicators"
39 delegate: menuModel.widgetsMap.find("myWidget")
40 Component.onCompleted: menuModel.load()
44WidgetsMap::WidgetsMap(QObject *parent)
50void WidgetsMap::append(WidgetsMapType types)
52 Q_FOREACH(QString key, types.keys()) {
53 m_map.insert(key, types[key]);
58void WidgetsMap::clear()
64 \qmlmethod WidgetsMap::map()
66 Return a QVariantMap with the WidgetsMap contents.
68WidgetsMapType WidgetsMap::map() const
74 \qmlmethod WidgetsMap::find(QString widgetType)
76 Look for a widgetType registered by any plugin and return the file that represent
77 this type, or a empty QUrl if the type does not exists.
79QUrl WidgetsMap::find(const QString &widget) const
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