42 QHBoxLayout *main_layout =
new QHBoxLayout(
this);
43 QGridLayout *unit_layout =
new QGridLayout();
59 label =
new QLabel(QString::fromUtf8(
R__(
"Requirement")));
60 label->setParent(
this);
65 req_button->setToolButtonStyle(Qt::ToolButtonTextOnly);
66 req_button->setPopupMode(QToolButton::MenuButtonPopup);
71 unit_layout->addWidget(label, row, 0);
74 label =
new QLabel(QString::fromUtf8(
R__(
"Class")));
75 label->setParent(
this);
78 class_button->setToolButtonStyle(Qt::ToolButtonTextOnly);
79 class_button->setPopupMode(QToolButton::MenuButtonPopup);
81 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
class_menu(QAction *)));
89 unit_layout->addWidget(label, row, 0);
92 label =
new QLabel(QString::fromUtf8(
R__(
"Build Cost")));
93 label->setParent(
this);
95 bcost =
new QSpinBox(
this);
96 bcost->setRange(0, 10000);
100 unit_layout->addWidget(label, row, 0);
101 unit_layout->addWidget(
bcost, row++, 1);
103 label =
new QLabel(QString::fromUtf8(
R__(
"Attack Strength")));
104 label->setParent(
this);
106 attack =
new QSpinBox(
this);
107 attack->setRange(0, 1000);
110 unit_layout->addWidget(label, row, 0);
111 unit_layout->addWidget(
attack, row++, 1);
113 label =
new QLabel(QString::fromUtf8(
R__(
"Defense Strength")));
114 label->setParent(
this);
120 unit_layout->addWidget(label, row, 0);
121 unit_layout->addWidget(
defense, row++, 1);
123 label =
new QLabel(QString::fromUtf8(
R__(
"Hitpoints")));
124 label->setParent(
this);
130 unit_layout->addWidget(label, row, 0);
131 unit_layout->addWidget(
hitpoints, row++, 1);
133 label =
new QLabel(QString::fromUtf8(
R__(
"Firepower")));
134 label->setParent(
this);
140 unit_layout->addWidget(label, row, 0);
141 unit_layout->addWidget(
firepower, row++, 1);
143 label =
new QLabel(QString::fromUtf8(
R__(
"Move Rate")));
144 label->setParent(
this);
150 unit_layout->addWidget(label, row, 0);
151 unit_layout->addWidget(
move_rate, row++, 1);
153 label =
new QLabel(QString::fromUtf8(
R__(
"Graphics tag")));
154 label->setParent(
this);
159 unit_layout->addWidget(label, row, 0);
160 unit_layout->addWidget(
gfx_tag, row++, 1);
162 label =
new QLabel(QString::fromUtf8(
R__(
"Alt graphics tag")));
163 label->setParent(
this);
168 unit_layout->addWidget(label, row, 0);
171 label =
new QLabel(QString::fromUtf8(
R__(
"Move sound tag")));
172 label->setParent(
this);
178 unit_layout->addWidget(label, row, 0);
181 label =
new QLabel(QString::fromUtf8(
R__(
"Alt move sound tag")));
182 label->setParent(
this);
188 unit_layout->addWidget(label, row, 0);
191 label =
new QLabel(QString::fromUtf8(
R__(
"Fight sound tag")));
192 label->setParent(
this);
198 unit_layout->addWidget(label, row, 0);
201 label =
new QLabel(QString::fromUtf8(
R__(
"Alt fight sound tag")));
202 label->setParent(
this);
208 unit_layout->addWidget(label, row, 0);
211 button =
new QPushButton(QString::fromUtf8(
R__(
"Helptext")),
this);
212 connect(button, SIGNAL(pressed()),
this, SLOT(
helptext()));
213 unit_layout->addWidget(button, row++, 1);
218 enum unit_type_flag_id flag = (
enum unit_type_flag_id)i;
219 QCheckBox *check =
new QCheckBox();
221 label =
new QLabel(unit_type_flag_id_name(flag));
222 flag_layout->addWidget(label, rowcount, column + 1);
227 if (++rowcount >= 25) {
235 main_layout->addLayout(unit_layout);
238 setLayout(main_layout);