2 * Copyright (C) 2011 Canonical, Ltd.
5 * Florian Boucault <florian.boucault@canonical.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
29#include <UnityCore/Scope.h>
30#include <UnityCore/Results.h>
33#include "deelistmodel.h"
35#include "categories.h"
37class Scope : public QObject
41 Q_PROPERTY(QString id READ id NOTIFY idChanged)
42 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
43 Q_PROPERTY(QString iconHint READ iconHint NOTIFY iconHintChanged)
44 Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
45 Q_PROPERTY(QString searchHint READ searchHint NOTIFY searchHintChanged)
46 Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
47 Q_PROPERTY(QString shortcut READ shortcut NOTIFY shortcutChanged)
48 Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
49 Q_PROPERTY(Categories* categories READ categories NOTIFY categoriesChanged)
51 Q_PROPERTY(QString searchQuery READ searchQuery WRITE setSearchQuery NOTIFY searchQueryChanged)
52 Q_PROPERTY(QString noResultsHint READ noResultsHint WRITE setNoResultsHint NOTIFY noResultsHintChanged)
53 Q_PROPERTY(QString formFactor READ formFactor WRITE setFormFactor NOTIFY formFactorChanged)
56 explicit Scope(QObject *parent = 0);
61 QString iconHint() const;
62 QString description() const;
63 QString searchHint() const;
65 QString shortcut() const;
66 bool connected() const;
67 Categories* categories() const;
68 QString searchQuery() const;
69 QString noResultsHint() const;
70 QString formFactor() const;
73 void setSearchQuery(const QString& search_query);
74 void setNoResultsHint(const QString& hint);
75 void setFormFactor(const QString& form_factor);
77 Q_INVOKABLE void activate(const QString& uri);
78 void setUnityScope(const unity::dash::Scope::Ptr& scope);
79 unity::dash::Scope::Ptr unityScope() const;
82 void idChanged(const std::string&);
83 void dbusNameChanged(const std::string&);
84 void dbusPathChanged(const std::string&);
85 void nameChanged(const std::string&);
86 void iconHintChanged(const std::string&);
87 void descriptionChanged(const std::string&);
88 void searchHintChanged(const std::string&);
89 void visibleChanged(bool);
90 void shortcutChanged(const std::string&);
91 void connectedChanged(bool);
92 void categoriesChanged();
93 void searchFinished(const std::string&, unity::glib::HintsMap const&, unity::glib::Error const&);
94 void searchQueryChanged();
95 void noResultsHintChanged();
96 void formFactorChanged();
99 void synchronizeStates();
100 void onSearchFinished(const std::string &, unity::glib::HintsMap const &);
103 void onActivated(unity::dash::LocalResult const& result, unity::dash::ScopeHandledType type, unity::glib::HintsMap const&);
104 void fallbackActivate(const QString& uri);
106 unity::dash::Scope::Ptr m_unityScope;
107 std::unique_ptr<Categories> m_categories;
108 QString m_searchQuery;
109 QString m_noResultsHint;
110 QString m_formFactor;
113Q_DECLARE_METATYPE(Scope*)
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