on bbbdccd help sign in
unity8/tests/mocks/Unity/Launcher/MockLauncherItem.h
79 lines 2.3 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 MOCKLAUNCHERITEM_H
21#define MOCKLAUNCHERITEM_H
23#include <unity/shell/launcher/LauncherItemInterface.h>
25class MockQuickListModel;
27using namespace unity::shell::launcher;
29class MockLauncherItem: public LauncherItemInterface
31 Q_OBJECT
32public:
33 MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent = 0);
34 ~MockLauncherItem();
36 QString appId() const override;
37 QString desktopFile() const;
38 QString name() const override;
39 QString icon() const override;
41 bool pinned() const override;
42 bool running() const override;
43 bool recent() const override;
44 int progress() const override;
45 int count() const override;
46 bool countVisible() const override;
47 bool focused() const override;
48 bool alerting() const override;
50 unity::shell::launcher::QuickListModelInterface *quickList() const override;
52private:
53 void setPinned(bool pinned);
54 void setRunning(bool running);
55 void setRecent(bool recent);
56 void setProgress(int progress);
57 void setCount(int count);
58 void setCountVisible(bool countVisible);
59 void setFocused(bool focused);
60 void setAlerting(bool alerting);
62 QString m_appId;
63 QString m_desktopFile;
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 MockQuickListModel *m_quickList;
76 friend class MockLauncherModel;
77};
79#endif // MOCKLAUNCHERITEM_H