#include <sensesp/ui/config_item.h>
Definition at line 70 of file config_item.h.
◆ from_json()
virtual bool sensesp::ConfigItemBase::from_json |
( |
const JsonObject & | config | ) |
const |
|
pure virtual |
◆ get_config_item()
static std::shared_ptr< ConfigItemBase > sensesp::ConfigItemBase::get_config_item |
( |
const String | key | ) |
|
|
inlinestatic |
◆ get_config_items()
static std::unique_ptr< std::vector< std::shared_ptr< ConfigItemBase > > > sensesp::ConfigItemBase::get_config_items |
( |
| ) |
|
|
inlinestatic |
◆ get_config_path()
virtual const String & sensesp::ConfigItemBase::get_config_path |
( |
| ) |
const |
|
pure virtual |
◆ get_config_schema()
virtual const String sensesp::ConfigItemBase::get_config_schema |
( |
| ) |
const |
|
inlinevirtual |
Returns a configuration schema that specifies the key/value pairs that can be expected when calling get_configuration(), or are expected by set_configuration(). The schema will be in JSON Schema format
- See also
- https://json-schema.org
Definition at line 100 of file config_item.h.
◆ get_default_config_schema()
virtual const String sensesp::ConfigItemBase::get_default_config_schema |
( |
| ) |
const |
|
protectedpure virtual |
◆ get_description()
const String & sensesp::ConfigItemBase::get_description |
( |
| ) |
const |
|
inline |
Returns a configuration description that is visible in the web UI. You can use HTML tags to make description more readable.
Definition at line 83 of file config_item.h.
◆ get_sort_order()
int sensesp::ConfigItemBase::get_sort_order |
( |
| ) |
const |
|
inline |
◆ get_title()
const String & sensesp::ConfigItemBase::get_title |
( |
| ) |
const |
|
inline |
◆ load()
virtual bool sensesp::ConfigItemBase::load |
( |
| ) |
|
|
pure virtual |
◆ refresh()
virtual bool sensesp::ConfigItemBase::refresh |
( |
| ) |
|
|
pure virtual |
◆ requires_restart()
bool sensesp::ConfigItemBase::requires_restart |
( |
| ) |
const |
|
inline |
Return true if the ConfigItemT requires restart after saving for the changes to take effect.
Definition at line 118 of file config_item.h.
◆ save()
virtual bool sensesp::ConfigItemBase::save |
( |
| ) |
|
|
pure virtual |
◆ set_description()
ConfigItemBase * sensesp::ConfigItemBase::set_description |
( |
const String & | description | ) |
|
|
inline |
◆ set_requires_restart()
ConfigItemBase * sensesp::ConfigItemBase::set_requires_restart |
( |
bool | requires_restart | ) |
|
|
inline |
Set the requires_restart flag.
- Parameters
-
Definition at line 125 of file config_item.h.
◆ set_sort_order()
ConfigItemBase * sensesp::ConfigItemBase::set_sort_order |
( |
int | sort_order | ) |
|
|
inline |
◆ set_title()
ConfigItemBase * sensesp::ConfigItemBase::set_title |
( |
const String & | title | ) |
|
|
inline |
◆ to_json()
virtual bool sensesp::ConfigItemBase::to_json |
( |
JsonObject & | config | ) |
const |
|
pure virtual |
◆ ConfigItem
template<typename T >
std::shared_ptr< ConfigItemT< T > > ConfigItem |
( |
std::shared_ptr< T > | config_object | ) |
|
|
friend |
Register a ConfigItemT with the ConfigItemBase.
Note, this function only exists to avoid having to provide the template argument when creating a ConfigItemT. It should be possible to remove it once C++17 is supported.
- Template Parameters
-
- Parameters
-
config_object | |
title | |
description | |
sort_order | |
- Returns
- T*
Definition at line 289 of file config_item.h.
◆ config_items_
std::map< String, std::shared_ptr< ConfigItemBase > > sensesp::ConfigItemBase::config_items_ |
|
staticprotected |
◆ config_path_
String sensesp::ConfigItemBase::config_path_ = "" |
|
protected |
◆ config_schema_
String sensesp::ConfigItemBase::config_schema_ = "" |
|
protected |
◆ description_
String sensesp::ConfigItemBase::description_ = "" |
|
protected |
◆ requires_restart_
bool sensesp::ConfigItemBase::requires_restart_ = false |
|
protected |
Flag to indicate whether the ConfigItemT setting requires a restart to take effect after saving the configuration.
Definition at line 187 of file config_item.h.
◆ sort_order_
int sensesp::ConfigItemBase::sort_order_ = 1000 |
|
protected |
◆ title_
String sensesp::ConfigItemBase::title_ = "" |
|
protected |
The documentation for this class was generated from the following files: