src/objecttypes/comment.cpp

Thu, 03 Oct 2019 11:45:44 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 03 Oct 2019 11:45:44 +0300
changeset 5
593a658cba8e
parent 3
55a55a9ec2c2
child 6
73e448b2943d
permissions
-rw-r--r--

stuff

#include "comment.h"

modelobjects::Comment::Comment(QStringView text) :
	BaseObject{},
	storedText{text.toString()} {}

QVariant modelobjects::Comment::getProperty(Property property) const
{
	switch (property)
	{
	case Property::Text:
		return storedText;
	default:
		return BaseObject::getProperty(property);
	}
}

auto modelobjects::Comment::setProperty(Property property, const QVariant& value)
	-> SetPropertyResult
{
	switch (property)
	{
	case Property::Text:
		storedText = value.toString();
		return SetPropertyResult::Success;
	default:
		return BaseObject::setProperty(property, value);
	}
}

mercurial