Unity Scopes API
QCategorisedResult.h
1 /*
2  * Copyright (C) 2015 Canonical Ltd
3  *
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.
7  *
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.
12  *
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/>.
15  *
16  * Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com>
17  */
18 
19 #pragma once
20 
21 #include <unity/scopes/qt/QResult.h>
22 #include <unity/scopes/qt/QCategory.h>
23 
24 namespace unity
25 {
26 
27 namespace scopes
28 {
29 
30 namespace qt
31 {
32 
33 namespace internal
34 {
35 class QSearchReplyImpl;
36 class QCategorisedResultImpl;
37 }
38 
43 class QCategorisedResult final : public QResult
44 {
45 public:
47  UNITY_DEFINES_PTRS(QCategorisedResult);
49 
55  explicit QCategorisedResult(QCategory::SCPtr category);
56 
60  //{@
62  QCategorisedResult& operator=(QCategorisedResult const& other);
66 
71  void set_category(QCategory::SCPtr category);
72 
78  QCategory::SCPtr category() const;
79 
80 private:
82  internal::QCategorisedResultImpl* fwd() const;
84 
85  friend class internal::QSearchReplyImpl;
86 };
87 
88 } // namespace qt
89 
90 } // namespace scopes
91 
92 } // namespace unity
A result, including the category it belongs to.
Definition: QCategorisedResult.h:43
Definition: HttpAsyncReader.h:45
QCategory::SCPtr category() const
Return category of this result. Get the category instance this result belongs to. ...
QCategorisedResult(QCategory::SCPtr category)
Creates a CategorisedResult with given category, with all base attributes initially empty...
Top-level namespace for all things Unity-related.
Definition: Version.h:49
The attributes of a result returned by a Scope.
Definition: QResult.h:56
Definition: ActionMetadata.h:31
void set_category(QCategory::SCPtr category)
Updates the category of this result.