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(qmlDirectory() + "graphics/applicationIcons/" + icon + ".png"),
38 m_countVisible(false),
41 m_quickList(new MockQuickListModel(this))
46QString MockLauncherItem::appId() const
51QString MockLauncherItem::desktopFile() const
56QString MockLauncherItem::name() const
61QString MockLauncherItem::icon() const
66bool MockLauncherItem::pinned() const
71void MockLauncherItem::setPinned(bool pinned)
73 if (m_pinned != pinned)
76 Q_EMIT pinnedChanged(m_pinned);
80bool MockLauncherItem::running() const
85void MockLauncherItem::setRunning(bool running)
87 if (m_running != running)
90 Q_EMIT runningChanged(running);
94bool MockLauncherItem::recent() const
99void MockLauncherItem::setRecent(bool recent)
101 if (m_recent != recent)
104 Q_EMIT recentChanged(recent);
108int MockLauncherItem::progress() const
113void MockLauncherItem::setProgress(int progress)
115 if (m_progress != progress)
117 m_progress = progress;
118 Q_EMIT progressChanged(progress);
122int MockLauncherItem::count() const
127void MockLauncherItem::setCount(int count)
129 if (m_count != count)
132 Q_EMIT countChanged(count);
136bool MockLauncherItem::countVisible() const
138 return m_countVisible;
141void MockLauncherItem::setCountVisible(bool countVisible)
143 if (m_countVisible != countVisible) {
144 m_countVisible = countVisible;
145 Q_EMIT countVisibleChanged(countVisible);
149bool MockLauncherItem::focused() const
154void MockLauncherItem::setFocused(bool focused)
156 if (m_focused != focused)
159 Q_EMIT focusedChanged(focused);
163bool MockLauncherItem::alerting() const
168void MockLauncherItem::setAlerting(bool alerting)
170 if (m_alerting != alerting)
172 m_alerting = alerting;
173 Q_EMIT alertingChanged(alerting);
177unity::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