1
1
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
3
* Copyright (C) 2013 Canonical, Ltd.
3
* Copyright (C) 2014 Canonical, Ltd.
5
5
* This program is free software: you can redistribute it and/or modify it
6
6
* under the terms of the GNU General Public License version 3, as published
14
14
* You should have received a copy of the GNU General Public License along
15
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Author: Pawel Stolowski <pawel.stolowski@canonical.com>
17
* Author: Scott Sweeny <scott.sweeny@canonical.com>
20
20
#include "SelfServicePlanScope.h"
70
int SelfServicePlanScope::start(string const&, unity::scopes::RegistryProxy const&)
70
void SelfServicePlanScope::start(string const&, unity::scopes::RegistryProxy const&)
75
SearchQueryBase::UPtr SelfServicePlanScope::search(const CannedQuery &query, SearchMetadata const&)
74
SearchQueryBase::UPtr SelfServicePlanScope::search(const CannedQuery &query, SearchMetadata const& metadata)
78
SearchQueryBase::UPtr q(new SelfServicePlanQuery(query, scopes, m_locale));
76
SearchQueryBase::UPtr q(new SelfServicePlanQuery(query, metadata));
82
80
PreviewQueryBase::UPtr SelfServicePlanScope::preview(Result const& result,
83
81
ActionMetadata const& hints)
85
PreviewQueryBase::UPtr previewer(new SelfServicePlanPreview(*this, result));
83
PreviewQueryBase::UPtr previewer(new SelfServicePlanPreview(result, hints));
89
void SelfServicePlanScope::appendIfEnabled(QStringList &scopeToQuery, const QString &scopeId) const
91
if (!m_disabledScopes.contains(scopeId)) {
92
scopeToQuery << scopeId;
96
void SelfServicePlanScope::updateDisabledScopes()
100
SelfServicePlanPreview::SelfServicePlanPreview(SelfServicePlanScope &scope, Result const &result)
87
SelfServicePlanPreview::SelfServicePlanPreview(Result const &result, ActionMetadata const& metadata)
88
: PreviewQueryBase(result, metadata),