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),
40 m_quickList(new MockQuickListModel(this))
45QString MockLauncherItem::appId() const
50QString MockLauncherItem::desktopFile() const
55QString MockLauncherItem::name() const
60QString MockLauncherItem::icon() const
65bool MockLauncherItem::pinned() const
70void MockLauncherItem::setPinned(bool pinned)
72 if (m_pinned != pinned)
75 Q_EMIT pinnedChanged(m_pinned);
79bool MockLauncherItem::running() const
84void MockLauncherItem::setRunning(bool running)
86 if (m_running != running)
89 Q_EMIT runningChanged(running);
93bool MockLauncherItem::recent() const
98void MockLauncherItem::setRecent(bool recent)
100 if (m_recent != recent)
103 Q_EMIT recentChanged(recent);
107int MockLauncherItem::progress() const
112void MockLauncherItem::setProgress(int progress)
114 if (m_progress != progress)
116 m_progress = progress;
117 Q_EMIT progressChanged(progress);
121int MockLauncherItem::count() const
126void MockLauncherItem::setCount(int count)
128 if (m_count != count)
131 Q_EMIT countChanged(count);
135bool MockLauncherItem::countVisible() const
137 return m_countVisible;
140void MockLauncherItem::setCountVisible(bool countVisible)
142 if (m_countVisible != countVisible) {
143 m_countVisible = countVisible;
144 Q_EMIT countVisibleChanged(countVisible);
148bool MockLauncherItem::focused() const
153void MockLauncherItem::setFocused(bool focused)
155 if (m_focused != focused)
158 Q_EMIT focusedChanged(focused);
163unity::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