OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::NavigationTreePackage Class Reference

#include "NavigationTreePackage.h"

Inheritance diagram for ot::NavigationTreePackage:
ot::Serializable ot::SelectEntitiesDialogCfg

Public Types

enum  NavigationTreePackageFlag { NoFlags = 0x00 , ItemsDefaultExpanded = 0x01 }
 
typedef Flags< NavigationTreePackageFlagNavigationTreePackageFlags
 

Public Member Functions

 NavigationTreePackage ()
 
virtual ~NavigationTreePackage ()
 
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 setFlag (NavigationTreePackageFlag _flag, bool _active=true)
 
void setFlags (NavigationTreePackageFlags _flags)
 
NavigationTreePackageFlags flags (void) const
 
void setRootItems (const std::list< NavigationTreeItem > &_items)
 
void addRootItem (const NavigationTreeItem &_item)
 
const std::list< NavigationTreeItem > & rootItems (void) const
 
void mergeItems (bool _mergeAllChilds=true)
 Will merge items with the same name into one.
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Static Public Member Functions

static std::string toString (NavigationTreePackageFlag _flag)
 
static NavigationTreePackageFlag stringToFlag (const std::string &_flag)
 

Member Typedef Documentation

◆ NavigationTreePackageFlags

Member Enumeration Documentation

◆ NavigationTreePackageFlag

Enumerator
NoFlags 
ItemsDefaultExpanded 

Constructor & Destructor Documentation

◆ NavigationTreePackage()

ot::NavigationTreePackage::NavigationTreePackage ( )

◆ ~NavigationTreePackage()

ot::NavigationTreePackage::~NavigationTreePackage ( )
virtual

Member Function Documentation

◆ addRootItem()

void ot::NavigationTreePackage::addRootItem ( const NavigationTreeItem & _item)

◆ addToJsonObject()

void ot::NavigationTreePackage::addToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference
_allocatorAllocator

Implements ot::Serializable.

Reimplemented in ot::SelectEntitiesDialogCfg.

◆ flags()

NavigationTreePackageFlags ot::NavigationTreePackage::flags ( void ) const
inline

◆ mergeItems()

void ot::NavigationTreePackage::mergeItems ( bool _mergeAllChilds = true)

Will merge items with the same name into one.

Parameters
_mergeAllChildsIf true merge all child items aswell

◆ rootItems()

const std::list< NavigationTreeItem > & ot::NavigationTreePackage::rootItems ( void ) const
inline

◆ setFlag()

void ot::NavigationTreePackage::setFlag ( NavigationTreePackageFlag _flag,
bool _active = true )
inline

◆ setFlags()

void ot::NavigationTreePackage::setFlags ( NavigationTreePackageFlags _flags)
inline

◆ setFromJsonObject()

void ot::NavigationTreePackage::setFromJsonObject ( const ot::ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

Reimplemented in ot::SelectEntitiesDialogCfg.

◆ setRootItems()

void ot::NavigationTreePackage::setRootItems ( const std::list< NavigationTreeItem > & _items)
inline

◆ stringToFlag()

ot::NavigationTreePackage::NavigationTreePackageFlag ot::NavigationTreePackage::stringToFlag ( const std::string & _flag)
static

◆ toString()

std::string ot::NavigationTreePackage::toString ( NavigationTreePackageFlag _flag)
static

The documentation for this class was generated from the following files: