My Project
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
24namespace lomiri
25{
26namespace shell
27{
28namespace launcher
29{
30
31class QuickListModelInterface;
32
40class LOMIRI_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(uint popularity READ popularity NOTIFY popularityChanged)
68
69
72 Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
73
74
77 Q_PROPERTY(bool running READ running NOTIFY runningChanged)
78
79
82 Q_PROPERTY(bool recent READ recent NOTIFY recentChanged)
83
84
90 Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
91
92
98 Q_PROPERTY(int count READ count NOTIFY countChanged)
99
100
105 Q_PROPERTY(bool countVisible READ countVisible NOTIFY countVisibleChanged)
106
107
112 Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
113
114
119 Q_PROPERTY(bool alerting READ alerting NOTIFY alertingChanged)
120
121
126 Q_PROPERTY(int surfaceCount READ surfaceCount NOTIFY surfaceCountChanged)
127
128
135 Q_PROPERTY(lomiri::shell::launcher::QuickListModelInterface* quickList READ quickList CONSTANT)
136
137protected:
139 LauncherItemInterface(QObject *parent = 0): QObject(parent) {}
140
141public:
142 virtual ~LauncherItemInterface() {}
143
144 virtual QString appId() const = 0;
145 virtual QString name() const = 0;
146 virtual QString icon() const = 0;
147 virtual QStringList keywords() const = 0;
148 virtual uint popularity() const = 0;
149 virtual bool pinned() const = 0;
150 virtual bool running() const = 0;
151 virtual bool recent() const = 0;
152 virtual int progress() const = 0;
153 virtual int count() const = 0;
154 virtual bool countVisible() const = 0;
155 virtual bool focused() const = 0;
156 virtual bool alerting() const = 0;
157 virtual int surfaceCount() const = 0;
158 virtual lomiri::shell::launcher::QuickListModelInterface *quickList() const = 0;
159
160Q_SIGNALS:
161 void nameChanged(const QString &name);
162 void iconChanged(const QString &icon);
163 void keywordsChanged(const QStringList &keywords);
164 void popularityChanged(uint popularity);
165 void pinnedChanged(bool pinned);
166 void runningChanged(bool running);
167 void recentChanged(bool running);
168 void progressChanged(int progress);
169 void countChanged(int count);
170 void countVisibleChanged(bool countVisible);
171 void focusedChanged(bool focused);
172 void alertingChanged(bool alerting);
173 void surfaceCountChanged(int surfaceCount);
175};
176
177} // namespace launcher
178} // namespace shell
179} // namespace lomiri
180
181#endif // LOMIRI_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 Lomiri-related.
Definition: Version.h:38