src/objecttypes/edge.cpp

changeset 8
44679e468ba9
parent 6
73e448b2943d
child 13
6e838748867b
--- a/src/objecttypes/edge.cpp	Sat Oct 05 23:47:03 2019 +0300
+++ b/src/objecttypes/edge.cpp	Sun Nov 03 12:17:41 2019 +0200
@@ -8,6 +8,13 @@
 	point_1{point_1},
 	point_2{point_2} {}
 
+modelobjects::Edge::Edge(const QVector<Vertex>& vertices, const Color color) :
+	ColoredBaseObject{color},
+	point_1{vertices[0]},
+	point_2{vertices[1]}
+{
+}
+
 QVariant modelobjects::Edge::getProperty(Property property) const
 {
 	switch (property)
@@ -39,5 +46,5 @@
 
 QString modelobjects::Edge::textRepresentation() const
 {
-	return format("%1 %2", vertexToStringParens(point_1), vertexToStringParens(point_2));
+	return utility::format("%1 %2", vertexToStringParens(point_1), vertexToStringParens(point_2));
 }

mercurial