2
* Copyright (C) 2015 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 3 as
6
* published by the Free Software Foundation.
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 Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com>
21
#include <unity/util/DefinesPtrs.h>
22
#include <unity/util/NonCopyable.h>
24
#include <unity/scopes/Category.h>
26
#include <QtCore/QString>
27
#include <QtCore/QVariantMap>
40
class QCategorisedResultImpl;
46
NONCOPYABLE(QCategoryImpl);
47
UNITY_DEFINES_PTRS(QCategoryImpl);
49
QCategoryImpl(unity::scopes::Category::SCPtr category);
51
virtual ~QCategoryImpl();
55
\brief Get identifier of this Category
56
\return The category identifier.
61
\brief Get title of this Category
62
\return The category title.
64
QString title() const;
67
\brief Get icon of this Category
68
\return The category icon.
73
\brief Query to perform when this category is expanded
74
\return The expansion query or nullptr.
76
CannedQuery::SCPtr query() const;
79
\brief Get renderer template of this Category
80
\return The category renderer template.
82
CategoryRenderer const& renderer_template() const;
85
QVariantMap serialize() const;
88
unity::scopes::Category::SCPtr api_category_;
89
friend class QCategorisedResultImpl;
92
} // namespace internal