Feature #1128 » 0040-Ruledit-Allow-enabler-addition-and-removal-on-non-ex.patch
tools/ruledit/tab_enablers.cpp | ||
---|---|---|
QGridLayout *enabler_layout = new QGridLayout();
|
||
QLabel *label;
|
||
QPushButton *add_button;
|
||
int row = 0;
|
||
ui = ui_in;
|
||
connect(ui, SIGNAL(req_vec_may_have_changed(const requirement_vector *)),
|
||
... | ... | |
label = new QLabel(QString::fromUtf8(R__("Type")));
|
||
label->setParent(this);
|
||
enabler_layout->addWidget(label, 0, 0);
|
||
enabler_layout->addWidget(label, row, 0);
|
||
type_button = new QToolButton();
|
||
type_menu = new QMenu();
|
||
... | ... | |
type_button->setText(R__("None"));
|
||
type_button->setEnabled(false);
|
||
enabler_layout->addWidget(type_button, 0, 2);
|
||
enabler_layout->addWidget(type_button, row++, 1);
|
||
act_reqs_button
|
||
= new QPushButton(QString::fromUtf8(R__("Actor Requirements")), this);
|
||
connect(act_reqs_button, SIGNAL(pressed()),
|
||
this, SLOT(edit_actor_reqs()));
|
||
act_reqs_button->setEnabled(false);
|
||
enabler_layout->addWidget(act_reqs_button, 1, 2);
|
||
enabler_layout->addWidget(act_reqs_button, row++, 1);
|
||
tgt_reqs_button
|
||
= new QPushButton(QString::fromUtf8(R__("Target Requirements")),
|
||
... | ... | |
connect(tgt_reqs_button, SIGNAL(pressed()),
|
||
this, SLOT(edit_target_reqs()));
|
||
tgt_reqs_button->setEnabled(false);
|
||
enabler_layout->addWidget(tgt_reqs_button, 2, 2);
|
||
enabler_layout->addWidget(tgt_reqs_button, row++, 1);
|
||
add_button = new QPushButton(QString::fromUtf8(R__("Add Enabler")), this);
|
||
connect(add_button, SIGNAL(pressed()), this, SLOT(add_now()));
|
||
enabler_layout->addWidget(add_button, 3, 0);
|
||
show_experimental(add_button);
|
||
enabler_layout->addWidget(add_button, row, 0);
|
||
delete_button = new QPushButton(QString::fromUtf8(R__("Remove this Enabler")), this);
|
||
connect(delete_button, SIGNAL(pressed()), this, SLOT(delete_now()));
|
||
delete_button->setEnabled(false);
|
||
enabler_layout->addWidget(delete_button, 3, 2);
|
||
show_experimental(delete_button);
|
||
enabler_layout->addWidget(delete_button, row++, 1);
|
||
repair_button = new QPushButton(this);
|
||
connect(repair_button, SIGNAL(pressed()), this, SLOT(repair_now()));
|
||
repair_button->setEnabled(false);
|
||
repair_button->setText(QString::fromUtf8(R__("Enabler Issues")));
|
||
enabler_layout->addWidget(repair_button, 3, 1);
|
||
enabler_layout->addWidget(repair_button, row++, 1);
|
||
refresh();
|
||
... | ... | |
**************************************************************************/
|
||
bool tab_enabler::initialize_new_enabler(struct action_enabler *enabler)
|
||
{
|
||
enabler->ruledit_disabled = false;
|
||
return true;
|
||
}
|
||
... | ... | |
action_enablers_iterate(enabler) {
|
||
if (enabler->ruledit_disabled) {
|
||
if (initialize_new_enabler(enabler)) {
|
||
enabler->ruledit_disabled = false;
|
||
update_enabler_info(enabler);
|
||
refresh();
|
||
}
|
- « Previous
- 1
- 2
- Next »