49 QVBoxLayout *main_layout =
new QVBoxLayout(
this);
50 QGridLayout *ach_layout =
new QGridLayout();
52 QPushButton *effects_button;
53 QPushButton *add_button;
54 QPushButton *delete_button;
66 ach_layout->setSizeConstraint(QLayout::SetMaximumSize);
68 label =
new QLabel(QString::fromUtf8(
R__(
"Rule Name")));
69 label->setParent(
this);
70 rname =
new QLineEdit(
this);
73 ach_layout->addWidget(label, row, 0);
74 ach_layout->addWidget(
rname, row++, 2);
76 label =
new QLabel(QString::fromUtf8(
R__(
"Name")));
77 label->setParent(
this);
80 name =
new QLineEdit(
this);
83 ach_layout->addWidget(label, row, 0);
85 ach_layout->addWidget(
name, row++, 2);
87 label =
new QLabel(QString::fromUtf8(
R__(
"Type")));
88 label->setParent(
this);
93 for (
int ach = 0; ach < ACHIEVEMENT_COUNT; ach++) {
94 type_menu->addAction(achievement_type_name(
static_cast<enum achievement_type
>(ach)));
97 connect(
type_menu, SIGNAL(triggered(QAction *)),
100 type_button->setToolButtonStyle(Qt::ToolButtonTextOnly);
101 type_button->setPopupMode(QToolButton::MenuButtonPopup);
105 ach_layout->addWidget(label, row, 0);
108 label =
new QLabel(QString::fromUtf8(
R__(
"Value")));
109 label->setParent(
this);
115 ach_layout->addWidget(label, row, 0);
116 ach_layout->addWidget(
value_box, row++, 2);
118 effects_button =
new QPushButton(QString::fromUtf8(
R__(
"Effects")),
this);
119 connect(effects_button, SIGNAL(pressed()),
this, SLOT(
edit_effects()));
120 ach_layout->addWidget(effects_button, row++, 2);
122 add_button =
new QPushButton(QString::fromUtf8(
R__(
"Add Achievement")),
this);
123 connect(add_button, SIGNAL(pressed()),
this, SLOT(
add_now()));
124 ach_layout->addWidget(add_button, row, 0);
127 delete_button =
new QPushButton(QString::fromUtf8(
R__(
"Remove this Achievement")),
129 connect(delete_button, SIGNAL(pressed()),
this, SLOT(
delete_now()));
130 ach_layout->addWidget(delete_button, row++, 2);
136 main_layout->addLayout(ach_layout);
138 setLayout(main_layout);