Lines Matching refs:component
62 void AnimationConfig::ParseAnimationLabel(nlohmann::json& component, LabelComponentInfo& info) in ParseAnimationLabel() argument
65 if (component.find("id") != component.end()) { in ParseAnimationLabel()
66 info.common.id = component.at("id").get<std::string>(); in ParseAnimationLabel()
68 if (component.find("text") != component.end()) { in ParseAnimationLabel()
69 info.text = component.at("text").get<std::string>(); in ParseAnimationLabel()
71 if (component.find("x") != component.end()) { in ParseAnimationLabel()
72 info.common.x = component.at("x").get<int>(); in ParseAnimationLabel()
74 if (component.find("y") != component.end()) { in ParseAnimationLabel()
75 info.common.y = component.at("y").get<int>(); in ParseAnimationLabel()
77 if (component.find("w") != component.end()) { in ParseAnimationLabel()
78 info.common.w = component.at("w").get<int>(); in ParseAnimationLabel()
80 if (component.find("h") != component.end()) { in ParseAnimationLabel()
81 info.common.h = component.at("h").get<int>(); in ParseAnimationLabel()
83 if (component.find("fontSize") != component.end()) { in ParseAnimationLabel()
84 info.fontSize = component.at("fontSize").get<int8_t>(); in ParseAnimationLabel()
86 if (component.find("fontColor") != component.end()) { in ParseAnimationLabel()
87 info.fontColor = component.at("fontColor").get<std::string>(); in ParseAnimationLabel()
89 if (component.find("bgColor") != component.end()) { in ParseAnimationLabel()
90 info.bgColor = component.at("bgColor").get<std::string>(); in ParseAnimationLabel()
92 if (component.find("align") != component.end()) { in ParseAnimationLabel()
93 info.align = component.at("align").get<std::string>(); in ParseAnimationLabel()
97 void AnimationConfig::ParseAnimationImage(nlohmann::json& component, ImageComponentInfo& info) in ParseAnimationImage() argument
100 if (component.find("id") != component.end()) { in ParseAnimationImage()
101 info.common.id = component.at("id").get<std::string>(); in ParseAnimationImage()
103 if (component.find("x") != component.end()) { in ParseAnimationImage()
104 info.common.x = component.at("x").get<int>(); in ParseAnimationImage()
106 if (component.find("y") != component.end()) { in ParseAnimationImage()
107 info.common.y = component.at("y").get<int>(); in ParseAnimationImage()
109 if (component.find("w") != component.end()) { in ParseAnimationImage()
110 info.common.w = component.at("w").get<int>(); in ParseAnimationImage()
112 if (component.find("h") != component.end()) { in ParseAnimationImage()
113 info.common.h = component.at("h").get<int>(); in ParseAnimationImage()
115 if (component.find("resPath") != component.end()) { in ParseAnimationImage()
116 info.resPath = component.at("resPath").get<std::string>(); in ParseAnimationImage()
118 if (component.find("imgCnt") != component.end()) { in ParseAnimationImage()
119 info.imgCnt = component.at("imgCnt").get<int>(); in ParseAnimationImage()
121 if (component.find("updInterval") != component.end()) { in ParseAnimationImage()
122 info.updInterval = component.at("updInterval").get<int>(); in ParseAnimationImage()
124 if (component.find("filePrefix") != component.end()) { in ParseAnimationImage()
125 info.filePrefix = component.at("filePrefix").get<std::string>(); in ParseAnimationImage()
132 for (auto& component : components) { in ParseAnimationConfig() local
133 if (component.find("type") != component.end()) { in ParseAnimationConfig()
134 auto type = component.at("type").get<std::string>(); in ParseAnimationConfig()
136 ParseAnimationImage(component, animationInfo_.first); in ParseAnimationConfig()
138 ParseAnimationLabel(component, animationInfo_.second); in ParseAnimationConfig()
147 for (auto& component : components) { in ParseLackPowerChargingConfig() local
148 if (component.find("type") != component.end()) { in ParseLackPowerChargingConfig()
149 auto type = component.at("type").get<std::string>(); in ParseLackPowerChargingConfig()
151 ParseAnimationLabel(component, chargingInfo_); in ParseLackPowerChargingConfig()
160 for (auto& component : components) { in ParseLackPowerNotChargingConfig() local
161 if (component.find("type") != component.end()) { in ParseLackPowerNotChargingConfig()
162 auto type = component.at("type").get<std::string>(); in ParseLackPowerNotChargingConfig()
164 ParseAnimationLabel(component, notChargingInfo_); in ParseLackPowerNotChargingConfig()