My Project
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros
LauncherItemInterface.h
1 /*
2  * Copyright 2013 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  * Authors:
17  * Michael Zanetti <michael.zanetti@canonical.com>
18  */
19 
20 #ifndef UNITY_SHELL_LAUNCHER_LAUNCHERITEM_H
21 #define UNITY_SHELL_LAUNCHER_LAUNCHERITEM_H
22 
23 #include <unity/SymbolExport.h>
24 
25 #include <QtCore/QObject>
26 
27 namespace unity
28 {
29 namespace shell
30 {
31 namespace launcher
32 {
33 
34 class QuickListModelInterface;
35 
43 class UNITY_API LauncherItemInterface: public QObject
44 {
45  Q_OBJECT
46 
50  Q_PROPERTY(QString appId READ appId CONSTANT)
51 
52 
55  Q_PROPERTY(QString name READ name CONSTANT)
56 
57 
60  Q_PROPERTY(QString icon READ icon CONSTANT)
61 
62 
65  Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
66 
67 
70  Q_PROPERTY(bool running READ running NOTIFY runningChanged)
71 
72 
75  Q_PROPERTY(bool recent READ recent NOTIFY recentChanged)
76 
77 
83  Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
84 
85 
91  Q_PROPERTY(int count READ count NOTIFY countChanged)
92 
93 
98  Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged())
99 
100 
107  Q_PROPERTY(unity::shell::launcher::QuickListModelInterface* quickList READ quickList CONSTANT)
108 
109 protected:
111  LauncherItemInterface(QObject *parent = 0): QObject(parent) {}
112 
113 public:
114  virtual ~LauncherItemInterface() {}
115 
116  virtual QString appId() const = 0;
117  virtual QString name() const = 0;
118  virtual QString icon() const = 0;
119  virtual bool pinned() const = 0;
120  virtual bool running() const = 0;
121  virtual bool recent() const = 0;
122  virtual int progress() const = 0;
123  virtual int count() const = 0;
124  virtual bool focused() const = 0;
125  virtual unity::shell::launcher::QuickListModelInterface *quickList() const = 0;
126 
127 Q_SIGNALS:
128  void pinnedChanged(bool pinned);
129  void runningChanged(bool running);
130  void recentChanged(bool running);
131  void progressChanged(int progress);
132  void countChanged(int count);
133  void focusedChanged(bool focused);
135 };
136 
137 } // namespace launcher
138 } // namespace shell
139 } // namespace unity
140 
141 #endif // UNITY_SHELL_LAUNCHER_LAUNCHERITEMINTERFACE_H
Top-level namespace for all things Unity-related.
Definition: Version.h:37
An item presented in the launcher.
Definition: LauncherItemInterface.h:43
A model containing QuickList actions for an application in the launcher.
Definition: QuickListModelInterface.h:42