Tue, 15 Mar 2022 19:48:07 +0200
Added line path tool
| 3 | 1 | #include "conditionaledge.h" |
| 2 | ||
|
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
3 | QString ldraw::ConditionalEdge::textRepresentation() const |
| 6 | 4 | { |
|
87
93ec4d630346
added PolygonObject and refactored away a lot of boilerplate
Teemu Piippo <teemu@hecknology.net>
parents:
86
diff
changeset
|
5 | return utility::format("%1 %2 %3 %4", |
|
93ec4d630346
added PolygonObject and refactored away a lot of boilerplate
Teemu Piippo <teemu@hecknology.net>
parents:
86
diff
changeset
|
6 | utility::vertexToStringParens(this->points[0]), |
|
93ec4d630346
added PolygonObject and refactored away a lot of boilerplate
Teemu Piippo <teemu@hecknology.net>
parents:
86
diff
changeset
|
7 | utility::vertexToStringParens(this->points[1]), |
|
93ec4d630346
added PolygonObject and refactored away a lot of boilerplate
Teemu Piippo <teemu@hecknology.net>
parents:
86
diff
changeset
|
8 | utility::vertexToStringParens(this->points[2]), |
|
132
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
87
diff
changeset
|
9 | utility::vertexToStringParens(this->points[3])); |
|
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
77
diff
changeset
|
10 | } |
|
132
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
87
diff
changeset
|
11 | |
|
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
87
diff
changeset
|
12 | ldraw::Object::Type ldraw::ConditionalEdge::typeIdentifier() const |
|
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
87
diff
changeset
|
13 | { |
|
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
87
diff
changeset
|
14 | return Type::ConditionalEdge; |
|
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
87
diff
changeset
|
15 | } |
| 141 | 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]), | |
|
158
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
25 | utility::vertexToString(this->points[3])); |
| 141 | 26 | } |
|
158
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
27 | |
|
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
28 | QString ldraw::ConditionalEdge::iconName() const |
|
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
29 | { |
|
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
30 | return ":/icons/linetype-conditionaledge.png"; |
|
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
31 | } |
|
177
f69d53c053df
Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
32 | |
|
f69d53c053df
Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
33 | QString ldraw::ConditionalEdge::typeName() const |
|
f69d53c053df
Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
34 | { |
|
f69d53c053df
Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
35 | return QObject::tr("conditional edge"); |
|
f69d53c053df
Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
36 | } |