23 * Represents a single code-2 line in the LDraw code file. |
23 * Represents a single code-2 line in the LDraw code file. |
24 */ |
24 */ |
25 class LDEdgeLine : public LDObject |
25 class LDEdgeLine : public LDObject |
26 { |
26 { |
27 public: |
27 public: |
28 static constexpr LDObjectType SubclassType = LDObjectType::EdgeLine; |
28 static const LDObjectType SubclassType = LDObjectType::EdgeLine; |
|
29 |
|
30 LDEdgeLine() = default; |
|
31 LDEdgeLine(Vertex v1, Vertex v2); |
29 |
32 |
30 virtual LDObjectType type() const override |
33 virtual LDObjectType type() const override |
31 { |
34 { |
32 return SubclassType; |
35 return LDObjectType::EdgeLine; |
33 } |
36 } |
34 |
37 |
35 virtual QString asText() const override; |
38 virtual QString asText() const override; |
36 int numVertices() const override { return 2; } |
39 int numVertices() const override { return 2; } |
37 LDColor defaultColor() const override { return EdgeColor; } |
40 LDColor defaultColor() const override { return EdgeColor; } |
38 QString typeName() const override { return "line"; } |
41 QString typeName() const override { return "line"; } |
39 |
|
40 protected: |
|
41 friend class Model; |
|
42 LDEdgeLine (Model* model); |
|
43 LDEdgeLine (Vertex v1, Vertex v2, Model* model = nullptr); |
|
44 }; |
42 }; |