GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
IconListViewParser.cpp
Go to the documentation of this file.
2
4
5using namespace std;
6
7namespace gui_framework
8{
9 namespace parsers
10 {
12 imagesWidth(0),
13 imagesHeight(0),
14 type(utility::iconListViewType::icon)
15 {
16
17 }
18
19 void IconListViewParser::parse(const json::utility::jsonObject& description)
20 {
21 BaseComponentParser::parse(description);
22
23 vector<string> tem = json::utility::JSONArrayWrapper(description.getArray("listViewIconValues")).getAsStringArray();
24
25 icons.reserve(tem.size());
26
27 for (const auto& i : tem)
28 {
29 icons.emplace_back(i);
30 }
31
32 imagesWidth = static_cast<uint16_t>(description.getUnsignedInt("imagesWidth"));
33 imagesHeight= static_cast<uint16_t>(description.getUnsignedInt("imagesHeight"));
34
36 {
38 }
39 else
40 {
42 }
43 }
44 }
45}
virtual void parse(const json::utility::jsonObject &description)
virtual void parse(const json::utility::jsonObject &description) override
std::vector< std::filesystem::path > icons