Unity 8
 All Classes Functions Properties
launcheritem.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 LAUNCHERITEM_H
21 #define LAUNCHERITEM_H
22 
23 #include "quicklistmodel.h"
24 
25 #include <unity/shell/launcher/LauncherItemInterface.h>
26 
27 class QuickListModel;
28 
29 using namespace unity::shell::launcher;
30 
31 class LauncherItem: public LauncherItemInterface
32 {
33  Q_OBJECT
34 public:
35  LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);
36 
37  QString appId() const;
38  QString name() const;
39  QString icon() const;
40 
41  bool pinned() const;
42  void setPinned(bool pinned);
43 
44  bool running() const;
45  void setRunning(bool running);
46 
47  bool recent() const;
48  void setRecent(bool recent);
49 
50  int progress() const;
51  void setProgress(int progress);
52 
53  int count() const;
54  void setCount(int count);
55 
56  bool focused() const;
57  void setFocused(bool focused);
58 
59  unity::shell::launcher::QuickListModelInterface *quickList() const;
60 
61 Q_SIGNALS:
62  void favoriteChanged(bool favorite);
63  void runningChanged(bool running);
64 
65 private:
66  QString m_appId;
67  QString m_name;
68  QString m_icon;
69  bool m_pinned;
70  bool m_running;
71  bool m_recent;
72  int m_progress;
73  int m_count;
74  bool m_focused;
75  QuickListModel *m_quickList;
76 };
77 
78 #endif // LAUNCHERITEM_H