2 * Copyright 2013 Canonical Ltd.
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.
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.
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/>.
17 * Michael Zanetti <michael.zanetti@canonical.com>
20#include "MockLauncherItem.h"
21#include "MockQuickListModel.h"
25using namespace unity::shell::launcher;
27MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent):
28 LauncherItemInterface(parent),
30 m_desktopFile(desktopFile),
32 m_icon(testDataDir() + "/graphics/applicationIcons/" + icon + ".png"),
38 m_countVisible(false),
42 m_quickList(new MockQuickListModel(this))
46MockLauncherItem::~MockLauncherItem()
50QString MockLauncherItem::appId() const
55QString MockLauncherItem::desktopFile() const
60QString MockLauncherItem::name() const
65QString MockLauncherItem::icon() const
70QStringList MockLauncherItem::keywords() const
75uint MockLauncherItem::popularity() const
80bool MockLauncherItem::pinned() const
85void MockLauncherItem::setPinned(bool pinned)
87 if (m_pinned != pinned)
90 Q_EMIT pinnedChanged(m_pinned);
94bool MockLauncherItem::running() const
99void MockLauncherItem::setRunning(bool running)
101 if (m_running != running)
104 Q_EMIT runningChanged(running);
108bool MockLauncherItem::recent() const
113void MockLauncherItem::setRecent(bool recent)
115 if (m_recent != recent)
118 Q_EMIT recentChanged(recent);
122int MockLauncherItem::progress() const
127void MockLauncherItem::setProgress(int progress)
129 if (m_progress != progress)
131 m_progress = progress;
132 Q_EMIT progressChanged(progress);
136int MockLauncherItem::count() const
141void MockLauncherItem::setCount(int count)
143 if (m_count != count)
146 Q_EMIT countChanged(count);
147 if (m_countVisible) {
153bool MockLauncherItem::countVisible() const
155 return m_countVisible;
158void MockLauncherItem::setCountVisible(bool countVisible)
160 if (m_countVisible != countVisible) {
161 m_countVisible = countVisible;
162 Q_EMIT countVisibleChanged(countVisible);
169bool MockLauncherItem::focused() const
174void MockLauncherItem::setFocused(bool focused)
176 if (m_focused != focused)
179 Q_EMIT focusedChanged(focused);
183bool MockLauncherItem::alerting() const
188void MockLauncherItem::setAlerting(bool alerting)
190 if (m_alerting != alerting) {
191 m_alerting = alerting;
192 Q_EMIT alertingChanged(alerting);
196int MockLauncherItem::surfaceCount() const
198 return m_surfaceCount;
201void MockLauncherItem::setSurfaceCount(int surfaceCount)
203 if (m_surfaceCount != surfaceCount) {
204 m_surfaceCount = surfaceCount;
205 Q_EMIT surfaceCountChanged(surfaceCount);
209void MockLauncherItem::setPopularity(uint popularity)
211 if (m_popularity != popularity) {
212 m_popularity = popularity;
213 Q_EMIT popularityChanged(m_popularity);
217unity::shell::launcher::QuickListModelInterface *MockLauncherItem::quickList() const
222void MockLauncherItem::setKeywords(const QStringList &keywords)
224 if (m_keywords != keywords) {
225 m_keywords = keywords;
226 Q_EMIT keywordsChanged(keywords);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list