diff options
Diffstat (limited to 'src/properties.cc')
-rw-r--r-- | src/properties.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/properties.cc b/src/properties.cc index c9263cb..ad40adc 100644 --- a/src/properties.cc +++ b/src/properties.cc @@ -14,10 +14,34 @@ Properties::Properties() { } +Properties::Properties(const Properties & other) +{ + assign(other); +} + Properties::~Properties() { } +void Properties::assign(const Properties & other) +{ + properties_comment = other.properties_comment; + + properties_comments.clear(); + for (Comments::const_iterator i = properties_comments.constBegin(); i != properties_comments.constEnd(); ++i) { + set_comment(i.key(), i.value()); + } + + properties_label = other.properties_label; + properties_name = other.properties_name; + + properties_location = other.properties_location; + properties_color = other.properties_color; + + properties_info = other.properties_info; + properties_values = other.properties_values; +} + void Properties::add_value(const QString &key, const QString &value, const QString &comment) { if (comment.size()) |