|
1 #include <QBrush> |
|
2 #include <QFont> |
1 #include "modelobject.h" |
3 #include "modelobject.h" |
2 |
4 |
|
5 /* |
3 static Uuid &getUuidForNewObject() |
6 static Uuid &getUuidForNewObject() |
4 { |
7 { |
5 static Uuid running_uuid {0, 0}; |
8 static Uuid running_uuid {0, 0}; |
6 incrementUuid(running_uuid); |
9 incrementUuid(running_uuid); |
7 return running_uuid; |
10 return running_uuid; |
8 } |
11 } |
|
12 */ |
|
13 |
|
14 static unsigned int getIdForNewObject() |
|
15 { |
|
16 static unsigned int id = 0; |
|
17 id += 1; |
|
18 return id; |
|
19 } |
9 |
20 |
10 modelobjects::BaseObject::BaseObject() : |
21 modelobjects::BaseObject::BaseObject() : |
11 id {getUuidForNewObject()} |
22 id {getIdForNewObject()} |
12 { |
23 { |
13 } |
24 } |
14 |
25 |
15 modelobjects::BaseObject::~BaseObject() |
26 modelobjects::BaseObject::~BaseObject() |
16 { |
27 { |
31 -> SetPropertyResult |
42 -> SetPropertyResult |
32 { |
43 { |
33 Q_UNUSED(id) |
44 Q_UNUSED(id) |
34 Q_UNUSED(value) |
45 Q_UNUSED(value) |
35 return SetPropertyResult::PropertyNotHandled; |
46 return SetPropertyResult::PropertyNotHandled; |
|
47 } |
|
48 |
|
49 QBrush modelobjects::BaseObject::textRepresentationForeground() const |
|
50 { |
|
51 return {}; |
|
52 } |
|
53 |
|
54 QBrush modelobjects::BaseObject::textRepresentationBackground() const |
|
55 { |
|
56 return {}; |
|
57 } |
|
58 |
|
59 QFont modelobjects::BaseObject::textRepresentationFont() const |
|
60 { |
|
61 return {}; |
36 } |
62 } |
37 |
63 |
38 modelobjects::ColoredBaseObject::ColoredBaseObject(const Color color_index) : |
64 modelobjects::ColoredBaseObject::ColoredBaseObject(const Color color_index) : |
39 color_index{color_index} |
65 color_index{color_index} |
40 { |
66 { |