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"
27class Scope : public unity::shell::scopes::ScopeInterface
32 Scope(QObject* parent = 0);
33 Scope(QString const& id, QString const& name, bool visible, QObject* parent = 0);
36 QString id() const override;
37 QString name() const override;
38 QString iconHint() const override;
39 QString description() const override;
40 QString searchHint() const override;
41 bool visible() const override;
42 QString shortcut() const override;
43 bool searchInProgress() const override;
44 unity::shell::scopes::CategoriesInterface* categories() const override;
45 QString searchQuery() const override;
46 QString noResultsHint() const override;
47 QString formFactor() const override;
48 bool isActive() const override;
49 unity::shell::scopes::SettingsModelInterface* settings() const override;
52 void setSearchQuery(const QString& search_query) override;
53 void setNoResultsHint(const QString& hint) override;
54 void setFormFactor(const QString& form_factor) override;
55 void setActive(const bool) override;
56 Q_INVOKABLE void setSearchInProgress(const bool inProg); // This is not invokable in the Interface, here for testing benefits
58 Q_INVOKABLE void activate(QVariant const& result) override;
59 Q_INVOKABLE PreviewStack* preview(QVariant const& result) override;
60 Q_INVOKABLE void cancelActivation() override;
61 Q_INVOKABLE void closeScope(unity::shell::scopes::ScopeInterface* scope) override;
63 QString currentDepartmentId() const override;
64 bool hasDepartments() const override;
65 Q_INVOKABLE unity::shell::scopes::DepartmentInterface* getDepartment(const QString& id) override;
66 Q_INVOKABLE void loadDepartment(const QString& id) override;
67 Q_INVOKABLE void performQuery(const QString& query) override;
69 QVariantMap customizations() const override;
75 QString m_description;
77 QString m_searchQuery;
78 QString m_noResultsHint;
83 QString m_currentDeparment;
85 QString m_previewRendererName;
87 Categories* m_categories;
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