45#define empty_widget (nullptr)
49#define widgets_row(...) { \
51 QWidget * const wid[] = { __VA_ARGS__ }; \
52 for (unsigned int i = 0; \
53 i < sizeof(wid) / sizeof(wid[0]); i++) {\
55 counter_layout->addWidget(wid[i], \
68 QPushButton *delete_button;
82 label =
new QLabel(QString::fromUtf8(
R__(
"Rule Name")));
83 label->setParent(
this);
84 rname =
new QLineEdit(
this);
89 label =
new QLabel(QString::fromUtf8(
R__(
"Name")));
90 label->setParent(
this);
92 name =
new QLineEdit(
this);
100 label =
new QLabel(QString::fromUtf8(
R__(
"Default Value")),
this);
101 label->setParent(
this);
109 label =
new QLabel(QString::fromUtf8(
R__(
"Checkpoint")),
this);
110 label->setParent(
this);
121 label =
new QLabel(QString::fromUtf8(
R__(
"Behavior")));
122 label->setParent(
this);
138 add_button =
new QPushButton(QString::fromUtf8(
R__(
"Add Counter")),
this);
141 delete_button =
new QPushButton(QString::fromUtf8(
R__(
"Remove this Counter")),
this);
205 name->setEnabled(
false);
207 name->setEnabled(
true);
215 name->setEnabled(
false);
340 ||
pcount->ruledit_disabled) {
void display_msg(const char *msg)
requirers_dlg * create_requirers(const char *title)
void open_effect_edit(QString target, struct universal *uni, enum effect_filter_main_class efmc)
void update_counter_info(struct counter *counter)
bool initialize_new_counter(struct counter *padv)
struct counter * selected
QPushButton * effects_button
void counter_behaviour_selected(int item)
tab_counter(ruledit_gui *ui_in)
QListWidget * counter_list
void same_name_toggle(bool checked)
void default_given(int val)
void checkpoint_given(int val)
int counter_index(const struct counter *pcount)
struct counter * counter_by_rule_name(const char *name)
const char * counter_rule_name(struct counter *pcount)
int counters_get_city_counters_count(void)
struct counter * counter_by_id(int id)
void attach_city_counter(struct counter *counter)
#define city_counters_iterate_end
#define city_counters_iterate(pcount)
#define counters_re_iterate_end
#define counters_re_iterate(pcount)
static void name_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name)
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * untranslated_name(const struct name_translation *ptrans)
static void names_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name, const char *rule_name)
void show_experimental(QWidget *wdg)
void ruledit_qt_display_requirers(const char *msg, void *data)
void strvec_clear(struct strvec *psv)
struct packet_ruleset_control control
enum counter_target target
struct name_translation name
enum counter_behaviour type
bool is_counter_needed(struct counter *pcount, requirers_cb cb, void *data)