19 #ifndef UNITY_SCOPES_ANNOTATION_H
20 #define UNITY_SCOPES_ANNOTATION_H
22 #include <unity/scopes/Variant.h>
23 #include <unity/scopes/Link.h>
24 #include <unity/util/DefinesPtrs.h>
38 class ResultReplyObject;
103 std::string
label()
const;
109 std::string
icon()
const;
115 std::list<Link::SCPtr>
links()
const;
129 std::unique_ptr<internal::AnnotationImpl> p;
131 friend class internal::ResultReplyObject;
Query link(s) that result in a new search query when clicked by the user.
Definition: Annotation.h:45
Definition: Annotation.h:57
std::list< Link::SCPtr > links() const
Returns all links assigned to given position of this annotation.
Definition: Annotation.cpp:93
std::string icon() const
Returns icon assigned to this annotation. This currently only makes sense for Type::Link.
Definition: Annotation.cpp:88
Annotation(Type atype)
Creates annotation of given type. The Type imposes attributes that are supported or required by that ...
Definition: Annotation.cpp:29
std::string label() const
Returns label assigned to this annotation. This currently makes sense for Type::GroupedLink only...
Definition: Annotation.cpp:83
Type
Enumeration of supported Annotation types.
Definition: Annotation.h:55
std::map< std::string, Variant > VariantMap
A dictionary of (string, Variant) pairs.
Definition: Variant.h:39
void add_link(std::string const &label, CannedQuery const &query)
Adds a link to the annotation. There needs to be exactly one link added for the annotations of type T...
Definition: Annotation.cpp:78
Type annotation_type() const
Returns the type of this annotation.
Definition: Annotation.cpp:98
void set_label(std::string const &label)
Sets a label for an annotation. This currently makes sense for Type::GroupedLink only.
Definition: Annotation.cpp:68
Definition: Annotation.h:58
Parameters of a search query.
Definition: CannedQuery.h:46
void set_icon(std::string const &icon)
Sets an icon for an annotation. This currently makes sense for Type::Link.
Definition: Annotation.cpp:73