Sun, 03 Nov 2019 12:56:42 +0200
added saving of splitter state and recent files
#include <QBrush> #include "errorline.h" modelobjects::ErrorLine::ErrorLine(QStringView text, QStringView message) : text{text.toString()}, message{message.toString()} { } QVariant modelobjects::ErrorLine::getProperty(Property property) const { switch (property) { case Property::Text: return this->text; case Property::ErrorMessage: return this->message; default: return BaseObject::getProperty(property); } } auto modelobjects::ErrorLine::setProperty( Property property, const QVariant& value) -> SetPropertyResult { switch (property) { case Property::Text: this->text = value.toString(); return SetPropertyResult::Success; case Property::ErrorMessage: this->message = value.toString(); return SetPropertyResult::Success; default: return BaseObject::setProperty(property, value); } } QString modelobjects::ErrorLine::textRepresentation() const { return this->text; } QBrush modelobjects::ErrorLine::textRepresentationForeground() const { return QBrush{Qt::yellow}; } QBrush modelobjects::ErrorLine::textRepresentationBackground() const { return QBrush{Qt::red}; }