48 QVBoxLayout *main_layout =
new QVBoxLayout(
this);
49 QGridLayout *effect_edit_layout =
new QGridLayout();
50 QHBoxLayout *active_layout =
new QHBoxLayout();
51 QPushButton *close_button;
60 if (filter_in ==
nullptr) {
77 lbl =
new QLabel(
R__(
"Type:"));
78 active_layout->addWidget(lbl, 0);
83 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
effect_type_menu(QAction *)));
85 for (eff = (
enum effect_type)0; eff < EFT_COUNT;
86 eff = (
enum effect_type)(eff + 1)) {
87 menu->addAction(effect_type_name(eff));
91 lbl =
new QLabel(
R__(
"Value:"));
92 active_layout->addWidget(lbl, 2);
98 main_layout->addLayout(active_layout);
104 mp_button->setToolButtonStyle(Qt::ToolButtonTextOnly);
105 mp_button->setPopupMode(QToolButton::MenuButtonPopup);
107 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
multiplier_menu(QAction *)));
113 effect_edit_layout->addWidget(
mp_button, row++, 0);
115 button =
new QPushButton(QString::fromUtf8(
R__(
"Requirements")),
this);
116 connect(button, SIGNAL(pressed()),
this, SLOT(
edit_reqs()));
117 effect_edit_layout->addWidget(button, row++, 0);
119 button =
new QPushButton(QString::fromUtf8(
R__(
"Add Effect")),
this);
120 connect(button, SIGNAL(pressed()),
this, SLOT(
add_now()));
121 effect_edit_layout->addWidget(button, row++, 0);
123 button =
new QPushButton(QString::fromUtf8(
R__(
"Delete Effect")),
this);
124 connect(button, SIGNAL(pressed()),
this, SLOT(
delete_now()));
125 effect_edit_layout->addWidget(button, row++, 0);
127 close_button =
new QPushButton(QString::fromUtf8(
R__(
"Close")),
this);
128 connect(close_button, SIGNAL(pressed()),
this, SLOT(
close_now()));
129 effect_edit_layout->addWidget(close_button, row++, 0);
133 main_layout->addLayout(effect_edit_layout);
135 setLayout(main_layout);
136 setWindowTitle(target);
struct requirement req_from_str(const char *type, const char *range, bool survives, bool present, bool quiet, const char *value)