src/modeleditcontext.cpp

Sat, 14 Dec 2019 23:00:01 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 14 Dec 2019 23:00:01 +0200
changeset 20
cef43609a374
parent 13
6e838748867b
child 24
1a0faaaceb84
permissions
-rw-r--r--

fixed build

3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #include "modeleditcontext.h"
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 Model::EditContext::EditContext(Model& model) :
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 model{model}
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 }
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7
13
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
8 void Model::EditContext::append(std::unique_ptr<linetypes::Object>&& object)
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
9 {
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
10 this->model.append(std::move(object));
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
11 }
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
12
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 void Model::EditContext::setObjectProperty(
13
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
14 linetypes::Object* object,
6e838748867b renamings
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
15 linetypes::Property property,
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 const QVariant& value)
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 {
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 object->setProperty(property, value);
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 }

mercurial