|
1 #include "comment.h" |
|
2 |
|
3 modelobjects::Comment::Comment(QStringView text) : |
|
4 BaseObject{}, |
|
5 storedText{text.toString()} {} |
|
6 |
|
7 QVariant modelobjects::Comment::getProperty(Property property) const |
|
8 { |
|
9 switch (property) |
|
10 { |
|
11 case Property::Text: |
|
12 return storedText; |
|
13 default: |
|
14 return BaseObject::getProperty(property); |
|
15 } |
|
16 } |
|
17 |
|
18 auto modelobjects::Comment::setProperty(Property property, const QVariant& value) |
|
19 -> SetPropertyResult |
|
20 { |
|
21 switch (property) |
|
22 { |
|
23 case Property::Text: |
|
24 storedText = value.toString(); |
|
25 return SetPropertyResult::Success; |
|
26 default: |
|
27 return BaseObject::setProperty(property, value); |
|
28 } |
|
29 } |