43 struct requirement_vector *preqs) : QDialog()
45 QVBoxLayout *main_layout =
new QVBoxLayout(
this);
46 QGridLayout *reqedit_layout =
new QGridLayout();
47 QHBoxLayout *active_layout =
new QHBoxLayout();
48 QPushButton *close_button;
49 QPushButton *add_button;
50 QPushButton *delete_button;
66 lbl =
new QLabel(
R__(
"Type:"));
67 active_layout->addWidget(lbl, 0);
72 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
req_type_menu(QAction *)));
79 menu->addAction(universals_n_name(univ_id));
84 lbl =
new QLabel(
R__(
"Value:"));
85 active_layout->addWidget(lbl, 2);
102 lbl =
new QLabel(
R__(
"Range:"));
103 active_layout->addWidget(lbl, 5);
108 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
req_range_menu(QAction *)));
111 menu->addAction(req_range_name(range_id));
119 connect(menu, SIGNAL(triggered(QAction *)),
this, SLOT(
req_present_menu(QAction *)));
121 menu->addAction(
R__(
"Allows"));
122 menu->addAction(
R__(
"Prevents"));
125 main_layout->addLayout(active_layout);
127 add_button =
new QPushButton(QString::fromUtf8(
R__(
"Add Requirement")),
this);
128 connect(add_button, SIGNAL(pressed()),
this, SLOT(
add_now()));
129 reqedit_layout->addWidget(add_button, 0, 0);
131 delete_button =
new QPushButton(QString::fromUtf8(
R__(
"Delete Requirement")),
this);
132 connect(delete_button, SIGNAL(pressed()),
this, SLOT(
delete_now()));
133 reqedit_layout->addWidget(delete_button, 1, 0);
135 close_button =
new QPushButton(QString::fromUtf8(
R__(
"Close")),
this);
136 connect(close_button, SIGNAL(pressed()),
this, SLOT(
close_now()));
137 reqedit_layout->addWidget(close_button, 2, 0);
141 main_layout->addLayout(reqedit_layout);
143 setLayout(main_layout);
144 setWindowTitle(target);
bool req_text_insert(char *buf, size_t bufsz, struct player *pplayer, const struct requirement *preq, enum rt_verbosity verb, const char *prefix)