7:68443f5be176 | 8:44679e468ba9 |
---|---|
1 #include <QBrush> | 1 #include <QBrush> |
2 #include "errorline.h" | 2 #include "errorline.h" |
3 | 3 |
4 modelobjects::ErrorLine::ErrorLine(QStringView text) : | 4 modelobjects::ErrorLine::ErrorLine(QStringView text, QStringView message) : |
5 text{text.toString()} | 5 text{text.toString()}, |
6 message{message.toString()} | |
6 { | 7 { |
7 } | 8 } |
8 | 9 |
9 QVariant modelobjects::ErrorLine::getProperty(Property property) const | 10 QVariant modelobjects::ErrorLine::getProperty(Property property) const |
10 { | 11 { |
11 switch (property) | 12 switch (property) |
12 { | 13 { |
13 case Property::Text: | 14 case Property::Text: |
14 return text; | 15 return this->text; |
16 case Property::ErrorMessage: | |
17 return this->message; | |
15 default: | 18 default: |
16 return BaseObject::getProperty(property); | 19 return BaseObject::getProperty(property); |
17 } | 20 } |
18 } | 21 } |
19 | 22 |
23 -> SetPropertyResult | 26 -> SetPropertyResult |
24 { | 27 { |
25 switch (property) | 28 switch (property) |
26 { | 29 { |
27 case Property::Text: | 30 case Property::Text: |
28 text = value.toString(); | 31 this->text = value.toString(); |
32 return SetPropertyResult::Success; | |
33 case Property::ErrorMessage: | |
34 this->message = value.toString(); | |
29 return SetPropertyResult::Success; | 35 return SetPropertyResult::Success; |
30 default: | 36 default: |
31 return BaseObject::setProperty(property, value); | 37 return BaseObject::setProperty(property, value); |
32 } | 38 } |
33 } | 39 } |