#include "NavigationTreeItem.h"
Public Member Functions | |
NavigationTreeItem () | |
NavigationTreeItem (const std::string &_text, ot::NavigationTreeItemFlags _flags=ot::NoNavigationTreeItemFlags) | |
NavigationTreeItem (const std::string &_text, const std::string &_iconPath, ot::NavigationTreeItemFlags _flags=ot::NoNavigationTreeItemFlags) | |
NavigationTreeItem (const std::string &_text, const std::string &_iconPath, const std::list< NavigationTreeItem > &_childItems, ot::NavigationTreeItemFlags _flags=ot::NoNavigationTreeItemFlags) | |
NavigationTreeItem (const NavigationTreeItem &_other) | |
virtual | ~NavigationTreeItem () |
NavigationTreeItem & | operator= (const NavigationTreeItem &_other) |
virtual void | addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override |
Add the object contents to the provided JSON object. | |
virtual void | setFromJsonObject (const ot::ConstJsonObject &_object) override |
Will set the object contents from the provided JSON object. | |
void | setText (const std::string &_text) |
const std::string | text (void) const |
void | setIconPath (const std::string &_iconPath) |
const std::string & | iconPath (void) const |
void | addChildItem (const NavigationTreeItem &_item) |
void | setChildItems (const std::list< NavigationTreeItem > &_items) |
const std::list< NavigationTreeItem > & | childItems (void) const |
void | setFlag (NavigationTreeItemFlag _flag, bool _active=true) |
void | setFlags (ot::NavigationTreeItemFlags _flags) |
ot::NavigationTreeItemFlags | flags (void) const |
void | merge (const NavigationTreeItem &_other) |
std::string | itemPath (char _delimiter='/', const std::string &_suffix=std::string()) const |
bool | filter (NavigationTreeItemFlags _flags) |
Removes all child items which dont have the flag(s) set Returns true if this item or any of the childs matches the filter. | |
Public Member Functions inherited from ot::Serializable | |
Serializable () | |
virtual | ~Serializable () |
Protected Member Functions | |
void | setParentNavigationTreeItem (NavigationTreeItem *_parent) |
NavigationTreeItem * | parentNavigationTreeItem (void) const |
ot::NavigationTreeItem::NavigationTreeItem | ( | ) |
ot::NavigationTreeItem::NavigationTreeItem | ( | const std::string & | _text, |
ot::NavigationTreeItemFlags | _flags = ot::NoNavigationTreeItemFlags ) |
ot::NavigationTreeItem::NavigationTreeItem | ( | const std::string & | _text, |
const std::string & | _iconPath, | ||
ot::NavigationTreeItemFlags | _flags = ot::NoNavigationTreeItemFlags ) |
ot::NavigationTreeItem::NavigationTreeItem | ( | const std::string & | _text, |
const std::string & | _iconPath, | ||
const std::list< NavigationTreeItem > & | _childItems, | ||
ot::NavigationTreeItemFlags | _flags = ot::NoNavigationTreeItemFlags ) |
ot::NavigationTreeItem::NavigationTreeItem | ( | const NavigationTreeItem & | _other | ) |
|
virtual |
void ot::NavigationTreeItem::addChildItem | ( | const NavigationTreeItem & | _item | ) |
|
overridevirtual |
Add the object contents to the provided JSON object.
_object | Json object reference |
_allocator | Allocator |
Implements ot::Serializable.
|
inline |
bool ot::NavigationTreeItem::filter | ( | NavigationTreeItemFlags | _flags | ) |
Removes all child items which dont have the flag(s) set Returns true if this item or any of the childs matches the filter.
|
inline |
|
inline |
std::string ot::NavigationTreeItem::itemPath | ( | char | _delimiter = '/', |
const std::string & | _suffix = std::string() ) const |
void ot::NavigationTreeItem::merge | ( | const NavigationTreeItem & | _other | ) |
ot::NavigationTreeItem & ot::NavigationTreeItem::operator= | ( | const NavigationTreeItem & | _other | ) |
|
inlineprotected |
void ot::NavigationTreeItem::setChildItems | ( | const std::list< NavigationTreeItem > & | _items | ) |
|
inline |
|
inline |
|
overridevirtual |
Will set the object contents from the provided JSON object.
_object | The JSON object containing the information |
Will | throw an exception if the provided object is not valid (members missing or invalid types) |
Implements ot::Serializable.
|
inline |
|
inlineprotected |
|
inline |
|
inline |