#include "MenuButtonCfg.h"
Public Types | |
enum | ButtonAction { NotifyOwner , Clear } |
Public Types inherited from ot::MenuEntryCfg | |
enum | EntryType { Menu , Button , Separator } |
Public Member Functions | |
MenuButtonCfg () | |
MenuButtonCfg (const std::string &_name, const std::string &_text, const std::string &_iconPath=std::string(), ButtonAction _action=ButtonAction::NotifyOwner) | |
MenuButtonCfg (const MenuButtonCfg &_other) | |
MenuButtonCfg (const ot::ConstJsonObject &_object) | |
virtual | ~MenuButtonCfg () |
MenuButtonCfg & | operator= (const MenuButtonCfg &)=delete |
virtual MenuEntryCfg * | createCopy (void) const override |
virtual EntryType | getMenuEntryType (void) const override |
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 | setButtonAction (ButtonAction _action) |
ButtonAction | getButtonAction (void) const |
Public Member Functions inherited from ot::MenuClickableEntryCfg | |
MenuClickableEntryCfg () | |
MenuClickableEntryCfg (const std::string &_name, const std::string &_text, const std::string &_iconPath=std::string()) | |
MenuClickableEntryCfg (const MenuClickableEntryCfg &_other) | |
virtual | ~MenuClickableEntryCfg () |
MenuClickableEntryCfg & | operator= (const MenuClickableEntryCfg &_other) |
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 () |
MenuEntryCfg & | operator= (const MenuEntryCfg &_other) |
Public Member Functions inherited from ot::Serializable | |
Serializable () | |
virtual | ~Serializable () |
Static Public Member Functions | |
static std::string | toString (ButtonAction _action) |
static ButtonAction | stringToButtonAction (const std::string &_action) |
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) |
ot::MenuButtonCfg::MenuButtonCfg | ( | ) |
ot::MenuButtonCfg::MenuButtonCfg | ( | const std::string & | _name, |
const std::string & | _text, | ||
const std::string & | _iconPath = std::string(), | ||
ButtonAction | _action = ButtonAction::NotifyOwner ) |
ot::MenuButtonCfg::MenuButtonCfg | ( | const MenuButtonCfg & | _other | ) |
ot::MenuButtonCfg::MenuButtonCfg | ( | const ot::ConstJsonObject & | _object | ) |
|
virtual |
|
overridevirtual |
Add the object contents to the provided JSON object.
_object | Json object reference to write the data to. |
_allocator | Allocator. |
Reimplemented from ot::MenuClickableEntryCfg.
|
overridevirtual |
Implements ot::MenuEntryCfg.
|
inline |
|
inlineoverridevirtual |
Implements ot::MenuEntryCfg.
|
delete |
|
inline |
|
overridevirtual |
Set the object contents from the provided JSON object.
_object | The JSON object containing the information. |
May | throw an exception if the provided object is not valid (members missing or invalid types). |
Reimplemented from ot::MenuClickableEntryCfg.
|
static |
|
static |