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