#include <ConfigDataWidget.hpp>
◆ ConfigDataWidget()
ConfigDataWidget::ConfigDataWidget |
( |
| ) |
|
◆ ~ConfigDataWidget()
ConfigDataWidget::~ConfigDataWidget |
( |
| ) |
|
|
overridedefault |
◆ configInit()
void ConfigDataWidget::configInit |
( |
const Json::Value & |
root_ | ) |
|
|
overridevirtual |
Initialize the configuration.
- Parameters
-
Implements ConfigDataBase.
45 if (root.empty() || !root.isObject()) {
46 throw std::runtime_error(
"Invalid configuration file");
48 if (root[
"Type"].empty() || !root[
"Type"].isString()) {
51 type = root[
"Type"].asString();
53 if (root[
"Plugin"].empty() || !root[
"Plugin"].isString()) {
58 if (root[
"Font"].empty() || !root[
"Font"].isString()) {
63 if (root[
"Font_Size"].empty() || !root[
"Font_Size"].isInt()) {
66 fontSize = root[
"Font_Size"].asInt();
68 if (root[
"Border_Size"].empty() || !root[
"Border_Size"].isInt()) {
73 if (root[
"Border_Color"].empty() || !root[
"Border_Color"].isString()) {
78 if (root[
"Position"].empty() || !root[
"Position"].isInt()) {
83 if (root[
"Size"].empty() || !root[
"Size"].isInt()) {
86 size = root[
"Size"].asInt();
88 if (root[
"Color"].empty() || !root[
"Color"].isString()) {
93 if (root[
"Background_Color"].empty() || !root[
"Background_Color"].isString()) {
98 if (!root[
"Arguments"].isString()) {
101 args = root[
"Arguments"].asString();
@ L_ERROR
Definition: Logger.hpp:51
static unsigned long colorCodeToULong(const std::string &colorCode)
Convert a string containing a color code to unsigned long.
Definition: ConfigHandler.cpp:94
virtual void Log(const std::string &message, LogLevel level) const
Log a message This method logs a message to the log file or stream. The message is only logged if the...
Definition: Logger.cpp:73
static Logger * GetInstance()
Get the Logger object.
Definition: Logger.cpp:41
References args, bgColor, borderColor, borderSize, ConfigHandler::colorCodeToULong(), fgColor, fontName, fontSize, Logger::GetInstance(), L_ERROR, Logger::Log(), pluginLocation, position, size, and type.
◆ configSave()
Json::Value ConfigDataWidget::configSave |
( |
| ) |
|
|
overridevirtual |
Build a Json::Value object with the configuration.
- Returns
- Json::Value Object with the current runtime configuration
Implements ConfigDataBase.
106 return Json::Value();
◆ getArgs()
const std::string & ConfigDataWidget::getArgs |
( |
| ) |
const |
◆ getBgColor()
unsigned long ConfigDataWidget::getBgColor |
( |
| ) |
const |
◆ getBorderColor()
unsigned long ConfigDataWidget::getBorderColor |
( |
| ) |
const |
◆ getBorderSize()
int ConfigDataWidget::getBorderSize |
( |
| ) |
const |
◆ getFgColor()
unsigned long ConfigDataWidget::getFgColor |
( |
| ) |
const |
◆ getFontName()
const std::string & ConfigDataWidget::getFontName |
( |
| ) |
const |
◆ getFontSize()
int ConfigDataWidget::getFontSize |
( |
| ) |
const |
◆ getPluginLocation()
const std::string & ConfigDataWidget::getPluginLocation |
( |
| ) |
const |
◆ getPosition()
int ConfigDataWidget::getPosition |
( |
| ) |
const |
◆ getSize()
int ConfigDataWidget::getSize |
( |
| ) |
const |
◆ getType()
const std::string & ConfigDataWidget::getType |
( |
| ) |
const |
◆ args
std::string ConfigDataWidget::args |
|
private |
◆ bgColor
unsigned long ConfigDataWidget::bgColor |
|
private |
◆ borderColor
unsigned long ConfigDataWidget::borderColor |
|
private |
◆ borderSize
int ConfigDataWidget::borderSize |
|
private |
◆ fgColor
unsigned long ConfigDataWidget::fgColor |
|
private |
◆ fontName
std::string ConfigDataWidget::fontName |
|
private |
◆ fontSize
int ConfigDataWidget::fontSize |
|
private |
◆ pluginLocation
std::string ConfigDataWidget::pluginLocation |
|
private |
◆ position
int ConfigDataWidget::position |
|
private |
◆ size
int ConfigDataWidget::size |
|
private |
◆ type
std::string ConfigDataWidget::type |
|
private |
The documentation for this class was generated from the following files: