src/linetypes/comment.cpp

Sat, 05 Mar 2022 15:40:43 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 15:40:43 +0200
changeset 167
c1ff4f107569
parent 141
185eb297dc1e
permissions
-rw-r--r--

the grid now has less lines

6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
1 #include <QFont>
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include "comment.h"
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 QFont ldraw::Comment::textRepresentationFont() const
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
5 {
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
6 QFont font;
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
7 font.setItalic(true);
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
8 return font;
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
9 }
132
488d0ba6070b Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents: 35
diff changeset
10
488d0ba6070b Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents: 35
diff changeset
11 ldraw::Object::Type ldraw::Comment::typeIdentifier() const
488d0ba6070b Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents: 35
diff changeset
12 {
488d0ba6070b Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents: 35
diff changeset
13 return Type::Comment;
488d0ba6070b Begin work with serialization
Teemu Piippo <teemu@hecknology.net>
parents: 35
diff changeset
14 }
134
f77d2230e87c Add remaining serialize methods
Teemu Piippo <teemu@hecknology.net>
parents: 132
diff changeset
15
141
185eb297dc1e Saving works now
Teemu Piippo <teemu@hecknology.net>
parents: 134
diff changeset
16 QString ldraw::Comment::toLDrawCode() const
185eb297dc1e Saving works now
Teemu Piippo <teemu@hecknology.net>
parents: 134
diff changeset
17 {
185eb297dc1e Saving works now
Teemu Piippo <teemu@hecknology.net>
parents: 134
diff changeset
18 return ("0 // " + this->storedText).trimmed();
185eb297dc1e Saving works now
Teemu Piippo <teemu@hecknology.net>
parents: 134
diff changeset
19 }
185eb297dc1e Saving works now
Teemu Piippo <teemu@hecknology.net>
parents: 134
diff changeset
20

mercurial