src/linetypes/conditionaledge.h

changeset 1269
ec691d9472b3
parent 1261
5d2c9d36da9d
child 1326
69a90bd2dba2
equal deleted inserted replaced
1268:7cbdaefda950 1269:ec691d9472b3
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 };

mercurial