src/linetypes/errorline.cpp

changeset 35
98906a94732f
parent 14
20d2ed3af73d
child 86
4bec0525ef1b
equal deleted inserted replaced
34:1de2b8d64e9f 35:98906a94732f
1 #include <QBrush> 1 #include <QBrush>
2 #include "errorline.h" 2 #include "errorline.h"
3 3
4 linetypes::ErrorLine::ErrorLine(QStringView text, QStringView message) : 4 ldraw::ErrorLine::ErrorLine(QStringView text, QStringView message) :
5 text{text.toString()}, 5 text{text.toString()},
6 message{message.toString()} 6 message{message.toString()}
7 { 7 {
8 } 8 }
9 9
10 QVariant linetypes::ErrorLine::getProperty(Property property) const 10 QVariant ldraw::ErrorLine::getProperty(Property property) const
11 { 11 {
12 switch (property) 12 switch (property)
13 { 13 {
14 case Property::Text: 14 case Property::Text:
15 return this->text; 15 return this->text;
18 default: 18 default:
19 return Object::getProperty(property); 19 return Object::getProperty(property);
20 } 20 }
21 } 21 }
22 22
23 auto linetypes::ErrorLine::setProperty( 23 auto ldraw::ErrorLine::setProperty(
24 Property property, 24 Property property,
25 const QVariant& value) 25 const QVariant& value)
26 -> SetPropertyResult 26 -> SetPropertyResult
27 { 27 {
28 switch (property) 28 switch (property)
36 default: 36 default:
37 return Object::setProperty(property, value); 37 return Object::setProperty(property, value);
38 } 38 }
39 } 39 }
40 40
41 QString linetypes::ErrorLine::textRepresentation() const 41 QString ldraw::ErrorLine::textRepresentation() const
42 { 42 {
43 return this->text; 43 return this->text;
44 } 44 }
45 45
46 QBrush linetypes::ErrorLine::textRepresentationForeground() const 46 QBrush ldraw::ErrorLine::textRepresentationForeground() const
47 { 47 {
48 return QBrush{Qt::yellow}; 48 return QBrush{Qt::yellow};
49 } 49 }
50 50
51 QBrush linetypes::ErrorLine::textRepresentationBackground() const 51 QBrush ldraw::ErrorLine::textRepresentationBackground() const
52 { 52 {
53 return QBrush{Qt::red}; 53 return QBrush{Qt::red};
54 } 54 }

mercurial