Wed, 25 May 2022 20:36:34 +0300
Fix pick() picking from weird places on the screen with high DPI scaling
glReadPixels reads data from the frame buffer, which contains data after
high DPI scaling, so any reads to that need to take this scaling into account
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
1 | #pragma once |
14 | 2 | #include "object.h" |
8
44679e468ba9
major update with many things
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 |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
5 | { |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
6 | class MetaCommand; |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
7 | } |
35
98906a94732f
renamed the linetypes namespace to ldraw namespace and added more structures to it
Teemu Piippo <teemu@hecknology.net>
parents:
14
diff
changeset
|
8 | class ldraw::MetaCommand : public Object |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
9 | { |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
10 | public: |
86
4bec0525ef1b
PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents:
77
diff
changeset
|
11 | using BaseClass = Object; |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
12 | MetaCommand() = default; |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
13 | MetaCommand(QStringView text); |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
14 | QVariant getProperty(Property property) const override; |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
15 | QString textRepresentation() const override; |
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
16 | QString storedText = ""; |
132
488d0ba6070b
Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents:
86
diff
changeset
|
17 | Type typeIdentifier() const override; |
134
f77d2230e87c
Add remaining serialize methods
Teemu Piippo <teemu@hecknology.net>
parents:
132
diff
changeset
|
18 | QDataStream& serialize(QDataStream& stream) const override; |
f77d2230e87c
Add remaining serialize methods
Teemu Piippo <teemu@hecknology.net>
parents:
132
diff
changeset
|
19 | QDataStream& deserialize(QDataStream& stream) override; |
141 | 20 | QString toLDrawCode() const override; |
158
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
141
diff
changeset
|
21 | QString iconName() const override; |
177
f69d53c053df
Show type of object in the object editor
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
22 | QString typeName() const override; |
86
4bec0525ef1b
PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents:
77
diff
changeset
|
23 | protected: |
4bec0525ef1b
PolygonObjectEditor can now modify the object properly
Teemu Piippo <teemu@hecknology.net>
parents:
77
diff
changeset
|
24 | void setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) override; |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
25 | }; |