src/linetypes/metacommand.cpp

changeset 35
98906a94732f
parent 14
20d2ed3af73d
child 86
4bec0525ef1b
equal deleted inserted replaced
34:1de2b8d64e9f 35:98906a94732f
1 #include "metacommand.h" 1 #include "metacommand.h"
2 2
3 linetypes::MetaCommand::MetaCommand(QStringView text) : 3 ldraw::MetaCommand::MetaCommand(QStringView text) :
4 Object{}, 4 Object{},
5 storedText{text.toString()} {} 5 storedText{text.toString()} {}
6 6
7 QVariant linetypes::MetaCommand::getProperty(Property property) const 7 QVariant ldraw::MetaCommand::getProperty(Property property) const
8 { 8 {
9 switch (property) 9 switch (property)
10 { 10 {
11 case Property::Text: 11 case Property::Text:
12 return storedText; 12 return storedText;
13 default: 13 default:
14 return Object::getProperty(property); 14 return Object::getProperty(property);
15 } 15 }
16 } 16 }
17 17
18 auto linetypes::MetaCommand::setProperty(Property property, const QVariant& value) 18 auto ldraw::MetaCommand::setProperty(Property property, const QVariant& value)
19 -> SetPropertyResult 19 -> SetPropertyResult
20 { 20 {
21 switch (property) 21 switch (property)
22 { 22 {
23 case Property::Text: 23 case Property::Text:
26 default: 26 default:
27 return Object::setProperty(property, value); 27 return Object::setProperty(property, value);
28 } 28 }
29 } 29 }
30 30
31 QString linetypes::MetaCommand::textRepresentation() const 31 QString ldraw::MetaCommand::textRepresentation() const
32 { 32 {
33 return this->storedText; 33 return this->storedText;
34 } 34 }

mercurial