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 "fake_categories.h"
21#include "fake_previewstack.h"
28class Scope : public QObject
32 Q_PROPERTY(QString id READ id NOTIFY idChanged)
33 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
34 Q_PROPERTY(QString iconHint READ iconHint NOTIFY iconHintChanged)
35 Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
36 Q_PROPERTY(QString searchHint READ searchHint NOTIFY searchHintChanged)
37 Q_PROPERTY(bool searchInProgress READ searchInProgress WRITE setSearchInProgress NOTIFY searchInProgressChanged)
38 Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
39 Q_PROPERTY(QString shortcut READ shortcut NOTIFY shortcutChanged)
40 Q_PROPERTY(Categories* categories READ categories NOTIFY categoriesChanged)
41 //Q_PROPERTY(Filters* filters READ filters NOTIFY filtersChanged)
43 Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)
44 Q_PROPERTY(QString noResultsHint READ noResultsHint WRITE setNoResultsHint NOTIFY noResultsHintChanged)
45 Q_PROPERTY(QString formFactor READ formFactor WRITE setFormFactor NOTIFY formFactorChanged)
46 Q_PROPERTY(bool isActive READ isActive WRITE setActive NOTIFY isActiveChanged)
49 Scope(QObject* parent = 0);
50 Scope(QString const& id, QString const& name, bool visible, QObject* parent = 0);
55 QString iconHint() const;
56 QString description() const;
57 QString searchHint() const;
59 QString shortcut() const;
60 bool connected() const;
61 bool searchInProgress() const;
62 Categories* categories() const;
63 QString searchQuery() const;
64 QString noResultsHint() const;
65 QString formFactor() const;
66 bool isActive() const;
69 void setName(const QString& name);
70 void setSearchQuery(const QString& search_query);
71 void setNoResultsHint(const QString& hint);
72 void setFormFactor(const QString& form_factor);
73 void setActive(const bool);
74 void setSearchInProgress(const bool inProg);
76 Q_INVOKABLE void activate(QVariant const& result);
77 Q_INVOKABLE PreviewStack* preview(QVariant const& result);
78 Q_INVOKABLE void cancelActivation();
79 Q_INVOKABLE void closeScope(Scope* scope);
83 void nameChanged(const QString&);
84 void iconHintChanged(const QString&);
85 void descriptionChanged(const QString&);
86 void searchHintChanged(const QString&);
87 void searchInProgressChanged();
88 void visibleChanged(bool);
89 void shortcutChanged(const QString&);
90 void categoriesChanged();
91 //void filtersChanged();
92 void searchQueryChanged();
93 void noResultsHintChanged();
94 void formFactorChanged();
95 void isActiveChanged(bool);
97 // signals triggered by activate(..) or preview(..) requests.
100 void gotoUri(const QString &uri);
102 void previewRequested(QVariant const& result);
103 void gotoScope(QString const& scopeId);
104 void openScope(Scope* scope);
106 void activateApplication(const QString &desktop);
112 QString m_description;
114 QString m_searchQuery;
115 QString m_noResultsHint;
116 QString m_formFactor;
121 QString m_previewRendererName;
123 Categories* m_categories;
126#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