18#ifdef FREECIV_MSWINDOWS
29#include <QTableWidget>
64 QLabel *version_label;
72 main_layout->setSizeConstraint(QLayout::SetMaximumSize);
74 name_label =
new QLabel(QString::fromUtf8(
R__(
"Ruleset name")));
75 name_label->setParent(
this);
76 main_layout->addWidget(name_label,
row, 0);
77 name =
new QLineEdit(
this);
78 main_layout->addWidget(
name,
row++, 1);
79 version_label =
new QLabel(QString::fromUtf8(
R__(
"Ruleset version")));
80 version_label->setParent(
this);
81 main_layout->addWidget(version_label,
row, 0);
84 save_label =
new QLabel(QString::fromUtf8(
R__(
"Save to directory")));
89#ifdef FREECIV_MSWINDOWS
96 savedir->setText(
"ruledit-tmp");
100 savedir->setText(
"ruledit-tmp");
106 R__(
"If you want to be able to load the ruleset directly "
107 "to freeciv, place it as a subdirectory under %s%s%s\n"
108 "Use server command \"/rulesetdir <subdirectory>\" "
109 "to load it to freeciv."),
115 save_ver_label =
new QLabel(QString::fromUtf8(
R__(
"Version suffix to directory name")));
120 button =
new QPushButton(QString::fromUtf8(
R__(
"Save now")),
this);
122 main_layout->addWidget(button,
row++, 1);
124 label =
new QLabel(QString::fromUtf8(
R__(
"Description from file")));
125 label->setParent(
this);
126 main_layout->addWidget(label,
row, 0);
131 label =
new QLabel(QString::fromUtf8(
R__(
"Description file")));
132 label->setParent(
this);
133 main_layout->addWidget(label,
row, 0);
137 button =
new QPushButton(QString::fromUtf8(
R__(
"Sanity check rules")),
this);
139 main_layout->addWidget(button,
row++, 1);
141 button =
new QPushButton(QString::fromUtf8(
R__(
"Always active Effects")),
this);
143 main_layout->addWidget(button,
row++, 1);
144 button =
new QPushButton(QString::fromUtf8(
R__(
"All Effects")),
this);
146 main_layout->addWidget(button,
row++, 1);
148 stats =
new QTableWidget(
this);
149 stats->setColumnCount(8);
150 stats->setRowCount(7);
235 stats->verticalHeader()->setVisible(
false);
236 stats->horizontalHeader()->setVisible(
false);
237 stats->setEditTriggers(QAbstractItemView::NoEditTriggers);
238 main_layout->addWidget(
stats,
row++, 0, 1, 2);
239 button =
new QPushButton(QString::fromUtf8(
R__(
"Refresh Stats")),
this);
241 main_layout->addWidget(button,
row++, 0, 1, 2);
296 QMessageBox *box =
new QMessageBox();
298 box->setText(
"Current data fails sanity checks. Save anyway?");
299 box->setStandardButtons(QMessageBox::Yes | QMessageBox::No);
302 if (box->result() != QMessageBox::Yes) {
348 stats->item(
row++, 1)->setText(QString::number(count));
356 stats->item(
row++, 1)->setText(QString::number(count));
362 stats->item(
row++, 1)->setText(QString::number(count));
368 stats->item(
row++, 1)->setText(QString::number(count));
374 stats->item(
row++, 1)->setText(QString::number(count));
382 stats->item(
row++, 1)->setText(QString::number(count));
390 stats->item(
row++, 4)->setText(QString::number(count));
398 stats->item(
row++, 4)->setText(QString::number(count));
404 stats->item(
row++, 4)->setText(QString::number(count));
410 stats->item(
row++, 4)->setText(QString::number(count));
417 stats->item(
row++, 4)->setText(QString::number(count));
426 stats->item(
row++, 7)->setText(QString::number(count));
440 stats->item(
row++, 7)->setText(QString::number(count));
448 stats->item(
row++, 7)->setText(QString::number(count));
454 stats->item(
row++, 7)->setText(QString::number(count));
458 stats->item(
row++, 7)->setText(QString::number(count));
460 stats->resizeColumnsToContents();
#define achievements_re_active_iterate(_p)
#define achievements_re_active_iterate_end
struct action_enabler_list * action_enablers_for_action(action_id action)
#define action_enabler_list_re_iterate_end
#define action_enabler_list_re_iterate(action_enabler_list, aenabler)
#define action_iterate_end
#define action_iterate(_act_)
Base_type_id base_count(void)
void add(const char *msg)
void display_msg(const char *msg)
void open_effect_edit(QString target, struct universal *uni, enum effect_filter_main_class efmc)
void desc_file_toggle(bool checked)
QCheckBox * desc_via_file
QCheckBox * savedir_version
tab_misc(ruledit_gui *ui_in)
#define counters_re_iterate_end
#define counters_re_iterate(pcount)
bool iterate_effect_cache(iec_cb cb, void *data)
#define governments_re_active_iterate(_p)
#define governments_re_active_iterate_end
#define improvement_re_active_iterate_end
#define improvement_re_active_iterate(_p)
#define multipliers_re_active_iterate(_mul_)
#define multipliers_re_active_iterate_end
Road_type_id road_count(void)
void rscompat_init_info(struct rscompat_info *info)
bool save_ruleset(const char *path, const char *name, struct rule_data *data)
char * freeciv_storage_dir(void)
#define specialist_type_re_active_iterate_end
#define specialist_type_re_active_iterate(_p)
struct packet_ruleset_control control
struct civ_game::@31::@35::@40 ruledit
struct civ_game::@31::@35 server
char version[MAX_LEN_NAME]
#define styles_re_active_iterate_end
#define styles_re_active_iterate(_p)
int fc_snprintf(char *str, size_t n, const char *format,...)
static conversion_log * sanitylog
static void sanity_log_cb(const char *msg)
static bool effect_counter(struct effect *peff, void *data)
#define advance_re_active_iterate(_p)
#define tech_class_re_active_iterate(_p)
#define advance_re_active_iterate_end
#define tech_class_re_active_iterate_end
#define terrain_re_active_iterate_end
#define terrain_re_active_iterate(_p)
#define goods_type_re_active_iterate_end
#define goods_type_re_active_iterate(_p)
#define unit_type_re_active_iterate(_p)
#define unit_class_re_active_iterate_end
#define unit_class_re_active_iterate(_p)
#define unit_type_re_active_iterate_end