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

#include "MenuClickableEntryCfg.h"

Inheritance diagram for ot::MenuClickableEntryCfg:
ot::MenuEntryCfg ot::Serializable ot::MenuButtonCfg ot::MenuCfg

Public Member Functions

 MenuClickableEntryCfg ()
 
 MenuClickableEntryCfg (const std::string &_name, const std::string &_text, const std::string &_iconPath=std::string())
 
 MenuClickableEntryCfg (const MenuClickableEntryCfg &_other)
 
virtual ~MenuClickableEntryCfg ()
 
MenuClickableEntryCfgoperator= (const MenuClickableEntryCfg &_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
 Set the object contents from the provided JSON object.
 
void setName (const std::string &_name)
 
const std::string & getName (void) const
 
void setText (const std::string &_text)
 
const std::string & getText (void) const
 
void setIconPath (const std::string &_iconPath)
 
const std::string & getIconPath (void) const
 
void setToolTip (const std::string &_toolTip)
 
const std::string & getToolTip (void) const
 
- Public Member Functions inherited from ot::MenuEntryCfg
 MenuEntryCfg ()
 
 MenuEntryCfg (const MenuEntryCfg &_other)
 
virtual ~MenuEntryCfg ()
 
MenuEntryCfgoperator= (const MenuEntryCfg &_other)
 
virtual MenuEntryCfgcreateCopy (void) const =0
 
virtual EntryType getMenuEntryType (void) const =0
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Additional Inherited Members

- Public Types inherited from ot::MenuEntryCfg
enum  EntryType { Menu , Button , Separator }
 
- Static Public Member Functions inherited from ot::MenuEntryCfg
static std::string toString (EntryType _type)
 
static EntryType stringToEntryType (const std::string &_type)
 
static const std::string & entryTypeJsonKey (void)
 

Constructor & Destructor Documentation

◆ MenuClickableEntryCfg() [1/3]

ot::MenuClickableEntryCfg::MenuClickableEntryCfg ( )

◆ MenuClickableEntryCfg() [2/3]

ot::MenuClickableEntryCfg::MenuClickableEntryCfg ( const std::string & _name,
const std::string & _text,
const std::string & _iconPath = std::string() )

◆ MenuClickableEntryCfg() [3/3]

ot::MenuClickableEntryCfg::MenuClickableEntryCfg ( const MenuClickableEntryCfg & _other)

◆ ~MenuClickableEntryCfg()

ot::MenuClickableEntryCfg::~MenuClickableEntryCfg ( )
virtual

Member Function Documentation

◆ addToJsonObject()

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

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference to write the data to.
_allocatorAllocator.

Reimplemented from ot::MenuEntryCfg.

Reimplemented in ot::MenuButtonCfg, and ot::MenuCfg.

◆ getIconPath()

const std::string & ot::MenuClickableEntryCfg::getIconPath ( void ) const
inline

◆ getName()

const std::string & ot::MenuClickableEntryCfg::getName ( void ) const
inline

◆ getText()

const std::string & ot::MenuClickableEntryCfg::getText ( void ) const
inline

◆ getToolTip()

const std::string & ot::MenuClickableEntryCfg::getToolTip ( void ) const
inline

◆ operator=()

ot::MenuClickableEntryCfg & ot::MenuClickableEntryCfg::operator= ( const MenuClickableEntryCfg & _other)

◆ setFromJsonObject()

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

Set the object contents from the provided JSON object.

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

Reimplemented from ot::MenuEntryCfg.

Reimplemented in ot::MenuButtonCfg, and ot::MenuCfg.

◆ setIconPath()

void ot::MenuClickableEntryCfg::setIconPath ( const std::string & _iconPath)
inline

◆ setName()

void ot::MenuClickableEntryCfg::setName ( const std::string & _name)
inline

◆ setText()

void ot::MenuClickableEntryCfg::setText ( const std::string & _text)
inline

◆ setToolTip()

void ot::MenuClickableEntryCfg::setToolTip ( const std::string & _toolTip)
inline

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