--- a/src/objecttypes/polygon.cpp Sun Nov 03 17:57:21 2019 +0200 +++ b/src/objecttypes/polygon.cpp Sun Nov 03 18:09:47 2019 +0200 @@ -1,22 +1,22 @@ #include "polygon.h" -modelobjects::Triangle::Triangle( +linetypes::Triangle::Triangle( const Vertex& point_1, const Vertex& point_2, const Vertex& point_3, Color color_index) : - ColoredBaseObject{color_index}, + ColoredObject{color_index}, points{point_1, point_2, point_3} { } -modelobjects::Triangle::Triangle(const QVector<Vertex>& vertices, const Color color) : - ColoredBaseObject{color}, +linetypes::Triangle::Triangle(const QVector<Vertex>& vertices, const Color color) : + ColoredObject{color}, points{vertices[0], vertices[1], vertices[2]} { } -QVariant modelobjects::Triangle::getProperty(const Property id) const +QVariant linetypes::Triangle::getProperty(const Property id) const { switch (id) { @@ -27,11 +27,11 @@ case Property::Point3: return points[2]; default: - return ColoredBaseObject::getProperty(id); + return ColoredObject::getProperty(id); } } -auto modelobjects::Triangle::setProperty(Property id, const QVariant& value) +auto linetypes::Triangle::setProperty(Property id, const QVariant& value) -> SetPropertyResult { switch (id) @@ -46,11 +46,11 @@ points[2] = value.value<Vertex>(); return SetPropertyResult::Success; default: - return ColoredBaseObject::setProperty(id, value); + return ColoredObject::setProperty(id, value); } } -QString modelobjects::Triangle::textRepresentation() const +QString linetypes::Triangle::textRepresentation() const { return utility::format("%1 %2 %3", vertexToStringParens(points[0]), @@ -58,24 +58,24 @@ vertexToStringParens(points[2])); } -modelobjects::Quadrilateral::Quadrilateral( +linetypes::Quadrilateral::Quadrilateral( const Vertex& point_1, const Vertex& point_2, const Vertex& point_3, const Vertex& point_4, Color color_index) : - ColoredBaseObject{color_index}, + ColoredObject{color_index}, points{point_1, point_2, point_3, point_4} { } -modelobjects::Quadrilateral::Quadrilateral(const QVector<Vertex>& vertices, const Color color) : - ColoredBaseObject{color}, +linetypes::Quadrilateral::Quadrilateral(const QVector<Vertex>& vertices, const Color color) : + ColoredObject{color}, points{vertices[0], vertices[1], vertices[2], vertices[3]} { } -QVariant modelobjects::Quadrilateral::getProperty(const Property id) const +QVariant linetypes::Quadrilateral::getProperty(const Property id) const { switch (id) { @@ -88,11 +88,11 @@ case Property::Point4: return points[3]; default: - return ColoredBaseObject::getProperty(id); + return ColoredObject::getProperty(id); } } -auto modelobjects::Quadrilateral::setProperty( +auto linetypes::Quadrilateral::setProperty( const Property id, const QVariant& value) -> SetPropertyResult @@ -112,11 +112,11 @@ points[3] = value.value<Vertex>(); return SetPropertyResult::Success; default: - return ColoredBaseObject::setProperty(id, value); + return ColoredObject::setProperty(id, value); } } -QString modelobjects::Quadrilateral::textRepresentation() const +QString linetypes::Quadrilateral::textRepresentation() const { return utility::format("%1 %2 %3 %4", vertexToStringParens(points[0]),