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),
41 m_quickList(new MockQuickListModel(this))
45MockLauncherItem::~MockLauncherItem()
49QString MockLauncherItem::appId() const
54QString MockLauncherItem::desktopFile() const
59QString MockLauncherItem::name() const
64QString MockLauncherItem::icon() const
69bool MockLauncherItem::pinned() const
74void MockLauncherItem::setPinned(bool pinned)
76 if (m_pinned != pinned)
79 Q_EMIT pinnedChanged(m_pinned);
83bool MockLauncherItem::running() const
88void MockLauncherItem::setRunning(bool running)
90 if (m_running != running)
93 Q_EMIT runningChanged(running);
97bool MockLauncherItem::recent() const
102void MockLauncherItem::setRecent(bool recent)
104 if (m_recent != recent)
107 Q_EMIT recentChanged(recent);
111int MockLauncherItem::progress() const
116void MockLauncherItem::setProgress(int progress)
118 if (m_progress != progress)
120 m_progress = progress;
121 Q_EMIT progressChanged(progress);
125int MockLauncherItem::count() const
130void MockLauncherItem::setCount(int count)
132 if (m_count != count)
135 Q_EMIT countChanged(count);
136 if (m_countVisible) {
142bool MockLauncherItem::countVisible() const
144 return m_countVisible;
147void MockLauncherItem::setCountVisible(bool countVisible)
149 if (m_countVisible != countVisible) {
150 m_countVisible = countVisible;
151 Q_EMIT countVisibleChanged(countVisible);
158bool MockLauncherItem::focused() const
163void MockLauncherItem::setFocused(bool focused)
165 if (m_focused != focused)
168 Q_EMIT focusedChanged(focused);
172bool MockLauncherItem::alerting() const
177void MockLauncherItem::setAlerting(bool alerting)
179 if (m_alerting != alerting) {
180 m_alerting = alerting;
181 Q_EMIT alertingChanged(alerting);
185unity::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