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"
26using namespace unity::shell::launcher;
28MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent):
29 LauncherItemInterface(parent),
31 m_desktopFile(desktopFile),
33 m_icon(qmlDirectory() + "graphics/applicationIcons/" + icon + ".png"),
39 m_countVisible(false),
42 m_quickList(new MockQuickListModel(this))
47QString MockLauncherItem::appId() const
52QString MockLauncherItem::desktopFile() const
57QString MockLauncherItem::name() const
62QString MockLauncherItem::icon() const
67bool MockLauncherItem::pinned() const
72void MockLauncherItem::setPinned(bool pinned)
74 if (m_pinned != pinned)
77 Q_EMIT pinnedChanged(m_pinned);
81bool MockLauncherItem::running() const
86void MockLauncherItem::setRunning(bool running)
88 if (m_running != running)
91 Q_EMIT runningChanged(running);
95bool MockLauncherItem::recent() const
100void MockLauncherItem::setRecent(bool recent)
102 if (m_recent != recent)
105 Q_EMIT recentChanged(recent);
109int MockLauncherItem::progress() const
114void MockLauncherItem::setProgress(int progress)
116 if (m_progress != progress)
118 m_progress = progress;
119 Q_EMIT progressChanged(progress);
123int MockLauncherItem::count() const
128void MockLauncherItem::setCount(int count)
130 if (m_count != count)
133 Q_EMIT countChanged(count);
137bool MockLauncherItem::countVisible() const
139 return m_countVisible;
142void MockLauncherItem::setCountVisible(bool countVisible)
144 if (m_countVisible != countVisible) {
145 m_countVisible = countVisible;
146 Q_EMIT countVisibleChanged(countVisible);
150bool MockLauncherItem::focused() const
155void MockLauncherItem::setFocused(bool focused)
157 if (m_focused != focused)
160 Q_EMIT focusedChanged(focused);
164bool MockLauncherItem::alerting() const
169void MockLauncherItem::setAlerting(bool alerting)
171 if (m_alerting != alerting)
173 std::cout << "MockLauncherItem::setAlerting()" << std::endl;
174 m_alerting = alerting;
175 Q_EMIT alertingChanged(alerting);
179unity::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