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 UNITY_SHELL_LAUNCHER_LAUNCHERITEM_H
18#define UNITY_SHELL_LAUNCHER_LAUNCHERITEM_H
19
20#include <unity/SymbolExport.h>
21
22#include <QtCore/QObject>
23
24namespace unity
25{
26namespace shell
27{
28namespace launcher
29{
30
32
39
40class UNITY_API LauncherItemInterface: public QObject
41{
42 Q_OBJECT
43
47 Q_PROPERTY(QString appId READ appId CONSTANT)
48
49
52 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
53
57 Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
58
62 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
63
67 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
68
72 Q_PROPERTY(bool running READ running NOTIFY runningChanged)
73
77 Q_PROPERTY(bool recent READ recent NOTIFY recentChanged)
78
85 Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
86
93 Q_PROPERTY(int count READ count NOTIFY countChanged)
94
100 Q_PROPERTY(bool countVisible READ countVisible NOTIFY countVisibleChanged)
101
107 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
108
114 Q_PROPERTY(bool alerting READ alerting NOTIFY alertingChanged)
115
121 Q_PROPERTY(int surfaceCount READ surfaceCount NOTIFY surfaceCountChanged)
122
130 Q_PROPERTY(unity::shell::launcher::QuickListModelInterface* quickList READ quickList CONSTANT)
131
132protected:
134 LauncherItemInterface(QObject *parent = 0): QObject(parent) {}
135
136public:
137 virtual ~LauncherItemInterface() {}
138
139 virtual QString appId() const = 0;
140 virtual QString name() const = 0;
141 virtual QString icon() const = 0;
142 virtual QStringList keywords() const = 0;
143 virtual bool pinned() const = 0;
144 virtual bool running() const = 0;
145 virtual bool recent() const = 0;
146 virtual int progress() const = 0;
147 virtual int count() const = 0;
148 virtual bool countVisible() const = 0;
149 virtual bool focused() const = 0;
150 virtual bool alerting() const = 0;
151 virtual int surfaceCount() const = 0;
152 virtual unity::shell::launcher::QuickListModelInterface *quickList() const = 0;
153
154Q_SIGNALS:
155 void nameChanged(const QString &name);
156 void iconChanged(const QString &icon);
157 void keywordsChanged(const QStringList &keywords);
158 void pinnedChanged(bool pinned);
159 void runningChanged(bool running);
160 void recentChanged(bool running);
161 void progressChanged(int progress);
162 void countChanged(int count);
163 void countVisibleChanged(bool countVisible);
164 void focusedChanged(bool focused);
165 void alertingChanged(bool alerting);
166 void surfaceCountChanged(int surfaceCount);
168};
169
170} // namespace launcher
171} // namespace shell
172} // namespace unity
173
174#endif // UNITY_SHELL_LAUNCHER_LAUNCHERITEMINTERFACE_H
An item presented in the launcher.
Definition LauncherItemInterface.h:41
int surfaceCount
The number of surfaces that this application entry has opened.
Definition LauncherItemInterface.h:121
bool alerting
The alerting state of the item.
Definition LauncherItemInterface.h:114
QString name
The user visible name of the item.
Definition LauncherItemInterface.h:52
bool running
A flag whether the application belonging to the icon is currently running or not.
Definition LauncherItemInterface.h:72
int progress
The percentage of the progress bar shown on the item.
Definition LauncherItemInterface.h:85
unity::shell::launcher::QuickListModelInterface * quickList
The quick list menu contents for the item.
Definition LauncherItemInterface.h:130
bool pinned
A flag whether the item is pinned or not.
Definition LauncherItemInterface.h:67
bool recent
A flag wheter the application is in the recently used applications list.
Definition LauncherItemInterface.h:77
bool focused
The focused state of the item.
Definition LauncherItemInterface.h:107
int count
The number for the count emblem on the item.
Definition LauncherItemInterface.h:93
bool countVisible
The visibility of the count emblem.
Definition LauncherItemInterface.h:100
QStringList keywords
The keywords for this item.
Definition LauncherItemInterface.h:62
QString icon
The full path to the icon to be shown for the item.
Definition LauncherItemInterface.h:57
QString appId
The appId of the application associated with the item.
Definition LauncherItemInterface.h:47
A model containing QuickList actions for an application in the launcher.
Definition QuickListModelInterface.h:45
Top-level namespace for all things Unity-related.
Definition Version.h:38