SensESP 3.0.0-beta.6
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::CheckboxConfig Class Reference

#include <sensesp/ui/ui_controls.h>

Inheritance diagram for sensesp::CheckboxConfig:
[legend]

Public Member Functions

 CheckboxConfig (bool value, String title, String config_path)
 
virtual bool to_json (JsonObject &doc) override
 
virtual bool from_json (const JsonObject &config) override
 
bool get_value ()
 
- Public Member Functions inherited from sensesp::FileSystemSaveable
 FileSystemSaveable (const String &config_path)
 
virtual bool load () override
 Load and populate the object from a persistent storage.
 
virtual bool save () override
 Save the object to a persistent storage.
 
virtual bool clear () override
 Delete the data from a persistent storage.
 
bool find_config_file (const String &config_path, String &filename)
 
- Public Member Functions inherited from sensesp::Saveable
 Saveable (const String &config_path)
 
virtual bool refresh ()
 Refresh the object. This may or may not access the persistent storage but is not expected to overwrite the object's state.
 
const String & get_config_path () const
 
- Public Member Functions inherited from sensesp::Serializable

Protected Attributes

bool value_ = false
 
String title_ = "Enable"
 
- Protected Attributes inherited from sensesp::Saveable
const String config_path_
 

Friends

const String ConfigSchema (const CheckboxConfig &obj)
 

Detailed Description

Definition at line 55 of file ui_controls.h.

Constructor & Destructor Documentation

◆ CheckboxConfig()

sensesp::CheckboxConfig::CheckboxConfig ( bool value,
String title,
String config_path )
inline

Definition at line 57 of file ui_controls.h.

Here is the call graph for this function:

Member Function Documentation

◆ from_json()

bool sensesp::CheckboxConfig::from_json ( const JsonObject & root)
overridevirtual

Deserializes the current object data from a JsonObject.

Reimplemented from sensesp::Serializable.

Definition at line 42 of file ui_controls.cpp.

◆ get_value()

bool sensesp::CheckboxConfig::get_value ( )
inline

Definition at line 65 of file ui_controls.h.

◆ to_json()

bool sensesp::CheckboxConfig::to_json ( JsonObject & root)
overridevirtual

Serializes the current object data into a JsonObject.

Reimplemented from sensesp::Serializable.

Definition at line 37 of file ui_controls.cpp.

Friends And Related Symbol Documentation

◆ ConfigSchema

const String ConfigSchema ( const CheckboxConfig & obj)
friend

Definition at line 74 of file ui_controls.h.

Member Data Documentation

◆ title_

String sensesp::CheckboxConfig::title_ = "Enable"
protected

Definition at line 69 of file ui_controls.h.

◆ value_

bool sensesp::CheckboxConfig::value_ = false
protected

Definition at line 68 of file ui_controls.h.


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