19#include <QApplication>
20#include <QButtonGroup>
28#include <QPainterPath>
29#include <QRadioButton>
31#include <QTableWidgetItem>
71#define BUTTON_WAIT (ACTION_COUNT + 1)
72#define BUTTON_CANCEL (BUTTON_WAIT + 1)
73#define BUTTON_COUNT (BUTTON_CANCEL + 1)
356 QStyle *style = this->style();
361 qpal.setColor(QPalette::Active, QPalette::ToolTipText, Qt::white);
374 style->drawComplexControl(QStyle::CC_TitleBar, &
tbar_opt, &p,
this);
376 true,
tbar_opt.text, QPalette::ToolTipText);
377 style->drawItemPixmap(&p,
close_rect, Qt::AlignLeft,
382 win_opt.initFrom(
this);
384 style->drawPrimitive(QStyle::PE_Widget, &
win_opt, &p,
this);
447 styles =
new QTableWidget;
468 nation_tabs->setSelectionMode(QAbstractItemView::SingleSelection);
470 nation_tabs->horizontalHeader()->setVisible(
false);
472 nation_tabs->setEditTriggers(QAbstractItemView::NoEditTriggers);
476 styles->setColumnCount(2);
477 styles->setSelectionMode(QAbstractItemView::SingleSelection);
478 styles->verticalHeader()->setVisible(
false);
479 styles->horizontalHeader()->setVisible(
false);
480 styles->setProperty(
"showGrid",
"false");
481 styles->setProperty(
"selectionBehavior",
"SelectRows");
482 styles->setEditTriggers(QAbstractItemView::NoEditTriggers);
483 styles->setShowGrid(
false);
505 no_name->setTitle(
_(
"Your leader name"));
516 item->setData(Qt::DecorationRole, *pix);
518 size.setWidth(pix->width());
519 size.setHeight(pix->height());
528 header =
styles->horizontalHeader();
529 header->setSectionResizeMode(QHeaderView::Stretch);
530 header->resizeSections(QHeaderView::ResizeToContents);
531 header =
styles->verticalHeader();
532 header->resizeSections(QHeaderView::ResizeToContents);
540 connect(
styles->selectionModel(),
552 connect(
leader_name->lineEdit(), &QLineEdit::returnPressed,
592 title =
_(
"What Nation Will You Be?");
624 item->setText(
_(
"All nations"));
625 item->setData(Qt::UserRole, -99);
648 item->setData(Qt::UserRole,
i - 1);
653 header->resizeSections(QHeaderView::Stretch);
655 header->resizeSections(QHeaderView::ResizeToContents);
713 index =
item->data(Qt::UserRole).toInt();
729 if (pnation->player) {
731 f.setStrikeOut(
true);
736 item->setData(Qt::DecorationRole, (*pix).scaledToHeight(50));
738 item->setData(Qt::DecorationRole, *pix);
747 header->resizeSections(QHeaderView::Stretch);
749 header->resizeSections(QHeaderView::ResizeToContents);
774 qvar = index.data(Qt::UserRole);
797 if (
item->data(Qt::UserRole) ==
qvar) {
818 qvar = index.data(Qt::UserRole);
862 _(
"Nation has been chosen by other player"));
901 gui()->mapview_wdg->find_place(
gui()->mapview_wdg->width() -
x - 4, 4,
919 for (
i = 0;
i <
qlist.size(); ++
i) {
922 if (
i <
qlist.size() - 1) {
948 for (
i = 0;
i < str_list.count();
i++) {
949 x =
qMax(
x,
fm.horizontalAdvance(str_list.at(
i)));
950 y =
y + 3 +
fm.height();
972 for (
i = 0;
i <
qlist.count();
i++) {
985 if (
event->button() == Qt::RightButton) {
1136 qlines.replace(
"\n",
" ");
1140 connect(
close_but, &QAbstractButton::pressed,
this, &QWidget::close);
1175 rule_name =
qnation_set->currentData().toString();
1196 gui()->central_wdg);
1205 QMessageBox *msg =
new QMessageBox(
gui()->central_wdg);
1208 msg->setStandardButtons(QMessageBox::Ok);
1210 msg->setAttribute(Qt::WA_DeleteOnClose);
1221 gui()->mapview_wdg);
1258 gui()->toggle_unit_sel_widget(ptile);
1267 gui()->update_unit_sel();
1312 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
1313 ask->setDefaultButton(QMessageBox::Cancel);
1314 ask->set_text_title(
_(
"You say you wanna revolution?"),
1316 ask->setAttribute(Qt::WA_DeleteOnClose);
1317 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
1341 : QPushButton(
title)
1397 QLabel *
l =
new QLabel(text);
1407 gui()->set_diplo_dialog(
this);
1435 gui()->set_diplo_dialog(
NULL);
1453 QPushButton *next, *prev;
1455 next =
new QPushButton();
1457 next->setIconSize(
QSize(32, 32));
1458 next->setFixedSize(
QSize(36, 36));
1459 prev =
new QPushButton();
1461 prev->setIconSize(
QSize(32, 32));
1462 prev->setFixedSize(
QSize(36, 36));
1473 unit_skip->addWidget(prev, Qt::AlignCenter);
1475 unit_skip->addWidget(next, Qt::AlignCenter);
1496 QObject::connect(button, &QPushButton::clicked,
1512 layout->addWidget(button);
1523 p.setY(p.y()-
this->height());
1524 p.setX(p.x()-
this->width());
1718 layout->removeWidget(button);
1735 layout->addWidget(button);
1745 int target_city_id = data2.toInt();
1750 target_city_id, 0,
"");
1760 int target_city_id = data2.toInt();
1765 target_city_id, 0,
"");
1789 int actor_id = data1.toInt();
1804 int actor_id = data1.toInt();
1821 int actor_id = data1.toInt();
1840 int actor_id = data1.toInt();
1855 int actor_id = data1.toInt();
1870 int actor_id = data1.toInt();
1885 int actor_id = data1.toInt();
1886 int target_id = data2.toInt();
1890 actor_id, target_id, 0,
"");
1899 int actor_id = data1.toInt();
1900 int target_id = data2.toInt();
1904 actor_id, target_id, 0,
"");
2021 foreach (
caras,
gui()->trade_gen.lines) {
2030 i =
gui()->trade_gen.lines.indexOf(
caras);
2031 gui()->trade_gen.lines.takeAt(
i);
2052 "Diplomat queue problem. Is another diplomat window open?");
2061 _(
"Choose Your %s's Strategy"),
2066 _(
"Your %s from %s reaches the city of %s.\nWhat now?"),
2072 _(
"Your %s has arrived at %s.\nWhat is your command?"),
2078 _(
"Your %s is ready to act against %s %s."),
2084 "No target specified.");
2088 _(
"Your %s is waiting for your command."),
2092 cd =
gui()->get_diplo_dialog();
2093 if ((
cd !=
nullptr) &&
cd->targeted_unit !=
nullptr) {
2098 gui()->game_tab_widget,
2327 if (!
af_map.contains(act)) {
2373 button->setText(
title);
2382 int actor_id = data1.toInt();
2383 int target_id = data2.toInt();
2394 int actor_id = data1.toInt();
2395 int target_id = data2.toInt();
2408 int actor_id = data1.toInt();
2409 int target_id = data2.toInt();
2420 int actor_id = data1.toInt();
2421 int target_id = data2.toInt();
2476 int actor_id = data1.toInt();
2477 int target_id = data2.toInt();
2487 int actor_id = data1.toInt();
2488 int target_id = data2.toInt();
2498 int actor_id = data1.toInt();
2499 int target_id = data2.toInt();
2509 int actor_id = data1.toInt();
2510 int target_id = data2.toInt();
2520 int actor_id = data1.toInt();
2521 int target_id = data2.toInt();
2531 int actor_id = data1.toInt();
2532 int target_id = data2.toInt();
2542 int actor_id = data1.toInt();
2543 int target_id = data2.toInt();
2553 int actor_id = data1.toInt();
2554 int target_id = data2.toInt();
2564 int actor_id = data1.toInt();
2565 int target_id = data2.toInt();
2575 int actor_id = data1.toInt();
2576 int target_id = data2.toInt();
2586 int actor_id = data1.toInt();
2587 int target_id = data2.toInt();
2597 int actor_id = data1.toInt();
2598 int target_id = data2.toInt();
2608 int actor_id = data1.toInt();
2609 int target_id = data2.toInt();
2619 int actor_id = data1.toInt();
2620 int target_id = data2.toInt();
2630 int actor_id = data1.toInt();
2631 int target_id = data2.toInt();
2636 actor_id, target_id, 0,
"");
2645 int actor_id = data1.toInt();
2646 int target_id = data2.toInt();
2651 actor_id, target_id, 0,
"");
2660 int actor_id = data1.toInt();
2661 int target_id = data2.toInt();
2666 actor_id, target_id, 0,
"");
2675 int actor_id = data1.toInt();
2676 int target_id = data2.toInt();
2681 actor_id, target_id, 0,
"");
2690 int actor_id = data1.toInt();
2691 int target_id = data2.toInt();
2696 actor_id, target_id, 0,
"");
2705 int actor_id = data1.toInt();
2706 int target_id = data2.toInt();
2711 actor_id, target_id, 0,
"");
2720 int actor_id = data1.toInt();
2721 int target_id = data2.toInt();
2732 int actor_id = data1.toInt();
2733 int target_id = data2.toInt();
2744 int actor_id = data1.toInt();
2745 int target_id = data2.toInt();
2756 int actor_id = data1.toInt();
2757 int target_id = data2.toInt();
2768 int actor_id = data1.toInt();
2769 int target_id = data2.toInt();
2780 int actor_id = data1.toInt();
2781 int target_id = data2.toInt();
2792 int actor_id = data1.toInt();
2793 int target_id = data2.toInt();
2804 int actor_id = data1.toInt();
2805 int target_id = data2.toInt();
2816 int actor_id = data1.toInt();
2827 int actor_id = data1.toInt();
2828 int target_id = data2.toInt();
2833 actor_id, target_id, 0,
"");
2842 int actor_id = data1.toInt();
2843 int target_id = data2.toInt();
2848 actor_id, target_id, 0,
"");
2857 int actor_id = data1.toInt();
2858 int target_id = data2.toInt();
2863 actor_id, target_id, 0,
"");
2872 int actor_id = data1.toInt();
2873 int target_id = data2.toInt();
2878 actor_id, target_id,
2892 int actor_id = data1.toInt();
2893 int target_id = data2.toInt();
2898 actor_id, target_id,
2912 int actor_id = data1.toInt();
2913 int target_id = data2.toInt();
2919 actor_id, target_id,
2933 int actor_id = data1.toInt();
2934 int target_id = data2.toInt();
2940 actor_id, target_id,
2954 int actor_id = data1.toInt();
2955 int target_id = data2.toInt();
2961 actor_id, target_id,
2975 int actor_id = data1.toInt();
2976 int target_id = data2.toInt();
2982 actor_id, target_id,
3041 int actor_id = data1.toInt();
3042 int target_id = data2.toInt();
3047 actor_id, target_id, 0,
"");
3056 int actor_id = data1.toInt();
3057 int target_id = data2.toInt();
3062 actor_id, target_id, 0,
"");
3071 int actor_id = data1.toInt();
3072 int target_id = data2.toInt();
3077 actor_id, target_id, 0,
"");
3086 int actor_id = data1.toInt();
3087 int target_id = data2.toInt();
3092 actor_id, target_id, 0,
"");
3101 int actor_id = data1.toInt();
3102 int target_id = data2.toInt();
3107 actor_id, target_id, 0,
"");
3116 int actor_id = data1.toInt();
3117 int target_id = data2.toInt();
3122 actor_id, target_id, 0,
"");
3131 int actor_id = data1.toInt();
3132 int target_id = data2.toInt();
3137 actor_id, target_id, 0,
"");
3158 cd =
gui()->get_diplo_dialog();
3174 gui()->game_tab_widget,
3195 .replace(
"&",
"&&");
3238 action_id act_id = data1.toList().at(2).toInt();
3242 if (data2.toInt() ==
A_UNSET) {
3259 int actor_id = data1.toInt();
3260 int target_id = data2.toInt();
3373 int actor_id = data1.toInt();
3374 int target_id = data2.toInt();
3379 actor_id, target_id, 0,
"");
3634 int actor_id = data1.toInt();
3635 int target_id = data2.toInt();
3640 actor_id, target_id, 0,
"");
3655 const int act_id =
paction->id;
3661 "Treasury contains %d gold.",
3671 impossible->setStandardButtons(QMessageBox::Ok);
3672 impossible->setAttribute(Qt::WA_DeleteOnClose);
3678 PL_(
"Incite a revolt for %d gold?\n%s",
3679 "Incite a revolt for %d gold?\n%s",
cost),
cost,
buf);
3680 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3681 ask->setDefaultButton(QMessageBox::Cancel);
3682 ask->set_text_title(
buf2,
_(
"Incite a Revolt!"));
3683 ask->setAttribute(Qt::WA_DeleteOnClose);
3684 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
3694 PL_(
"Inciting a revolt costs %d gold.\n%s",
3695 "Inciting a revolt costs %d gold.\n%s",
cost),
cost,
3698 too_much->setStandardButtons(QMessageBox::Ok);
3699 too_much->setAttribute(Qt::WA_DeleteOnClose);
3718 const int act_id =
paction->id;
3724 "Treasury contains %d gold.",
3730 "Bribe unit for %d gold?\n%s",
3732 ask->set_text_title(
buf2,
_(
"Bribe Enemy Unit"));
3733 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3734 ask->setDefaultButton(QMessageBox::Cancel);
3735 ask->setAttribute(Qt::WA_DeleteOnClose);
3736 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
3744 PL_(
"Bribing the unit costs %d gold.\n%s",
3745 "Bribing the unit costs %d gold.\n%s",
cost),
cost,
buf);
3746 ask->set_text_title(
buf2,
_(
"Traitors Demand Too Much!"));
3747 ask->setAttribute(Qt::WA_DeleteOnClose);
3764 what = data1.toInt();
3781 action_id act_id = data1.toList().at(2).toInt();
3785 if (data2.toInt() ==
B_LAST) {
3790 }
else if (data2.toInt() == -1) {
3816 _(
"Select Improvement to Sabotage"),
3817 gui()->game_tab_widget,
3840 if (pimprove->sabotage > 0) {
3844 .replace(
"&",
"&&");
3881 gui()->game_tab_widget);
3915 str =
QString(
PL_(
"Are you sure you want to disband that %1 unit?",
3916 "Are you sure you want to disband those %1 units?",
3966 text =
QString(
"It might not work with other tilesets.\n"
3967 "You are currently using tileset %1.")
3969 ask->addButton(
_(
"Keep current tileset"), QMessageBox::RejectRole);
3970 ask->addButton(
_(
"Load tileset"), QMessageBox::AcceptRole);
3972 ask->setAttribute(Qt::WA_DeleteOnClose);
3974 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
3977 gui()->map_scale)) {
3979 _(
"Can't load requested tileset."));
3997 text =
QString(
"It might not work with other tilesets.\n"
3998 "You are currently using soundset %1.")
4000 ask->addButton(
_(
"Keep current soundset"), QMessageBox::RejectRole);
4001 ask->addButton(
_(
"Load soundset"), QMessageBox::AcceptRole);
4003 ask->setAttribute(Qt::WA_DeleteOnClose);
4004 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4022 text =
QString(
"It might not work with other tilesets.\n"
4023 "You are currently using musicset %1.")
4025 ask->addButton(
_(
"Keep current musicset"), QMessageBox::RejectRole);
4026 ask->addButton(
_(
"Load musicset"), QMessageBox::AcceptRole);
4028 ask->setAttribute(Qt::WA_DeleteOnClose);
4029 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4071 QApplication::alert(
gui()->central_wdg);
4089 gui()->popdown_unit_sel();
4093 if (gtd !=
nullptr) {
4197 asd =
gui()->get_diplo_dialog();
4200 "The action selection dialog should have been open");
4206 "The action selection dialog is for another actor unit.");
4213 if (cancel_button !=
NULL) {
4216 asd->stack_button(cancel_button);
4247 "Action enabled against non existing unit!");
4258 "Action enabled against non existing city!");
4271 "Action enabled against all units on "
4272 "non existing tile!");
4286 if (
asd->get_identified_button(act)) {
4301 asd->unstack_all_buttons();
4312 cd =
gui()->get_diplo_dialog();
4342 QMessageBox *
ask =
new QMessageBox(
parent);
4346 _(
"Tileset \"%s\" problem, it's probably incompatible with "
4350 _(
"Tileset problem, it's probably incompatible with "
4351 "the ruleset:\n%s"), msg);
4355 ask->setStandardButtons(QMessageBox::Ok);
4356 ask->setWindowTitle(
_(
"Tileset error"));
4359 ask->setAttribute(Qt::WA_DeleteOnClose);
4389 title =
_(
"Upgrade Unit!");
4390 ask->setStandardButtons(QMessageBox::Ok);
4392 title =
_(
"Upgrade Obsolete Units");
4393 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
4394 ask->setDefaultButton(QMessageBox::Cancel);
4397 ask->setAttribute(Qt::WA_DeleteOnClose);
4398 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4402 for (
int id : *
uptr) {
4424 ufont.setItalic(
true);
4437 if (p.y() -
height() < 0) {
4497 if (
h_pix !=
nullptr) {
4516 pix->fill(Qt::transparent);
4528 Qt::KeepAspectRatio,
4529 Qt::SmoothTransformation);
4533 Qt::KeepAspectRatio,
4534 Qt::SmoothTransformation);
4536 pixc = QPixmap::fromImage(
img);
4544 ufont.setPixelSize(a);
4608 ||
y <
fm.height() + 3 ||
x < 11) {
4629 if (
event->button() == Qt::RightButton) {
4717 pen.setColor(
palette().color(QPalette::HighlightedText));
4718 painter->setBrush(
palette().color(QPalette::HighlightedText).darker());
4719 painter->setPen(
palette().color(QPalette::HighlightedText).darker());
4720 painter->drawRect(
pix->width() + 10, h, 8, h +
pix->height());
4774 if (
utile !=
nullptr) {
4795 gui()->mapview_wdg->setFocus();
4796 QWidget::closeEvent(
event);
4810 if (
event->angleDelta().y() < 0) {
4828 if (
event->key() == Qt::Key_Escape) {
4833 QWidget::keyPressEvent(
event);
4870#ifndef FREECIV_NDEBUG
4887 }
else if (
tcount == 1) {
4907 int attacker_hp,
int defender_hp,
4908 bool make_att_veteran,
bool make_def_veteran)
4910 if (
gui()->qt_settings.show_battle_log) {
4913 attacker_hp, defender_hp,
4916 gui()->battlelog_wdg->scale,
4917 gui()->battlelog_wdg);
4919 gui()->battlelog_wdg->add_combat_info(
huc);
4920 gui()->battlelog_wdg->show();
4932 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
4933 ask->setDefaultButton(QMessageBox::Cancel);
4935 ask->setAttribute(Qt::WA_DeleteOnClose);
4936 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4939 QObject::connect(
ask, &hud_message_box::rejected, [=]() {
4954 hdr =
QString(
_(
"Are you sure you want to do %1?")).
4971 if (
spr !=
nullptr) {
4972 QDialog *win =
new QDialog(
gui());
4975 QLabel *
lbl =
new QLabel;
4980 lbl->setPixmap(*
pm);
4988 log_error(
_(
"No image for tag \"%s\", requested by the server."), tag);
const char * action_prepare_ui_name(action_id act_id, const char *mnemonic, const struct act_prob prob, const char *custom)
const char * action_id_name_translation(action_id act_id)
bool action_prob_possible(const struct act_prob probability)
static struct action * action_by_number(action_id act_id)
#define action_iterate_end
#define action_id_get_actor_kind(act_id)
#define action_iterate(_act_)
#define action_id_get_target_kind(act_id)
void astr_free(struct astring *astr)
void astr_set(struct astring *astr, const char *format,...)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
void audio_restart(const char *soundset_name, const char *musicset_name)
QRect zealous_crop_rect(QImage &p)
void qtg_canvas_free(struct canvas *store)
struct canvas * qtg_canvas_create(int width, int height)
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
void output_window_append(const struct ft_color color, const char *featured_text)
const char * city_improvement_name_translation(const struct city *pcity, const struct impr_type *pimprove)
const char * city_name_get(const struct city *pcity)
#define INCITE_IMPOSSIBLE_COST
#define city_owner(_pcity_)
#define city_built_iterate(_pcity, _p)
#define city_built_iterate_end
void qtg_real_city_dialog_popup(struct city *pcity)
void stack_button(Choice_dialog_button *button)
struct unit * targeted_unit
void unstack_all_buttons()
Choice_dialog_button * get_identified_button(const int id)
QPushButton * target_unit_button
void update_dialog(const struct act_prob *act_probs)
QList< Choice_dialog_button * > last_buttons_stack
choice_dialog(const QString title, const QString text, QWidget *parent=NULL, void(*run_on_close_in)(int)=NULL)
QVBoxLayout * get_layout()
QList< Choice_dialog_button * > buttons_list
void(* run_on_close)(int)
QList< Choice_dialog_button * > action_button_map
int sub_target_id[ASTK_COUNT]
void execute_action(const int action)
void add_item(QString title, pfcn_void func, QVariant data1, QVariant data2, QString tool_tip, const int button_id)
disband_box(struct unit_list *punits, QWidget *parent=0)
struct unit_list * cpunits
choice_dialog * opened_dialog
choice_dialog * get_diplo_dialog()
void set_diplo_dialog(choice_dialog *widget)
static fc_font * instance()
QFont * get_font(QString name)
QPixmap * get_pixmap(const QString &id)
static fc_icons * instance()
int set_text_title(QString s1, QString s2, bool return_exec=false)
void mouseReleaseEvent(QMouseEvent *event)
notify_dialog(const char *caption, const char *headline, const char *lines, QWidget *parent=0)
void calc_size(int &x, int &y)
void paintEvent(QPaintEvent *paint_event)
void mouseMoveEvent(QMouseEvent *event)
virtual void update_menu()
void mousePressEvent(QMouseEvent *event)
notify_goto(const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile, QWidget *parent)
QPushButton * inspect_but
static qdef_act * action()
static qdef_act * m_instance
void paintEvent(QPaintEvent *event)
void mouseMoveEvent(QMouseEvent *event)
void mousePressEvent(QMouseEvent *event)
void mouseReleaseEvent(QMouseEvent *event)
qfc_dialog(QWidget *parent)
void style_selected(const QItemSelection &sl, const QItemSelection &ds)
QTableWidget * selected_nation_tabs
QPushButton * random_button
void nation_selected(const QItemSelection &sl, const QItemSelection &ds)
void nationset_changed(int index)
void leader_selected(int index)
void group_selected(const QItemSelection &sl, const QItemSelection &ds)
void set_index(int index)
QButtonGroup * sex_buttons
void update_nationset_combo()
races_dialog(struct player *pplayer, QWidget *parent=0)
QTableWidget * nation_tabs
QGridLayout * main_layout
void closeEvent(QCloseEvent *event)
void mouseMoveEvent(QMouseEvent *event)
void paint(QPainter *painter, QPaintEvent *event)
QList< unit * > unit_list
units_select(struct tile *ptile, QWidget *parent)
void paintEvent(QPaintEvent *event)
void wheelEvent(QWheelEvent *event)
void keyPressEvent(QKeyEvent *event)
void mousePressEvent(QMouseEvent *event)
bool client_is_global_observer(void)
enum client_states client_state(void)
void client_unit_init_act_prob_cache(struct unit *punit)
void action_selection_no_longer_in_progress(const int old_actor_id)
void request_unit_load(struct unit *pcargo, struct unit *ptrans, struct tile *ptile)
void unit_focus_set(struct unit *punit)
void request_do_action(action_id action, int actor_id, int target_id, int sub_tgt, const char *name)
void request_unit_disband(struct unit *punit)
void request_action_details(action_id action, int actor_id, int target_id)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
void action_confirmation(struct act_confirmation_data *data, bool confirm)
void action_decision_clear_want(const int old_actor_id)
struct unit * head_of_units_in_focus(void)
void request_unit_upgrade(struct unit *punit)
void action_selection_next_in_focus(const int old_actor_id)
bool qtg_handmade_scenario_warning()
static void attack(QVariant data1, QVariant data2)
static void wipe_units(QVariant data1, QVariant data2)
char forced_tileset_name[512]
int action_selection_target_extra(void)
static void destroy_city(QVariant data1, QVariant data2)
static void spy_sabotage_unit(QVariant data1, QVariant data2)
static void pillage(QVariant data1, QVariant data2)
static void caravan_marketplace(QVariant data1, QVariant data2)
static void clean(QVariant data1, QVariant data2)
static void spy_steal_shared(QVariant data1, QVariant data2, action_id act_id)
static void spy_sabotage(QVariant data1, QVariant data2)
int action_selection_target_tile(void)
static void spy_investigate(QVariant data1, QVariant data2)
static void act_sel_wait(QVariant data1, QVariant data2)
static void nuke_units(QVariant data1, QVariant data2)
int action_selection_actor_unit(void)
static void capture_units(QVariant data1, QVariant data2)
static void road(QVariant data1, QVariant data2)
static bool is_race_dialog_open
static void transport_embark4(QVariant data1, QVariant data2)
bool try_default_unit_action(QVariant q1, QVariant q2)
static void fortify(QVariant data1, QVariant data2)
static void transport_board(QVariant data1, QVariant data2)
static void spy_sabotage_unit_esc(QVariant data1, QVariant data2)
static void disband_unit(QVariant data1, QVariant data2)
static void spy_steal_gold(QVariant data1, QVariant data2)
void popdown_players_report()
static void spy_escape(QVariant data1, QVariant data2)
static void mine(QVariant data1, QVariant data2)
void popup_musicset_suggestion_dialog(void)
static void spy_steal_gold_esc(QVariant data1, QVariant data2)
static void diplomat_embassy(QVariant data1, QVariant data2)
void unit_select_dialog_popup(struct tile *ptile)
void popup_upgrade_dialog(struct unit_list *punits)
void update_nationset_combo()
void action_selection_close(void)
static void cultivate(QVariant data1, QVariant data2)
static void paradrop_enter(QVariant data1, QVariant data2)
void races_update_pickable(bool nationset_change)
int action_selection_target_city(void)
static void spy_steal_something(QVariant data1, QVariant data2)
void popup_notify_goto_dialog(const char *headline, const char *lines, const struct text_tag_list *tags, struct tile *ptile)
static void spy_poison(QVariant data1, QVariant data2)
static void transport_board2(QVariant data1, QVariant data2)
void show_tech_gained_dialog(Tech_type_id tech)
static void base(QVariant data1, QVariant data2)
static void spy_nuke_city_esc(QVariant data1, QVariant data2)
void popup_soundset_suggestion_dialog(void)
static void enter_hut2(QVariant data1, QVariant data2)
void popup_races_dialog(struct player *pplayer)
static void expel_unit(QVariant data1, QVariant data2)
static void paradrop_frighten(QVariant data1, QVariant data2)
static void diplomat_sabotage(QVariant data1, QVariant data2)
void popup_disband_dialog(struct unit_list *punits)
static action_id get_non_targeted_action_id(action_id tgt_action_id)
static void homeless(QVariant data1, QVariant data2)
static void caravan_help_build(QVariant data1, QVariant data2)
void qtg_popup_image(const char *tag)
static void bombard(QVariant data1, QVariant data2)
void popdown_races_dialog(void)
void popup_tileset_suggestion_dialog(void)
static void conquer_city(QVariant data1, QVariant data2)
void revolution_response(struct government *gov)
void popdown_economy_report()
static void join_city(QVariant data1, QVariant data2)
static void spy_request_sabotage_list(QVariant data1, QVariant data2)
static void diplomat_bribe(QVariant data1, QVariant data2)
static void popup_act_confirmation_dialog(QString hdr, QString body, struct act_confirmation_data *data)
static void unit_disband_recover(QVariant data1, QVariant data2)
static void spy_steal(QVariant data1, QVariant data2)
static void airlift(QVariant data1, QVariant data2)
void popup_pillage_dialog(struct unit *punit, bv_extras extras)
void popup_sabotage_dialog(struct unit *actor, struct city *tcity, const struct action *paction)
static void transport_load3(QVariant data1, QVariant data2)
static void bombard_lethal(QVariant data1, QVariant data2)
static void plant(QVariant data1, QVariant data2)
static void nuke(QVariant data1, QVariant data2)
static void disembark2(QVariant data1, QVariant data2)
static void transport_unload(QVariant data1, QVariant data2)
void qtg_request_action_confirmation(const char *expl, struct act_confirmation_data *data)
void action_selection_refresh(struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
void popdown_science_report()
static void transport_load2(QVariant data1, QVariant data2)
static void diplomat_steal(QVariant data1, QVariant data2)
static void unit_upgrade(QVariant data1, QVariant data2)
bool popup_theme_suggestion_dialog(const char *theme_name)
static void enter_hut(QVariant data1, QVariant data2)
static void spy_request_strike_bld_list(QVariant data1, QVariant data2)
static void diplomat_incite_escape(QVariant data1, QVariant data2)
static void found_city(QVariant data1, QVariant data2)
static void diplomat_investigate(QVariant data1, QVariant data2)
void qtg_popup_combat_info(int attacker_unit_id, int defender_unit_id, int attacker_hp, int defender_hp, bool make_att_veteran, bool make_def_veteran)
static void bombard3(QVariant data1, QVariant data2)
static void transport_deboard(QVariant data1, QVariant data2)
static void diplomat_incite(QVariant data1, QVariant data2)
static void paradrop_conquer(QVariant data1, QVariant data2)
void popdown_endgame_report()
static void diplomat_steal_esc(QVariant data1, QVariant data2)
static bool is_more_user_input_needed
static void bombard2(QVariant data1, QVariant data2)
void popup_incite_dialog(struct unit *actor, struct city *tcity, int cost, const struct action *paction)
static const QHash< action_id, pfcn_void > af_map_init(void)
void popdown_all_spaceships_dialogs()
static void nuke_city(QVariant data1, QVariant data2)
void popup_connect_msg(const char *headline, const char *message)
static void diplomat_sabotage_esc(QVariant data1, QVariant data2)
void popdown_units_report()
static void transport_embark2(QVariant data1, QVariant data2)
static void spy_nuke_city(QVariant data1, QVariant data2)
void unit_select_dialog_update_real(void *unused)
static void spy_steal_esc(QVariant data1, QVariant data2)
static void paradrop(QVariant data1, QVariant data2)
static void suicide_attack(QVariant data1, QVariant data2)
void races_toggles_set_sensitive(void)
static void transport_load(QVariant data1, QVariant data2)
static action_id get_production_targeted_action_id(action_id tgt_action_id)
static void paradrop_frighten_conquer(QVariant data1, QVariant data2)
static void convert_unit(QVariant data1, QVariant data2)
static bool did_not_decide
static void spy_poison_esc(QVariant data1, QVariant data2)
static void pillage_something(QVariant data1, QVariant data2)
static void spy_request_sabotage_esc_list(QVariant data1, QVariant data2)
static void transform_terrain(QVariant data1, QVariant data2)
static void conquer_extras(QVariant data1, QVariant data2)
static void regular_move(QVariant data1, QVariant data2)
static void heal_unit2(QVariant data1, QVariant data2)
static void transport_board3(QVariant data1, QVariant data2)
static void spy_embassy(QVariant data1, QVariant data2)
static races_dialog * race_dialog
static void frighten_hut2(QVariant data1, QVariant data2)
static void conquer_city2(QVariant data1, QVariant data2)
static void conquer_extras2(QVariant data1, QVariant data2)
static void frighten_hut(QVariant data1, QVariant data2)
bool qtg_request_transport(struct unit *pcargo, struct tile *ptile)
int action_selection_target_unit(void)
static void irrigate(QVariant data1, QVariant data2)
static void transport_embark3(QVariant data1, QVariant data2)
static void heal_unit(QVariant data1, QVariant data2)
void popdown_city_report()
static void paradrop_enter_conquer(QVariant data1, QVariant data2)
static void unit_home_city(QVariant data1, QVariant data2)
static void transport_embark(QVariant data1, QVariant data2)
bool try_default_city_action(QVariant q1, QVariant q2)
static void keep_moving(QVariant data1, QVariant data2)
static void spy_steal_maps_esc(QVariant data1, QVariant data2)
static void action_entry_update(Choice_dialog_button *button, action_id act, const struct act_prob *act_probs, const char *custom, QVariant data1, QVariant data2)
static void disembark1(QVariant data1, QVariant data2)
void restart_notify_dialogs()
static bool is_showing_pillage_dialog
static void action_entry(choice_dialog *cd, action_id act, const struct act_prob *act_probs, const char *custom, QVariant data1, QVariant data2)
static const QHash< action_id, pfcn_void > af_map
static void caravan_establish_trade(QVariant data1, QVariant data2)
void popdown_all_game_dialogs(void)
static void spy_steal_maps(QVariant data1, QVariant data2)
struct unit struct city struct unit * target_unit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction show_tileset_error
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id popup_bribe_dialog
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit * actor
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs action_selection_no_longer_in_progress_gui_specific
const char const char * headline
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction bool fatal
struct unit struct city struct unit struct tile * target_tile
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city * target_city
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int cost
struct unit struct city struct unit struct tile struct extra_type * target_extra
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction bool const char * tset_name
#define IDENTITY_NUMBER_ZERO
#define PL_(String1, String2, n)
const struct ft_color ftc_client
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
struct government * government_by_number(const Government_type_id gov)
Government_type_id government_number(const struct government *pgovern)
int action_selection_target_extra(void)
static void diplomat_queue_handle_primary(void)
static void diplomat_queue_handle_secondary(void)
void action_selection_refresh(struct unit *actor_unit, struct city *target_city, struct unit *target_unit, struct tile *target_tile, struct extra_type *target_extra, const struct act_prob *act_probs)
static PangoLayout * layout
void popdown_help_dialog(void)
void(* pfcn_void)(QVariant, QVariant)
#define mevent_gpos(__ev__)
#define CAPTURE_DEFAULT_THIS
void nationset_changed(void)
void popup_revolution_dialog(void)
void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation, const char *user_text)
Impr_type_id improvement_number(const struct impr_type *pimprove)
#define fc_assert_msg(condition, message,...)
#define fc_assert(condition)
#define fc_assert_action(condition, action)
#define log_error(message,...)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
void put_unit(const struct unit *punit, struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y)
void center_tile_mapcanvas(const struct tile *ptile)
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
const char * move_points_text(int mp, bool reduce)
const char *const notify_label
Nation_type_id nation_number(const struct nation_type *pnation)
bool nation_leader_is_male(const struct nation_leader *pleader)
const char * nation_adjective_for_player(const struct player *pplayer)
const char * nation_adjective_translation(const struct nation_type *pnation)
struct nation_type * nation_by_number(const Nation_type_id nation)
int nation_set_index(const struct nation_set *pset)
bool is_nation_pickable(const struct nation_type *nation)
const struct nation_leader_list * nation_leaders(const struct nation_type *pnation)
const char * nation_set_name_translation(const struct nation_set *pset)
bool is_nation_playable(const struct nation_type *nation)
bool nation_is_in_group(const struct nation_type *pnation, const struct nation_group *pgroup)
const char * nation_set_description(const struct nation_set *pset)
const char * nation_group_name_translation(const struct nation_group *pgroup)
int nation_set_count(void)
struct nation_group * nation_group_by_number(int id)
struct nation_set * nation_set_by_rule_name(const char *name)
bool is_nation_group_hidden(struct nation_group *pgroup)
struct nation_set * nation_set_by_setting_value(const char *setting)
const char * nation_leader_name(const struct nation_leader *pleader)
int nation_group_count(void)
const char * nation_set_rule_name(const struct nation_set *pset)
struct nation_style * style_of_nation(const struct nation_type *pnation)
#define nation_leader_list_iterate(leaderlist, pleader)
#define nation_sets_iterate_end
#define nation_sets_iterate(NAME_pset)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_leader_list_iterate_end
const struct option_set * server_optset
bool option_str_set(struct option *poption, const char *str)
const char * option_str_get(const struct option *poption)
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
#define REQEST_PLAYER_INITIATED
int dsend_packet_unit_get_actions(struct connection *pc, int actor_unit_id, int target_unit_id, int target_tile_id, int target_extra_id, int request_kind)
int dsend_packet_nation_select_req(struct connection *pc, int player_no, Nation_type_id nation_no, bool is_male, const char *name, int style)
int dsend_packet_city_name_suggestion_req(struct connection *pc, int unit_id)
void start_revolution(void)
void set_government_choice(struct government *government)
int player_number(const struct player *pplayer)
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
const char * sex_name_translation(sex_t kind)
struct sprite int int int int struct sprite int int float bool smooth get_sprite_dimensions
struct packet_ruleset_control control
struct packet_game_info info
bool tech_steal_allow_holes
char preferred_soundset[MAX_LEN_NAME]
char preferred_tileset[MAX_LEN_NAME]
char preferred_musicset[MAX_LEN_NAME]
struct unit::@81::@83 client
struct act_prob * act_prob_cache
const char * style_name_translation(const struct nation_style *pstyle)
int style_number(const struct nation_style *pstyle)
int basic_city_style_for_style(struct nation_style *pstyle)
#define styles_iterate(_p)
#define styles_iterate_end
int fc_snprintf(char *str, size_t n, const char *format,...)
#define sz_strlcpy(dest, src)
#define is_svg_flag_enabled()
#define advance_index_iterate_end
#define advance_index_iterate(_start, _index)
struct extra_type * get_preferred_pillage(bv_extras extras)
bool get_units_upgrade_info(char *buf, size_t bufsz, struct unit_list *punits)
const char * get_act_sel_action_custom_text(struct action *paction, const struct act_prob prob, const struct unit *actor_unit, const struct city *target_city)
const char * act_sel_action_tool_tip(const struct action *paction, const struct act_prob prob)
struct city * tile_city(const struct tile *ptile)
int tileset_hex_width(const struct tileset *t)
int tileset_unit_width(const struct tileset *t)
int tileset_unit_height(const struct tileset *t)
struct sprite * load_popup_sprite(const char *tag)
bool tileset_is_isometric(const struct tileset *t)
struct sprite * get_sample_city_sprite(const struct tileset *t, int style_idx)
const char * tileset_basename(const struct tileset *t)
int tileset_hex_height(const struct tileset *t)
void unload_popup_sprite(const char *tag)
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)
void tileset_error(enum log_level level, const char *tset_name, const char *format,...)
bool tilespec_reread(const char *new_tileset_name, bool game_fully_initialized, float scale)
struct unit * transporter_for_unit_at(const struct unit *pcargo, const struct tile *ptile)
bool could_unit_load(const struct unit *pcargo, const struct unit *ptrans)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
void unit_activity_astr(const struct unit *punit, struct astring *astr)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
#define utype_fuel(ptype)