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"),
39 m_quickList(new MockQuickListModel(this))
44QString MockLauncherItem::appId() const
49QString MockLauncherItem::desktopFile() const
54QString MockLauncherItem::name() const
59QString MockLauncherItem::icon() const
64bool MockLauncherItem::pinned() const
69void MockLauncherItem::setPinned(bool pinned)
71 if (m_pinned != pinned)
74 Q_EMIT pinnedChanged(m_pinned);
78bool MockLauncherItem::running() const
83void MockLauncherItem::setRunning(bool running)
85 if (m_running != running)
88 Q_EMIT runningChanged(running);
92bool MockLauncherItem::recent() const
97void MockLauncherItem::setRecent(bool recent)
99 if (m_recent != recent)
102 Q_EMIT recentChanged(recent);
106int MockLauncherItem::progress() const
111void MockLauncherItem::setProgress(int progress)
113 if (m_progress != progress)
115 m_progress = progress;
116 Q_EMIT progressChanged(progress);
120int MockLauncherItem::count() const
125void MockLauncherItem::setCount(int count)
127 if (m_count != count)
130 Q_EMIT countChanged(count);
134bool MockLauncherItem::focused() const
139void MockLauncherItem::setFocused(bool focused)
141 if (m_focused != focused)
144 Q_EMIT focusedChanged(focused);
149unity::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