on 893395c help sign in
80 lines 2.3 kB history raw
1/*
2 * Copyright 2014-2015 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 */
17#ifndef LAUNCHERITEM_H
18#define LAUNCHERITEM_H
20#include "quicklistmodel.h"
22#include <unity/shell/launcher/LauncherItemInterface.h>
24class QuickListModel;
26using namespace unity::shell::launcher;
28class LauncherItem: public LauncherItemInterface
30 Q_OBJECT
31public:
32 LauncherItem(const QString &appId, const QString &name, const QString &icon, QObject *parent = 0);
34 QString appId() const override;
35 QString name() const override;
36 QString icon() const override;
37 bool pinned() const override;
38 bool running() const override;
39 bool recent() const override;
40 int progress() const override;
41 int count() const override;
42 bool countVisible() const override;
43 bool focused() const override;
44 bool alerting() const override;
45 int surfaceCount() const override;
47 unity::shell::launcher::QuickListModelInterface *quickList() const override;
49private:
50 void setName(const QString &name);
51 void setIcon(const QString &icon);
52 void setPinned(bool pinned);
53 void setRunning(bool running);
54 void setRecent(bool recent);
55 void setProgress(int progress);
56 void setCount(int count);
57 void setCountVisible(bool countVisible);
58 void setFocused(bool focused);
59 void setAlerting(bool alerting);
60 void setSurfaceCount(int surfaceCount);
62private:
63 QString m_appId;
64 QString m_name;
65 QString m_icon;
66 bool m_pinned;
67 bool m_running;
68 bool m_recent;
69 int m_progress;
70 int m_count;
71 bool m_countVisible;
72 bool m_focused;
73 bool m_alerting;
74 int m_surfaceCount;
75 QuickListModel *m_quickList;
77 friend class LauncherModel;
78};
80#endif // LAUNCHERITEM_H