Debian Codegraph @

wxcrafter/src/BitmapTextArrayProperty.cpp

raw
1 #include "BitmapTextArrayProperty.h"
2 #include <json_node.h>
3
4 BitmapTextArrayProperty::BitmapTextArrayProperty(const wxString& label, const wxString& value, const wxString& tooltip)
5 : PropertyBase(tooltip)
6 {
7 SetLabel(label);
8 m_value = value;
9 }
10
11 BitmapTextArrayProperty::~BitmapTextArrayProperty() {}
12
13 PropertyeType BitmapTextArrayProperty::GetType() { return PT_BITMAPTEXT_TABLE; }
14
15 wxString BitmapTextArrayProperty::GetValue() const { return m_value; }
16
17 JSONElement BitmapTextArrayProperty::Serialize() const
18 {
19 JSONElement json = JSONElement::createObject();
20 json.addProperty(wxT("type"), wxT("BitmapTextArray"));
21 DoBaseSerialize(json);
22 json.addProperty(wxT("m_value"), m_value);
23 return json;
24 }
25
26 void BitmapTextArrayProperty::SetValue(const wxString& value) { m_value = value; }
27
28 void BitmapTextArrayProperty::UnSerialize(const JSONElement& json)
29 {
30 DoBaseUnSerialize(json);
31 m_value = json.namedObject(wxT("m_value")).toString();
32 }