Debian Codegraph @

wxcrafter/src/multi_strings_property.cpp

raw
1 #include "multi_strings_property.h"
2 #include "multi_string_ctrl.h"
3
4 MultiStringsProperty::MultiStringsProperty(const wxString& label, const wxString& tooltip, const wxString& delim,
5 const wxString& msg)
6 : PropertyBase(tooltip)
7 , m_delim(delim)
8 , m_msg(msg)
9 {
10 SetLabel(label);
11 }
12
13 MultiStringsProperty::~MultiStringsProperty() {}
14
15 wxString MultiStringsProperty::GetValue() const { return m_value; }
16
17 JSONElement MultiStringsProperty::Serialize() const
18 {
19 JSONElement element = JSONElement::createObject();
20 element.addProperty(wxT("type"), wxT("multi-string"));
21 DoBaseSerialize(element);
22 element.addProperty(wxT("m_value"), m_value);
23 return element;
24 }
25
26 void MultiStringsProperty::SetValue(const wxString& value) { m_value = value; }
27
28 void MultiStringsProperty::UnSerialize(const JSONElement& json)
29 {
30 DoBaseUnSerialize(json);
31 m_value = json.namedObject(wxT("m_value")).toString();
32 }