src/objecttypes/metacommand.cpp

changeset 13
6e838748867b
parent 8
44679e468ba9
equal deleted inserted replaced
12:fe67489523b5 13:6e838748867b
1 #include "metacommand.h" 1 #include "metacommand.h"
2 2
3 modelobjects::MetaCommand::MetaCommand(QStringView text) : 3 linetypes::MetaCommand::MetaCommand(QStringView text) :
4 BaseObject{}, 4 Object{},
5 storedText{text.toString()} {} 5 storedText{text.toString()} {}
6 6
7 QVariant modelobjects::MetaCommand::getProperty(Property property) const 7 QVariant linetypes::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 BaseObject::getProperty(property); 14 return Object::getProperty(property);
15 } 15 }
16 } 16 }
17 17
18 auto modelobjects::MetaCommand::setProperty(Property property, const QVariant& value) 18 auto linetypes::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:
24 storedText = value.toString(); 24 storedText = value.toString();
25 return SetPropertyResult::Success; 25 return SetPropertyResult::Success;
26 default: 26 default:
27 return BaseObject::setProperty(property, value); 27 return Object::setProperty(property, value);
28 } 28 }
29 } 29 }
30 30
31 QString modelobjects::MetaCommand::textRepresentation() const 31 QString linetypes::MetaCommand::textRepresentation() const
32 { 32 {
33 return this->storedText; 33 return this->storedText;
34 } 34 }

mercurial