Unity Scopes API
Category.h
1 /*
2  * Copyright (C) 2013 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: Thomas Voß <thomas.voss@canonical.com>
17  */
18 
19 #pragma once
20 
21 #include <unity/scopes/Category.h>
22 
23 namespace unity
24 {
25 
26 namespace scopes
27 {
28 class CategoryRenderer;
29 
30 namespace testing
31 {
32 
40 {
41 public:
50  inline Category(std::string const& id, std::string const& title, std::string const &icon, CategoryRenderer const& renderer_template) :
51  unity::scopes::Category(id, title, icon, nullptr, renderer_template)
52  {
53  }
54 
60  inline Category(VariantMap const& variant_map) :
61  unity::scopes::Category(variant_map)
62  {
63  }
64 };
65 
66 } // namespace testing
67 
68 } // namespace scopes
69 
70 } // namespace unity
std::string icon() const
Get icon of this Category.
A category renderer template in JSON format.
Definition: CategoryRenderer.h:83
Category(VariantMap const &variant_map)
Deserializes category from a variant data.
Definition: Category.h:60
std::string title() const
Get title of this Category.
Definition: OnlineAccountClient.h:39
A set of related results returned by a scope and displayed within a single pane in the Unity dash...
Definition: Category.h:49
CategoryRenderer const & renderer_template() const
Get renderer template of this Category.
Implementation of Category class for testing.
Definition: Category.h:39
Top-level namespace for all things Unity-related.
Definition: Version.h:49
std::map< std::string, Variant > VariantMap
A dictionary of (string, Variant) pairs.
Definition: Variant.h:38
Category(std::string const &id, std::string const &title, std::string const &icon, CategoryRenderer const &renderer_template)
Creates category instance.
Definition: Category.h:50