on 2139c25 help sign in
unity8/plugins/Unity/Launcher/launcheritem.h
80 lines 2.0 kB history raw
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 */
20#ifndef LAUNCHERITEM_H
21#define LAUNCHERITEM_H
23#include "quicklistmodel.h"
25#include <unity/shell/launcher/LauncherItemInterface.h>
27class QuickListModel;
29using namespace unity::shell::launcher;
31class LauncherItem: public LauncherItemInterface
33 Q_OBJECT
34public:
35 LauncherItem(const QString &appId, const QString &desktopFile, const QString &name, const QString &icon, QObject *parent = 0);
37 QString appId() const;
38 QString desktopFile() const;
39 QString name() const;
40 QString icon() const;
42 bool pinned() const;
43 void setPinned(bool pinned);
45 bool running() const;
46 void setRunning(bool running);
48 bool recent() const;
49 void setRecent(bool recent);
51 int progress() const;
52 void setProgress(int progress);
54 int count() const;
55 void setCount(int count);
57 bool focused() const;
58 void setFocused(bool focused);
60 unity::shell::launcher::QuickListModelInterface *quickList() const;
62Q_SIGNALS:
63 void favoriteChanged(bool favorite);
64 void runningChanged(bool running);
66private:
67 QString m_appId;
68 QString m_desktopFile;
69 QString m_name;
70 QString m_icon;
71 bool m_pinned;
72 bool m_running;
73 bool m_recent;
74 int m_progress;
75 int m_count;
76 bool m_focused;
77 QuickListModel *m_quickList;
78};
80#endif // LAUNCHERITEM_H