| 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 <[email protected]> |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef MOCKLAUNCHERITEM_H |
| 21 |
#define MOCKLAUNCHERITEM_H |
| 22 |
|
| 23 |
#include <lomiri/shell/launcher/LauncherItemInterface.h> |
| 24 |
|
| 25 |
#include <QStringList> |
| 26 |
|
| 27 |
class MockQuickListModel; |
| 28 |
|
| 29 |
using namespace lomiri::shell::launcher; |
| 30 |
|
| 31 |
class MockLauncherItem: public LauncherItemInterface |
| 32 |
{ |
| 33 |
Q_OBJECT |
| 34 |
public: |
| 35 |
MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent = 0); |
| 36 |
~MockLauncherItem(); |
| 37 |
|
| 38 |
QString appId() const override; |
| 39 |
QString desktopFile() const; |
| 40 |
QString name() const override; |
| 41 |
QString icon() const override; |
| 42 |
QStringList keywords() const override; |
| 43 |
uint popularity() const override; |
| 44 |
|
| 45 |
bool pinned() const override; |
| 46 |
bool running() const override; |
| 47 |
bool recent() const override; |
| 48 |
int progress() const override; |
| 49 |
int count() const override; |
| 50 |
bool countVisible() const override; |
| 51 |
bool focused() const override; |
| 52 |
bool alerting() const override; |
| 53 |
int surfaceCount() const override; |
| 54 |
|
| 55 |
lomiri::shell::launcher::QuickListModelInterface *quickList() const override; |
| 56 |
|
| 57 |
private: |
| 58 |
void setKeywords(const QStringList &keywords); |
| 59 |
void setPopularity(uint popularity); |
| 60 |
void setPinned(bool pinned); |
| 61 |
void setRunning(bool running); |
| 62 |
void setRecent(bool recent); |
| 63 |
void setProgress(int progress); |
| 64 |
void setCount(int count); |
| 65 |
void setCountVisible(bool countVisible); |
| 66 |
void setFocused(bool focused); |
| 67 |
void setAlerting(bool alerting); |
| 68 |
void setSurfaceCount(int surfaceCount); |
| 69 |
|
| 70 |
QString m_appId; |
| 71 |
QString m_desktopFile; |
| 72 |
QString m_name; |
| 73 |
QString m_icon; |
| 74 |
QStringList m_keywords; |
| 75 |
uint m_popularity; |
| 76 |
bool m_pinned; |
| 77 |
bool m_running; |
| 78 |
bool m_recent; |
| 79 |
int m_progress; |
| 80 |
int m_count; |
| 81 |
bool m_countVisible; |
| 82 |
bool m_focused; |
| 83 |
bool m_alerting; |
| 84 |
int m_surfaceCount; |
| 85 |
MockQuickListModel *m_quickList; |
| 86 |
|
| 87 |
friend class MockLauncherModel; |
| 88 |
friend class MockAppDrawerModel; |
| 89 |
}; |
| 90 |
|
| 91 |
#endif // MOCKLAUNCHERITEM_H |