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