2 * Copyright (C) 2013, 2014 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU 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 General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include <unity/shell/scopes/ScopeInterface.h>
22#include "fake_categories.h"
23#include "fake_previewstack.h"
29class Scope : public unity::shell::scopes::ScopeInterface
34 Scope(Scopes* parent = 0);
35 Scope(QString const& id, QString const& name, bool favorite, Scopes* parent = 0, int categories = 20, bool returnNullPreview = false);
38 QString id() const override;
39 QString name() const override;
40 QString iconHint() const override;
41 QString description() const override;
42 QString searchHint() const override;
43 QString shortcut() const override;
44 bool searchInProgress() const override;
45 bool favorite() const override;
46 unity::shell::scopes::CategoriesInterface* categories() const override;
47 QString searchQuery() const override;
48 QString noResultsHint() const override;
49 QString formFactor() const override;
50 bool isActive() const override;
51 unity::shell::scopes::SettingsModelInterface* settings() const override;
54 void setSearchQuery(const QString& search_query) override;
55 void setNoResultsHint(const QString& hint) override;
56 void setFormFactor(const QString& form_factor) override;
57 void setActive(const bool) override;
58 void setFavorite(const bool) override;
59 Q_INVOKABLE void setId(const QString &id); // This is not invokable in the Interface, here for testing benefits
60 Q_INVOKABLE void setName(const QString &name); // This is not invokable in the Interface, here for testing benefits
61 Q_INVOKABLE void setSearchInProgress(const bool inProg); // This is not invokable in the Interface, here for testing benefits
63 Q_INVOKABLE void activate(QVariant const& result) override;
64 Q_INVOKABLE PreviewStack* preview(QVariant const& result) override;
65 Q_INVOKABLE void cancelActivation() override;
66 Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
68 QString currentNavigationId() const override;
69 bool hasNavigation() const override;
70 QString currentAltNavigationId() const override;
71 bool hasAltNavigation() const override;
72 Q_INVOKABLE unity::shell::scopes::NavigationInterface* getNavigation(QString const& navigationId) override;
73 Q_INVOKABLE unity::shell::scopes::NavigationInterface* getAltNavigation(QString const& altNavigationId) override;
74 Q_INVOKABLE void setNavigationState(const QString &navigationId, bool isAltNavigation) override;
75 Q_SIGNAL void performQuery(const QString& query) override;
77 Status status() const override;
78 QVariantMap customizations() const override;
80 Q_INVOKABLE void refresh() override;
83 void refreshed(); // This is not in the Interface, here for testing benefits
89 QString m_description;
91 QString m_searchQuery;
92 QString m_noResultsHint;
97 QString m_currentNavigationId;
98 QString m_currentAltNavigationId;
100 QString m_previewRendererName;
102 unity::shell::scopes::CategoriesInterface* m_categories;
103 unity::shell::scopes::ScopeInterface* m_openScope;
104 unity::shell::scopes::SettingsModelInterface* m_settings;
106 bool m_returnNullPreview;
109#endif // FAKE_SCOPE_H
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