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 icon
61 * @return The icon url
63 * This function can be used to retrieve the indicator icon which will appear on the panel
65 virtual QUrl icon() const = 0;
69 * @brief Used to retrieve the current plugin title
72 * This function can be used to retrieve the indicator title which can be used as plugin name on the menu
74 virtual QString title() const = 0;
77 * @brief Used to retrieve the current plugin label
80 * This function can be used to retrieve the indicator label which can appear in the panel
82 virtual QString label() const = 0;
85 * @brief Used to retrieve the current plugin label
88 * This function can be used to retrieve the indicator description which can appear in the panel
90 virtual QString description() const = 0;
93 * @brief Used to retrieve the current plugin visibility
94 * @return The visibility
96 * This function can be used to retrieve the indicator is visible on the panel or not
98 virtual bool visible() const = 0;
101 * @brief Used to retrieve the current plugin accessible name
102 * @return The accessible name is plugin name as seen by assistive technologies
104 virtual QString accessibleName() const = 0;
108 * @brief Used to retrieve the current plugin priority
109 * @return The priorty value for the plugin, this will be used to arrange the plugin on the indicator panel
111 virtual int priority() const = 0;
115 * @brief Used to retrieve the plugin initial component
116 * @param engine The current \l QDeclarativeEngine used to parse the componente code
117 * @param parent The parent of the returned object
118 * @return A new \l QDeclarativeComponent with the initial plugin view
120 virtual QQmlComponent *component(QQmlEngine *engine, QObject *parent=0) = 0;
123 * @brief Used during the plugin Component instanciation to set the initial properties
124 * @return The map with the initial property and value: {'property-name' : property-value}
127 virtual PropertiesMap initialProperties() = 0;
130 * @brief The plugin should implement this function to return the custom widgets
131 * implemente by the plugin
132 * @return The map with the widget name and url: {'WifiAccessPointItem' : 'wifi-widget.qml'}
134 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