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 * Renato Araujo Oliveira Filho <renato@canonical.com>
20#ifndef INDICATORCLIENTININTERFACE_H
21#define INDICATORCLIENTININTERFACE_H
27#include <QQmlComponent>
33class IndicatorClientInterface
36 typedef QMap<QString, QVariant> PropertiesMap;
37 typedef QMap<QString, QUrl> WidgetsMap;
39 typedef std::shared_ptr<IndicatorClientInterface> Ptr;
41 enum IndicatorPriority {
49 * @brief This fuction will be called by PluginManager after create the plugin object
50 * @param config The dbus configuration used by this plugin
52 virtual void init(const QSettings& settings) = 0;
55 * @brief This function will be called by PluginManager before destroy the plugin
57 virtual void shutdown() = 0;
60 * @brief Used to retrieve the current plugin identifier
61 * @return The identifier
63 * This function can be used to retrieve the indicator identifier
65 virtual QString identifier() const = 0;
68 * @brief Used to retrieve the current plugin icon
69 * @return The icon url
71 * This function can be used to retrieve the indicator icon which will appear on the panel
73 virtual QUrl icon() const = 0;
76 * @brief Used to retrieve the current plugin title
79 * This function can be used to retrieve the indicator title which can be used as plugin name on the menu
81 virtual QString title() const = 0;
84 * @brief Used to retrieve the current plugin label
87 * This function can be used to retrieve the indicator label which can appear in the panel
89 virtual QString label() const = 0;
92 * @brief Used to retrieve the current plugin label
95 * This function can be used to retrieve the indicator description which can appear in the panel
97 virtual QString description() const = 0;
100 * @brief Used to retrieve the current plugin visibility
101 * @return The visibility
103 * This function can be used to retrieve the indicator is visible on the panel or not
105 virtual bool visible() const = 0;
108 * @brief Used to retrieve the current plugin accessible name
109 * @return The accessible name is plugin name as seen by assistive technologies
111 virtual QString accessibleName() const = 0;
115 * @brief Used to retrieve the current plugin priority
116 * @return The priorty value for the plugin, this will be used to arrange the plugin on the indicator panel
118 virtual int priority() const = 0;
122 * @brief Used to retrieve the plugin initial component
123 * @param engine The current \l QDeclarativeEngine used to parse the componente code
124 * @param parent The parent of the returned object
125 * @return A new \l QDeclarativeComponent with the initial plugin view
127 virtual QQmlComponent *component(QQmlEngine *engine, QObject *parent=0) = 0;
130 * @brief Used during the plugin Component instanciation to set the initial properties
131 * @return The map with the initial property and value: {'property-name' : property-value}
134 virtual PropertiesMap initialProperties() = 0;
137 * @brief The plugin should implement this function to return the custom widgets
138 * implemente by the plugin
139 * @return The map with the widget name and url: {'WifiAccessPointItem' : 'wifi-widget.qml'}
141 virtual WidgetsMap widgets() = 0;
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