~unity-api-team/unity-scope-click/qt-bound

« back to all changes in this revision

Viewing changes to scope/clickstore/store-query.h

  • Committer: Rodney Dawes
  • Date: 2016-04-13 20:39:35 UTC
  • Revision ID: rodney.dawes@canonical.com-20160413203935-4h08eh1r289v4din
Start at attempt to use qt scopes API bindings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#ifndef STORE_QUERY_H
31
31
#define STORE_QUERY_H
32
32
 
33
 
#include <unity/scopes/SearchQueryBase.h>
34
 
#include <unity/scopes/Department.h>
 
33
#include <unity/scopes/qt/QSearchQueryBase.h>
 
34
#include <unity/scopes/qt/QDepartment.h>
35
35
 
36
36
namespace scopes = unity::scopes;
37
37
 
52
52
class DepartmentLookup;
53
53
class DepartmentsDb;
54
54
 
55
 
class Query : public scopes::SearchQueryBase
 
55
class Query : public scopes::qt::QSearchQueryBase
56
56
{
57
57
public:
58
58
    struct ResultKeys
79
79
 
80
80
    virtual void cancelled() override;
81
81
 
82
 
    virtual void run(scopes::SearchReplyProxy const& reply) override;
 
82
    virtual void run(scopes::qt::QSearchReplyProxy const& reply) override;
83
83
 
84
84
    pay::PurchaseSet purchased_apps;
85
85
 
86
86
protected:
87
 
    virtual unity::scopes::Department::SPtr fromClickDepartment(const click::Department::SCPtr click_dept, const std::string& current_dept_id, const click::DepartmentList& subdepts);
88
 
    virtual unity::scopes::Department::SPtr populate_departments(const click::DepartmentList& depts, const std::string& current_department_id);
 
87
    virtual scopes::qt::QDepartment::SCPtr fromClickDepartment(const click::Department::SCPtr click_dept, const std::string& current_dept_id, const click::DepartmentList& subdepts);
 
88
    virtual scopes::qt::QDepartment::SCPtr populate_departments(const click::DepartmentList& depts, const std::string& current_department_id);
89
89
    virtual void store_departments(const click::DepartmentList& depts);
90
 
    virtual void push_departments(const scopes::SearchReplyProxy& searchReply, const scopes::Department::SCPtr& root);
91
 
    virtual void push_departments(scopes::SearchReplyProxy const& searchReply);
92
 
    virtual void add_highlights(scopes::SearchReplyProxy const& searchReply, const PackageSet& installedPackages);
93
 
    virtual void add_available_apps(const scopes::SearchReplyProxy &searchReply, const PackageSet &installedPackages, const std::string &category);
 
90
    virtual void push_departments(const scopes::qt::QSearchReplyProxy& searchReply, const scopes::qt::QDepartment::SCPtr& root);
 
91
    virtual void push_departments(scopes::qt::QSearchReplyProxy const& searchReply);
 
92
    virtual void add_highlights(scopes::qt::QSearchReplyProxy const& searchReply, const PackageSet& installedPackages);
 
93
    virtual void add_available_apps(const scopes::qt::QSearchReplyProxy &searchReply, const PackageSet &installedPackages, const std::string &category);
94
94
    virtual click::Interface& clickInterfaceInstance();
95
95
    virtual PackageSet get_installed_packages();
96
 
    virtual bool push_result(const scopes::SearchReplyProxy &searchReply, scopes::CategorisedResult const& res);
97
 
    virtual void finished(const scopes::SearchReplyProxy &searchReply);
98
 
    virtual scopes::Category::SCPtr register_category(scopes::SearchReplyProxy const& searchReply,
 
96
    virtual bool push_result(const scopes::qt::QSearchReplyProxy &searchReply, scopes::qt::QCategorisedResult const& res);
 
97
    virtual void finished(const scopes::qt::QSearchReplyProxy &searchReply);
 
98
    virtual scopes::qt::QCategory::SCPtr register_category(scopes::qt::QSearchReplyProxy const& searchReply,
99
99
                                               std::string const& id,
100
100
                                               std::string const& title,
101
101
                                               std::string const& icon,
102
102
                                               scopes::CategoryRenderer const& renderer_template);
103
 
    virtual void push_package(const scopes::SearchReplyProxy& searchReply, scopes::Category::SCPtr category, const PackageSet &locallyInstalledApps,
 
103
    virtual void push_package(const scopes::qt::QSearchReplyProxy& searchReply, scopes::qt::QCategory::SCPtr category, const PackageSet &locallyInstalledApps,
104
104
            const click::Package& pkg);
105
 
    virtual void push_highlights(const scopes::SearchReplyProxy& searchReply, const HighlightList& highlights, const PackageSet &locallyInstalledApps);
 
105
    virtual void push_highlights(const scopes::qt::QSearchReplyProxy& searchReply, const HighlightList& highlights, const PackageSet &locallyInstalledApps);
106
106
    virtual void run_under_qt(const std::function<void()> &task);
107
107
 
108
108
private: