SHAPER  9.13.0
Config_WidgetAPI Class Reference

Provides low-level API for WidgetFactory for reading xml definitions of widgets. More...

Public Member Functions

CONFIG_EXPORT std::string widgetType () const
 Returns name of widget's node (attribute) More...
 
CONFIG_EXPORT bool isGroupBoxWidget () const
 Returns true if widget has container type, which means it able to contain other widgets. More...
 
CONFIG_EXPORT bool isPagedWidget () const
 Returns true if widget has page type; Page is container widget with combo box control to switch between pages. More...
 
CONFIG_EXPORT std::string featureId () const
 Returns id of current feature. More...
 
CONFIG_EXPORT std::string widgetId () const
 Returns id of current widget. More...
 
CONFIG_EXPORT std::string widgetIcon () const
 Returns icon of current widget. More...
 
CONFIG_EXPORT std::string widgetLabel () const
 Returns text for label of current widget. More...
 
CONFIG_EXPORT std::string widgetTooltip () const
 Returns text for tooltip of current widget. More...
 
CONFIG_EXPORT std::string getProperty (const char *thePropName) const
 Returns a custom property of current widget. More...
 
CONFIG_EXPORT bool getBooleanAttribute (const char *theAttributeName, bool theDefault) const
 
CONFIG_EXPORT Config_WidgetAPI (std::string theRawXml, const std::string theAttributePrefix="")
 These fields are accessible for ModuleBase_WidgetFactory only. More...
 
CONFIG_EXPORT bool toNextWidget ()
 Pass to the next (sibling) node of widget's xml definition. If impossible, returns false. More...
 
CONFIG_EXPORT bool toChildWidget ()
 Pass into the child node of widget's xml definition. If impossible, returns false. More...
 
CONFIG_EXPORT bool toParentWidget ()
 Pass into the parent node of widget's xml definition. If impossible, returns false. More...
 

Friends

class ModuleBase_WidgetFactory
 

Detailed Description

Provides low-level API for WidgetFactory for reading xml definitions of widgets.

Constructor & Destructor Documentation

◆ Config_WidgetAPI()

Config_WidgetAPI::Config_WidgetAPI ( std::string  theRawXml,
const std::string  theAttributePrefix = "" 
)

These fields are accessible for ModuleBase_WidgetFactory only.

Member Function Documentation

◆ widgetType()

std::string Config_WidgetAPI::widgetType ( ) const

Returns name of widget's node (attribute)

◆ isGroupBoxWidget()

bool Config_WidgetAPI::isGroupBoxWidget ( ) const

Returns true if widget has container type, which means it able to contain other widgets.

◆ isPagedWidget()

bool Config_WidgetAPI::isPagedWidget ( ) const

Returns true if widget has page type; Page is container widget with combo box control to switch between pages.

◆ featureId()

std::string Config_WidgetAPI::featureId ( ) const

Returns id of current feature.

◆ widgetId()

std::string Config_WidgetAPI::widgetId ( ) const

Returns id of current widget.

◆ widgetIcon()

std::string Config_WidgetAPI::widgetIcon ( ) const

Returns icon of current widget.

◆ widgetLabel()

std::string Config_WidgetAPI::widgetLabel ( ) const

Returns text for label of current widget.

◆ widgetTooltip()

std::string Config_WidgetAPI::widgetTooltip ( ) const

Returns text for tooltip of current widget.

◆ getProperty()

std::string Config_WidgetAPI::getProperty ( const char *  thePropName) const

Returns a custom property of current widget.

◆ getBooleanAttribute()

bool Config_WidgetAPI::getBooleanAttribute ( const char *  theAttributeName,
bool  theDefault 
) const

Checks if the XML representation of widget has given attribute, if yes - returns it's bool value, if no, or if the value can not be converted to bool - returns theDefault.

Parameters
theAttributeNameattribute to check
theDefaultdefault value on bad data
Returns
the boolean result

◆ toNextWidget()

bool Config_WidgetAPI::toNextWidget ( )

Pass to the next (sibling) node of widget's xml definition. If impossible, returns false.

◆ toChildWidget()

bool Config_WidgetAPI::toChildWidget ( )

Pass into the child node of widget's xml definition. If impossible, returns false.

◆ toParentWidget()

bool Config_WidgetAPI::toParentWidget ( )

Pass into the parent node of widget's xml definition. If impossible, returns false.