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

#include "ToolButtonCfg.h"

Inheritance diagram for ot::ToolButtonCfg:
ot::WidgetBaseCfg ot::Serializable

Public Member Functions

 ToolButtonCfg ()
 
 ToolButtonCfg (const std::string &_name, const std::string &_text, const std::string &_relativeIconPath=std::string(), const MenuCfg &_menu=MenuCfg())
 
 ToolButtonCfg (const ToolButtonCfg &)=default
 
 ToolButtonCfg (ToolButtonCfg &&)=default
 
virtual ~ToolButtonCfg ()
 
ToolButtonCfgoperator= (const ToolButtonCfg &)=default
 
ToolButtonCfgoperator= (ToolButtonCfg &&)=default
 
virtual std::string getWidgetBaseTypeString (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 setText (const std::string &_text)
 
const std::string & getText (void) const
 
void setIconPath (const std::string &_relativeIconPath)
 
const std::string & getIconPath (void) const
 
- Public Member Functions inherited from ot::WidgetBaseCfg
 WidgetBaseCfg ()
 
 WidgetBaseCfg (const std::string &_name)
 
 WidgetBaseCfg (const WidgetBaseCfg &)=default
 
 WidgetBaseCfg (WidgetBaseCfg &&)=default
 
virtual ~WidgetBaseCfg ()
 
WidgetBaseCfgoperator= (const WidgetBaseCfg &)=default
 
WidgetBaseCfgoperator= (WidgetBaseCfg &&)=default
 
void setName (const std::string &_name)
 
const std::string & getName (void) const
 
void setToolTip (const std::string &_toolTip)
 
const std::string & getToolTip (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Static Public Member Functions

static std::string getToolButtonCfgTypeString (void)
 
- Static Public Member Functions inherited from ot::WidgetBaseCfg
static std::string typeStringJsonKey (void)
 

Constructor & Destructor Documentation

◆ ToolButtonCfg() [1/4]

ot::ToolButtonCfg::ToolButtonCfg ( )

◆ ToolButtonCfg() [2/4]

ot::ToolButtonCfg::ToolButtonCfg ( const std::string & _name,
const std::string & _text,
const std::string & _relativeIconPath = std::string(),
const MenuCfg & _menu = MenuCfg() )

◆ ToolButtonCfg() [3/4]

ot::ToolButtonCfg::ToolButtonCfg ( const ToolButtonCfg & )
default

◆ ToolButtonCfg() [4/4]

ot::ToolButtonCfg::ToolButtonCfg ( ToolButtonCfg && )
default

◆ ~ToolButtonCfg()

ot::ToolButtonCfg::~ToolButtonCfg ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::ToolButtonCfg::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::WidgetBaseCfg.

◆ getIconPath()

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

◆ getText()

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

◆ getToolButtonCfgTypeString()

static std::string ot::ToolButtonCfg::getToolButtonCfgTypeString ( void )
inlinestatic

◆ getWidgetBaseTypeString()

virtual std::string ot::ToolButtonCfg::getWidgetBaseTypeString ( void ) const
inlineoverridevirtual

Implements ot::WidgetBaseCfg.

◆ operator=() [1/2]

ToolButtonCfg & ot::ToolButtonCfg::operator= ( const ToolButtonCfg & )
default

◆ operator=() [2/2]

ToolButtonCfg & ot::ToolButtonCfg::operator= ( ToolButtonCfg && )
default

◆ setFromJsonObject()

void ot::ToolButtonCfg::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::WidgetBaseCfg.

◆ setIconPath()

void ot::ToolButtonCfg::setIconPath ( const std::string & _relativeIconPath)
inline

◆ setText()

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

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