My Project
Loading...
Searching...
No Matches
LauncherItemInterface.h
1/*
2 * Copyright 2013-2106 Canonical Ltd.
3 *
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.
7 *
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.
12 *
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/>.
15 */
16
17#ifndef LOMIRI_SHELL_LAUNCHER_LAUNCHERITEM_H
18#define LOMIRI_SHELL_LAUNCHER_LAUNCHERITEM_H
19
20#include <lomiri/SymbolExport.h>
21
22#include <QtCore/QObject>
23
24#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
25Q_MOC_INCLUDE("QuickListModelInterface.h")
26#endif
27
28namespace lomiri
29{
30namespace shell
31{
32namespace launcher
33{
34
36
43
44class LOMIRI_API LauncherItemInterface: public QObject
45{
46 Q_OBJECT
47
51 Q_PROPERTY(QString appId READ appId CONSTANT)
52
53
56 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
57
61 Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
62
66 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
67
71 Q_PROPERTY(uint popularity READ popularity NOTIFY popularityChanged)
72
76 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
77
81 Q_PROPERTY(bool running READ running NOTIFY runningChanged)
82
86 Q_PROPERTY(bool recent READ recent NOTIFY recentChanged)
87
94 Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
95
102 Q_PROPERTY(int count READ count NOTIFY countChanged)
103
109 Q_PROPERTY(bool countVisible READ countVisible NOTIFY countVisibleChanged)
110
116 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
117
123 Q_PROPERTY(bool alerting READ alerting NOTIFY alertingChanged)
124
130 Q_PROPERTY(int surfaceCount READ surfaceCount NOTIFY surfaceCountChanged)
131
139 Q_PROPERTY(lomiri::shell::launcher::QuickListModelInterface* quickList READ quickList CONSTANT)
140
141protected:
143 LauncherItemInterface(QObject *parent = 0): QObject(parent) {}
144
145public:
146 virtual ~LauncherItemInterface() {}
147
148 virtual QString appId() const = 0;
149 virtual QString name() const = 0;
150 virtual QString icon() const = 0;
151 virtual QStringList keywords() const = 0;
152 virtual uint popularity() const = 0;
153 virtual bool pinned() const = 0;
154 virtual bool running() const = 0;
155 virtual bool recent() const = 0;
156 virtual int progress() const = 0;
157 virtual int count() const = 0;
158 virtual bool countVisible() const = 0;
159 virtual bool focused() const = 0;
160 virtual bool alerting() const = 0;
161 virtual int surfaceCount() const = 0;
162 virtual lomiri::shell::launcher::QuickListModelInterface *quickList() const = 0;
163
164Q_SIGNALS:
165 void nameChanged(const QString &name);
166 void iconChanged(const QString &icon);
167 void keywordsChanged(const QStringList &keywords);
168 void popularityChanged(uint popularity);
169 void pinnedChanged(bool pinned);
170 void runningChanged(bool running);
171 void recentChanged(bool running);
172 void progressChanged(int progress);
173 void countChanged(int count);
174 void countVisibleChanged(bool countVisible);
175 void focusedChanged(bool focused);
176 void alertingChanged(bool alerting);
177 void surfaceCountChanged(int surfaceCount);
179};
180
181} // namespace launcher
182} // namespace shell
183} // namespace lomiri
184
185#endif // LOMIRI_SHELL_LAUNCHER_LAUNCHERITEMINTERFACE_H
An item presented in the launcher.
Definition LauncherItemInterface.h:45
uint popularity
The popularity of this application, e.g. usage count given by Zeitgeist.
Definition LauncherItemInterface.h:71
bool running
A flag whether the application belonging to the icon is currently running or not.
Definition LauncherItemInterface.h:81
lomiri::shell::launcher::QuickListModelInterface * quickList
The quick list menu contents for the item.
Definition LauncherItemInterface.h:139
int count
The number for the count emblem on the item.
Definition LauncherItemInterface.h:102
bool focused
The focused state of the item.
Definition LauncherItemInterface.h:116
QString icon
The full path to the icon to be shown for the item.
Definition LauncherItemInterface.h:61
QString name
The user visible name of the item.
Definition LauncherItemInterface.h:56
QStringList keywords
The keywords for this item.
Definition LauncherItemInterface.h:66
QString appId
The appId of the application associated with the item.
Definition LauncherItemInterface.h:51
bool recent
A flag wheter the application is in the recently used applications list.
Definition LauncherItemInterface.h:86
int progress
The percentage of the progress bar shown on the item.
Definition LauncherItemInterface.h:94
bool pinned
A flag whether the item is pinned or not.
Definition LauncherItemInterface.h:76
bool alerting
The alerting state of the item.
Definition LauncherItemInterface.h:123
bool countVisible
The visibility of the count emblem.
Definition LauncherItemInterface.h:109
int surfaceCount
The number of surfaces that this application entry has opened.
Definition LauncherItemInterface.h:130
A model containing QuickList actions for an application in the launcher.
Definition QuickListModelInterface.h:45
Top-level namespace for all things Lomiri-related.
Definition Version.h:38