76 if (problem != NULL) {
82 if (problem != NULL) {
95 QVBoxLayout *main_layout =
new QVBoxLayout(
this);
96 QGridLayout *enabler_layout =
new QGridLayout();
98 QPushButton *add_button;
101 connect(
ui, SIGNAL(req_vec_may_have_changed(
const requirement_vector *)),
111 enabler_layout->setSizeConstraint(QLayout::SetMaximumSize);
113 label =
new QLabel(QString::fromUtf8(
R__(
"Type")));
114 label->setParent(
this);
115 enabler_layout->addWidget(label, 0, 0);
124 connect(
type_menu, SIGNAL(triggered(QAction *)),
127 type_button->setToolButtonStyle(Qt::ToolButtonTextOnly);
128 type_button->setPopupMode(QToolButton::MenuButtonPopup);
137 =
new QPushButton(QString::fromUtf8(
R__(
"Actor Requirements")),
this);
144 =
new QPushButton(QString::fromUtf8(
R__(
"Target Requirements")),
151 add_button =
new QPushButton(QString::fromUtf8(
R__(
"Add Enabler")),
this);
152 connect(add_button, SIGNAL(pressed()),
this, SLOT(
add_now()));
153 enabler_layout->addWidget(add_button, 3, 0);
156 delete_button =
new QPushButton(QString::fromUtf8(
R__(
"Remove this Enabler")),
this);
170 main_layout->addLayout(enabler_layout);
172 setLayout(main_layout);
185 if (!enabler->ruledit_disabled) {
187 QListWidgetItem *
item;
192 item =
new QListWidgetItem(QString::fromUtf8(buffer));
257 if (
item ==
nullptr) {
275 if (
item !=
nullptr &&
item->isSelected()) {
312 if (enabler->ruledit_disabled) {
355 if (&enabler->actor_reqs == vec || &enabler->target_reqs == vec) {
369 an_bytes =
action->text().toUtf8();
372 if (
selected !=
nullptr && paction !=
nullptr) {
472 return my_name.toUtf8().data();
struct req_vec_problem * action_enabler_suggest_repair(const struct action_enabler *enabler)
struct req_vec_problem * action_enabler_suggest_improvement(const struct action_enabler *enabler)
const char * action_enabler_vector_by_number_name(req_vec_num_in_item vec)
struct action * action_by_rule_name(const char *name)
const char * action_rule_name(const struct action *action)
const char * action_id_rule_name(action_id act_id)
void action_enabler_free(struct action_enabler *enabler)
void action_enabler_add(struct action_enabler *enabler)
struct action_enabler * action_enabler_new(void)
bool action_id_exists(const action_id act_id)
bool action_enabler_remove(struct action_enabler *enabler)
struct action_enabler * action_enabler_copy(const struct action_enabler *original)
struct requirement_vector * action_enabler_vector_by_number(const void *enabler, req_vec_num_in_item number)
#define action_enablers_iterate_end
#define enabler_get_action(_enabler_)
static struct action * action_by_number(action_id act_id)
#define action_iterate_end
#define action_enablers_iterate(_enabler_)
#define action_iterate(_act_)
fix_enabler_item(struct action_enabler *enabler)
void apply_accepted_changes()
struct req_vec_problem * find_next_problem(void)
bool vector_in_item(const struct requirement_vector *vec)
requirement_vector_namer vector_namer()
virtual ~fix_enabler_item()
struct action_enabler * local_copy
void undo_accepted_changes()
struct action_enabler * current_enabler
requirement_vector_by_number vector_getter()
void * item_working_copy()
void open_req_vec_fix(req_vec_fix_item *item_info)
void open_req_edit(QString target, struct requirement_vector *preqs)
void incoming_req_vec_change(const requirement_vector *vec)
void edit_type(QAction *action)
struct action_enabler * selected
QPushButton * act_reqs_button
QToolButton * type_button
tab_enabler(ruledit_gui *ui_in)
QPushButton * tgt_reqs_button
QListWidget * enabler_list
QPushButton * delete_button
bool initialize_new_enabler(struct action_enabler *enabler)
QPushButton * repair_button
void update_enabler_info(struct action_enabler *enabler)
#define fc_assert_ret(condition)
void mark_item(QListWidgetItem *item, enum req_vec_problem_seriousness problem_level)
req_vec_problem_seriousness
void req_vec_problem_free(struct req_vec_problem *issue)
const char *(* requirement_vector_namer)(req_vec_num_in_item number)
struct requirement_vector *(* requirement_vector_by_number)(const void *parent_item, req_vec_num_in_item number)
void show_experimental(QWidget *wdg)
struct requirement_vector actor_reqs
struct requirement_vector target_reqs
int fc_snprintf(char *str, size_t n, const char *format,...)
static enum req_vec_problem_seriousness enabler_problem_level(struct action_enabler *enabler)