Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 #ifndef UNITY_SCOPES_TESTING_CATEGORY_H
20 #define UNITY_SCOPES_TESTING_CATEGORY_H
21 
22 #include <unity/scopes/Category.h>
23 
24 namespace unity
25 {
26 
27 namespace scopes
28 {
29 class CategoryRenderer;
30 
31 namespace testing
32 {
33 
41 {
42 public:
51  inline Category(std::string const& id, std::string const& title, std::string const &icon, CategoryRenderer const& renderer_template) :
52  unity::scopes::Category(id, title, icon, renderer_template)
53  {
54  }
55 
61  inline Category(VariantMap const& variant_map) :
62  unity::scopes::Category(variant_map)
63  {
64  }
65 };
66 
67 } // namespace testing
68 
69 } // namespace scopes
70 
71 } // namespace unity
72 
73 #endif
std::string icon() const
Get icon of this Category.
A category renderer template in JSON format.
Definition: CategoryRenderer.h:84
Category(VariantMap const &variant_map)
Deserializes category from a variant data.
Definition: Category.h:61
std::string title() const
Get title of this Category.
A set of related results returned by a scope and displayed within a single pane in the Unity dash...
Definition: Category.h:48
CategoryRenderer const & renderer_template() const
Get renderer template of this Category.
Implementation of Category class for testing.
Definition: Category.h:40
std::map< std::string, Variant > VariantMap
A dictionary of (string, Variant) pairs.
Definition: Variant.h:39
Category(std::string const &id, std::string const &title, std::string const &icon, CategoryRenderer const &renderer_template)
Creates category instance.
Definition: Category.h:51