src/linetypes/conditionaledge.cpp

changeset 200
ca23936b455b
parent 199
6988973515d2
child 201
5d201ee4a9c3
equal deleted inserted replaced
199:6988973515d2 200:ca23936b455b
1 #include "conditionaledge.h"
2
3 QString ldraw::ConditionalEdge::textRepresentation() const
4 {
5 return utility::format("%1 %2 %3 %4",
6 utility::vertexToStringParens(this->points[0]),
7 utility::vertexToStringParens(this->points[1]),
8 utility::vertexToStringParens(this->points[2]),
9 utility::vertexToStringParens(this->points[3]));
10 }
11
12 ldraw::Object::Type ldraw::ConditionalEdge::typeIdentifier() const
13 {
14 return Type::ConditionalEdge;
15 }
16
17 QString ldraw::ConditionalEdge::toLDrawCode() const
18 {
19 return utility::format(
20 "5 %1 %2 %3 %4 %5",
21 this->colorIndex.index,
22 utility::vertexToString(this->points[0]),
23 utility::vertexToString(this->points[1]),
24 utility::vertexToString(this->points[2]),
25 utility::vertexToString(this->points[3]));
26 }
27
28 QString ldraw::ConditionalEdge::iconName() const
29 {
30 return ":/icons/linetype-conditionaledge.png";
31 }
32
33 QString ldraw::ConditionalEdge::typeName() const
34 {
35 return QObject::tr("conditional edge");
36 }

mercurial