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("../../tests/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
70bool MockLauncherItem::pinned() const
75void MockLauncherItem::setPinned(bool pinned)
77 if (m_pinned != pinned)
80 Q_EMIT pinnedChanged(m_pinned);
84bool MockLauncherItem::running() const
89void MockLauncherItem::setRunning(bool running)
91 if (m_running != running)
94 Q_EMIT runningChanged(running);
98bool MockLauncherItem::recent() const
103void MockLauncherItem::setRecent(bool recent)
105 if (m_recent != recent)
108 Q_EMIT recentChanged(recent);
112int MockLauncherItem::progress() const
117void MockLauncherItem::setProgress(int progress)
119 if (m_progress != progress)
121 m_progress = progress;
122 Q_EMIT progressChanged(progress);
126int MockLauncherItem::count() const
131void MockLauncherItem::setCount(int count)
133 if (m_count != count)
136 Q_EMIT countChanged(count);
137 if (m_countVisible) {
143bool MockLauncherItem::countVisible() const
145 return m_countVisible;
148void MockLauncherItem::setCountVisible(bool countVisible)
150 if (m_countVisible != countVisible) {
151 m_countVisible = countVisible;
152 Q_EMIT countVisibleChanged(countVisible);
159bool MockLauncherItem::focused() const
164void MockLauncherItem::setFocused(bool focused)
166 if (m_focused != focused)
169 Q_EMIT focusedChanged(focused);
173bool MockLauncherItem::alerting() const
178void MockLauncherItem::setAlerting(bool alerting)
180 if (m_alerting != alerting) {
181 m_alerting = alerting;
182 Q_EMIT alertingChanged(alerting);
186int MockLauncherItem::surfaceCount() const
188 return m_surfaceCount;
191void MockLauncherItem::setSurfaceCount(int surfaceCount)
193 if (m_surfaceCount != surfaceCount) {
194 m_surfaceCount = surfaceCount;
195 Q_EMIT surfaceCountChanged(surfaceCount);
199unity::shell::launcher::QuickListModelInterface *MockLauncherItem::quickList() const
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