src/objecttypes/comment.cpp

changeset 3
55a55a9ec2c2
child 6
73e448b2943d
equal deleted inserted replaced
2:2bdc3ac5e77c 3:55a55a9ec2c2
1 #include "comment.h"
2
3 modelobjects::Comment::Comment(QStringView text) :
4 BaseObject{},
5 storedText{text.toString()} {}
6
7 QVariant modelobjects::Comment::getProperty(Property property) const
8 {
9 switch (property)
10 {
11 case Property::Text:
12 return storedText;
13 default:
14 return BaseObject::getProperty(property);
15 }
16 }
17
18 auto modelobjects::Comment::setProperty(Property property, const QVariant& value)
19 -> SetPropertyResult
20 {
21 switch (property)
22 {
23 case Property::Text:
24 storedText = value.toString();
25 return SetPropertyResult::Success;
26 default:
27 return BaseObject::setProperty(property, value);
28 }
29 }

mercurial