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
31class QuickListModelInterface;
32
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
54
57 Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
58
59
62 Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
63
64
67 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
68
69
72 Q_PROPERTY(bool running READ running NOTIFY runningChanged)
73
74
77 Q_PROPERTY(bool recent READ recent NOTIFY recentChanged)
78
79
85 Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
86
87
93 Q_PROPERTY(int count READ count NOTIFY countChanged)
94
95
100 Q_PROPERTY(bool countVisible READ countVisible NOTIFY countVisibleChanged)
101
102
107 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
108
109
114 Q_PROPERTY(bool alerting READ alerting NOTIFY alertingChanged)
115
116
121 Q_PROPERTY(int surfaceCount READ surfaceCount NOTIFY surfaceCountChanged)
122
123
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
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