Implementation of a styling from fixed attribute map.
More...
#include <Styling.h>
|
| AttributeMap | map (int index, AObject &object) override |
| | Return the fixed attributes on each invocation.
|
| |
| std::string | info () override |
| | Informal string summarizing the translation from the object to the styling attributes.
|
| |
| void | set (const std::string &key, const std::string &value) |
| | Sets the given attribute to the fixed value.
|
| |
| void | setStroke (const std::string &value) |
| | Legacy - Sets the stroke color to the fixed value.
|
| |
| void | setStrokeWidth (const std::string &value) |
| | Legacy - Sets the stroke width to the fixed value.
|
| |
template<class AObject>
class Belle2::TrackFindingCDC::FixedStyling< AObject >
Implementation of a styling from fixed attribute map.
Definition at line 56 of file Styling.h.
◆ info()
Informal string summarizing the translation from the object to the styling attributes.
Reimplemented from Styling< AObject >.
Definition at line 67 of file Styling.h.
68 {
69 std::ostringstream oss;
70 for (const auto& keyValue : m_attributeMap) {
71 oss << keyValue.first << ": " << keyValue.second << '\n';
72 }
73 return oss.str();
74 }
◆ map()
template<class AObject>
| AttributeMap map |
( |
int | index, |
|
|
AObject & | object ) |
|
inlineoverridevirtual |
Return the fixed attributes on each invocation.
Reimplemented from Styling< AObject >.
Definition at line 60 of file Styling.h.
62 {
63 return m_attributeMap;
64 }
◆ set()
template<class AObject>
| void set |
( |
const std::string & | key, |
|
|
const std::string & | value ) |
|
inline |
Sets the given attribute to the fixed value.
Definition at line 77 of file Styling.h.
78 {
79 m_attributeMap.emplace(key, value);
80 }
◆ setStroke()
template<class AObject>
| void setStroke |
( |
const std::string & | value | ) |
|
|
inline |
Legacy - Sets the stroke color to the fixed value.
Definition at line 83 of file Styling.h.
84 {
85 set("stroke", value);
86 }
◆ setStrokeWidth()
template<class AObject>
| void setStrokeWidth |
( |
const std::string & | value | ) |
|
|
inline |
Legacy - Sets the stroke width to the fixed value.
Definition at line 89 of file Styling.h.
90 {
91 set("stroke-width", value);
92 }
◆ m_attributeMap
template<class AObject>
| AttributeMap m_attributeMap |
|
private |
Memory for the fixed attribute values.
Definition at line 96 of file Styling.h.
The documentation for this class was generated from the following file:
- tracking/trackFindingCDC/display/include/Styling.h