-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextmesc.cpp
More file actions
49 lines (39 loc) · 825 Bytes
/
textmesc.cpp
File metadata and controls
49 lines (39 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "textmesc.h"
TextMESC::TextMESC(int x, int y):
CommonItemMECS(x, y)
{
this->color = QColor(0, 255, 0);
m_itemFlags = Qt::AlignLeft;
m_height = 50;
}
QString TextMESC::GetName()
{
return "Text";
}
QString TextMESC::GetTextName()
{
return "DefaultText";
}
QGridLayout *TextMESC::GetPropertiesWidgets()
{
QGridLayout *layout = new QGridLayout();
return layout;
}
void TextMESC::AcceptWidgetsProperties()
{
}
void TextMESC::Copy(CommonItemMECS *from)
{
CommonItemMECS::Copy(from);
}
QString TextMESC::Save()
{
return QString (
"[Text]\n"\
"Align = center\n") +
CommonItemMECS::Save() +
QString ("Width = %2\n" \
"Height = %3\n" \
"DefaultText = %4\n\n").
arg(getWidth()).arg(getHeight()).arg(getText());
}