src/linetypes/errorline.h

Sun, 13 Mar 2022 18:46:10 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 13 Mar 2022 18:46:10 +0200
changeset 180
5b7a8f2270ff
parent 177
f69d53c053df
permissions
-rw-r--r--

Handle properties in a generic manner in the object editor

3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
14
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 13
diff changeset
2 #include "object.h"
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3
35
98906a94732f renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
4 namespace ldraw
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 {
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 class ErrorLine;
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 }
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8
35
98906a94732f renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
9 class ldraw::ErrorLine : public Object
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 {
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 public:
86
4bec0525ef1b PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents: 77
diff changeset
12 using BaseClass = Object;
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
13 ErrorLine(QStringView text = u"", QStringView message = u"");
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 QVariant getProperty(Property property) const override;
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
15 QString textRepresentation() const override;
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
16 QBrush textRepresentationForeground() const override;
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
17 QBrush textRepresentationBackground() const override;
132
488d0ba6070b Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents: 86
diff changeset
18 Type typeIdentifier() const override;
134
f77d2230e87c Add remaining serialize methods
Teemu Piippo <teemu@hecknology.net>
parents: 132
diff changeset
19 QDataStream& serialize(QDataStream& stream) const override;
f77d2230e87c Add remaining serialize methods
Teemu Piippo <teemu@hecknology.net>
parents: 132
diff changeset
20 QDataStream& deserialize(QDataStream& stream) override;
141
185eb297dc1e Saving works now
Teemu Piippo <teemu@hecknology.net>
parents: 134
diff changeset
21 QString toLDrawCode() const override;
158
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents: 141
diff changeset
22 QString iconName() const override;
177
f69d53c053df Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents: 158
diff changeset
23 QString typeName() const override;
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
24 QString text;
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
25 QString message;
86
4bec0525ef1b PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents: 77
diff changeset
26 protected:
4bec0525ef1b PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents: 77
diff changeset
27 void setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) override;
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
28 };

mercurial