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)
358 QStyle *style = this->style();
363 qpal.setColor(QPalette::Active, QPalette::ToolTipText, Qt::white);
376 style->drawComplexControl(QStyle::CC_TitleBar, &
tbar_opt, &p,
this);
378 true,
tbar_opt.text, QPalette::ToolTipText);
379 style->drawItemPixmap(&p,
close_rect, Qt::AlignLeft,
384 win_opt.initFrom(
this);
386 style->drawPrimitive(QStyle::PE_Widget, &
win_opt, &p,
this);
449 styles =
new QTableWidget;
470 nation_tabs->setSelectionMode(QAbstractItemView::SingleSelection);
472 nation_tabs->horizontalHeader()->setVisible(
false);
474 nation_tabs->setEditTriggers(QAbstractItemView::NoEditTriggers);
478 styles->setColumnCount(2);
479 styles->setSelectionMode(QAbstractItemView::SingleSelection);
480 styles->verticalHeader()->setVisible(
false);
481 styles->horizontalHeader()->setVisible(
false);
482 styles->setProperty(
"showGrid",
"false");
483 styles->setProperty(
"selectionBehavior",
"SelectRows");
484 styles->setEditTriggers(QAbstractItemView::NoEditTriggers);
485 styles->setShowGrid(
false);
507 no_name->setTitle(
_(
"Your leader name"));
518 item->setData(Qt::DecorationRole, *pix);
520 size.setWidth(pix->width());
521 size.setHeight(pix->height());
530 header =
styles->horizontalHeader();
531 header->setSectionResizeMode(QHeaderView::Stretch);
532 header->resizeSections(QHeaderView::ResizeToContents);
533 header =
styles->verticalHeader();
534 header->resizeSections(QHeaderView::ResizeToContents);
542 connect(
styles->selectionModel(),
554 connect(
leader_name->lineEdit(), &QLineEdit::returnPressed,
593 }
else if (pplayer !=
nullptr && pplayer ==
client_player()) {
594 title =
_(
"What Nation Will You Be?");
626 item->setText(
_(
"All nations"));
627 item->setData(Qt::UserRole, -99);
650 item->setData(Qt::UserRole,
i - 1);
655 header->resizeSections(QHeaderView::Stretch);
657 header->resizeSections(QHeaderView::ResizeToContents);
715 index =
item->data(Qt::UserRole).toInt();
731 if (pnation->player) {
733 f.setStrikeOut(
true);
738 item->setData(Qt::DecorationRole, (*pix).scaledToHeight(50));
740 item->setData(Qt::DecorationRole, *pix);
749 header->resizeSections(QHeaderView::Stretch);
751 header->resizeSections(QHeaderView::ResizeToContents);
776 qvar = index.data(Qt::UserRole);
799 if (
item->data(Qt::UserRole) ==
qvar) {
820 qvar = index.data(Qt::UserRole);
864 _(
"Nation has been chosen by other player"));
903 gui()->mapview_wdg->find_place(
gui()->mapview_wdg->width() -
x - 4, 4,
921 for (
i = 0;
i <
qlist.size(); ++
i) {
924 if (
i <
qlist.size() - 1) {
950 for (
i = 0;
i < str_list.count();
i++) {
951 x =
qMax(
x,
fm.horizontalAdvance(str_list.at(
i)));
952 y =
y + 3 +
fm.height();
974 for (
i = 0;
i <
qlist.count();
i++) {
987 if (
event->button() == Qt::RightButton) {
1138 qlines.replace(
"\n",
" ");
1142 connect(
close_but, &QAbstractButton::pressed,
this, &QWidget::close);
1177 rule_name =
qnation_set->currentData().toString();
1198 gui()->central_wdg);
1207 QMessageBox *msg =
new QMessageBox(
gui()->central_wdg);
1210 msg->setStandardButtons(QMessageBox::Ok);
1212 msg->setAttribute(Qt::WA_DeleteOnClose);
1223 gui()->mapview_wdg);
1257 if (ptile !=
nullptr
1260 gui()->toggle_unit_sel_widget(ptile);
1269 gui()->update_unit_sel();
1314 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
1315 ask->setDefaultButton(QMessageBox::Cancel);
1316 ask->set_text_title(
_(
"You say you wanna revolution?"),
1318 ask->setAttribute(Qt::WA_DeleteOnClose);
1319 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
1343 : QPushButton(
title)
1399 QLabel *
l =
new QLabel(text);
1409 gui()->set_diplo_dialog(
this);
1437 gui()->set_diplo_dialog(
nullptr);
1455 QPushButton *next, *prev;
1457 next =
new QPushButton();
1459 next->setIconSize(
QSize(32, 32));
1460 next->setFixedSize(
QSize(36, 36));
1461 prev =
new QPushButton();
1463 prev->setIconSize(
QSize(32, 32));
1464 prev->setFixedSize(
QSize(36, 36));
1475 unit_skip->addWidget(prev, Qt::AlignCenter);
1477 unit_skip->addWidget(next, Qt::AlignCenter);
1498 QObject::connect(button, &QPushButton::clicked,
1514 layout->addWidget(button);
1525 p.setY(p.y()-
this->height());
1526 p.setX(p.x()-
this->width());
1720 layout->removeWidget(button);
1737 layout->addWidget(button);
1747 int target_city_id = data2.toInt();
1752 target_city_id, 0,
"");
1762 int target_city_id = data2.toInt();
1767 target_city_id, 0,
"");
1791 int actor_id = data1.toInt();
1806 int actor_id = data1.toInt();
1823 int actor_id = data1.toInt();
1842 int actor_id = data1.toInt();
1857 int actor_id = data1.toInt();
1872 int actor_id = data1.toInt();
1887 int actor_id = data1.toInt();
1888 int target_id = data2.toInt();
1892 actor_id, target_id, 0,
"");
1901 int actor_id = data1.toInt();
1902 int target_id = data2.toInt();
1906 actor_id, target_id, 0,
"");
2023 foreach (
caras,
gui()->trade_gen.lines) {
2033 i =
gui()->trade_gen.lines.indexOf(
caras);
2034 gui()->trade_gen.lines.takeAt(
i);
2058 "Diplomat queue problem. Is another diplomat window open?");
2067 _(
"Choose Your %s's Strategy"),
2072 _(
"Your %s from %s reaches the city of %s.\nWhat now?"),
2078 _(
"Your %s has arrived at %s.\nWhat is your command?"),
2084 _(
"Your %s is ready to act against %s %s."),
2092 "No target specified.");
2096 _(
"Your %s is waiting for your command."),
2100 cd =
gui()->get_diplo_dialog();
2101 if ((
cd !=
nullptr) &&
cd->targeted_unit !=
nullptr) {
2106 gui()->game_tab_widget,
2335 if (!
af_map.contains(act)) {
2381 button->setText(
title);
2390 int actor_id = data1.toInt();
2391 int target_id = data2.toInt();
2402 int actor_id = data1.toInt();
2403 int target_id = data2.toInt();
2416 int actor_id = data1.toInt();
2417 int target_id = data2.toInt();
2428 int actor_id = data1.toInt();
2429 int target_id = data2.toInt();
2501 int actor_id = data1.toInt();
2502 int target_id = data2.toInt();
2512 int actor_id = data1.toInt();
2513 int target_id = data2.toInt();
2523 int actor_id = data1.toInt();
2524 int target_id = data2.toInt();
2534 int actor_id = data1.toInt();
2535 int target_id = data2.toInt();
2545 int actor_id = data1.toInt();
2546 int target_id = data2.toInt();
2556 int actor_id = data1.toInt();
2557 int target_id = data2.toInt();
2567 int actor_id = data1.toInt();
2568 int target_id = data2.toInt();
2578 int actor_id = data1.toInt();
2579 int target_id = data2.toInt();
2589 int actor_id = data1.toInt();
2590 int target_id = data2.toInt();
2600 int actor_id = data1.toInt();
2601 int target_id = data2.toInt();
2611 int actor_id = data1.toInt();
2612 int target_id = data2.toInt();
2622 int actor_id = data1.toInt();
2623 int target_id = data2.toInt();
2633 int actor_id = data1.toInt();
2634 int target_id = data2.toInt();
2644 int actor_id = data1.toInt();
2645 int target_id = data2.toInt();
2655 int actor_id = data1.toInt();
2656 int target_id = data2.toInt();
2661 actor_id, target_id, 0,
"");
2670 int actor_id = data1.toInt();
2671 int target_id = data2.toInt();
2676 actor_id, target_id, 0,
"");
2685 int actor_id = data1.toInt();
2686 int target_id = data2.toInt();
2691 actor_id, target_id, 0,
"");
2700 int actor_id = data1.toInt();
2701 int target_id = data2.toInt();
2706 actor_id, target_id, 0,
"");
2715 int actor_id = data1.toInt();
2716 int target_id = data2.toInt();
2721 actor_id, target_id, 0,
"");
2730 int actor_id = data1.toInt();
2731 int target_id = data2.toInt();
2736 actor_id, target_id, 0,
"");
2745 int actor_id = data1.toInt();
2746 int target_id = data2.toInt();
2757 int actor_id = data1.toInt();
2758 int target_id = data2.toInt();
2769 int actor_id = data1.toInt();
2770 int target_id = data2.toInt();
2781 int actor_id = data1.toInt();
2782 int target_id = data2.toInt();
2793 int actor_id = data1.toInt();
2794 int target_id = data2.toInt();
2805 int actor_id = data1.toInt();
2806 int target_id = data2.toInt();
2817 int actor_id = data1.toInt();
2818 int target_id = data2.toInt();
2829 int actor_id = data1.toInt();
2830 int target_id = data2.toInt();
2841 int actor_id = data1.toInt();
2852 int actor_id = data1.toInt();
2853 int target_id = data2.toInt();
2858 actor_id, target_id, 0,
"");
2867 int actor_id = data1.toInt();
2868 int target_id = data2.toInt();
2873 actor_id, target_id, 0,
"");
2882 int actor_id = data1.toInt();
2883 int target_id = data2.toInt();
2888 actor_id, target_id, 0,
"");
2897 int actor_id = data1.toInt();
2898 int target_id = data2.toInt();
2903 actor_id, target_id,
2917 int actor_id = data1.toInt();
2918 int target_id = data2.toInt();
2923 actor_id, target_id,
2937 int actor_id = data1.toInt();
2938 int target_id = data2.toInt();
2944 actor_id, target_id,
2958 int actor_id = data1.toInt();
2959 int target_id = data2.toInt();
2965 actor_id, target_id,
2979 int actor_id = data1.toInt();
2980 int target_id = data2.toInt();
2986 actor_id, target_id,
3000 int actor_id = data1.toInt();
3001 int target_id = data2.toInt();
3007 actor_id, target_id,
3066 int actor_id = data1.toInt();
3067 int target_id = data2.toInt();
3072 actor_id, target_id, 0,
"");
3081 int actor_id = data1.toInt();
3082 int target_id = data2.toInt();
3087 actor_id, target_id, 0,
"");
3096 int actor_id = data1.toInt();
3097 int target_id = data2.toInt();
3102 actor_id, target_id, 0,
"");
3111 int actor_id = data1.toInt();
3112 int target_id = data2.toInt();
3117 actor_id, target_id, 0,
"");
3126 int actor_id = data1.toInt();
3127 int target_id = data2.toInt();
3132 actor_id, target_id, 0,
"");
3141 int actor_id = data1.toInt();
3142 int target_id = data2.toInt();
3147 actor_id, target_id, 0,
"");
3156 int actor_id = data1.toInt();
3157 int target_id = data2.toInt();
3162 actor_id, target_id, 0,
"");
3183 cd =
gui()->get_diplo_dialog();
3184 if (
cd !=
nullptr) {
3199 gui()->game_tab_widget,
3220 .replace(
"&",
"&&");
3263 action_id act_id = data1.toList().at(2).toInt();
3267 if (data2.toInt() ==
A_UNSET) {
3284 int actor_id = data1.toInt();
3285 int target_id = data2.toInt();
3398 int actor_id = data1.toInt();
3399 int target_id = data2.toInt();
3404 actor_id, target_id, 0,
"");
3659 int actor_id = data1.toInt();
3660 int target_id = data2.toInt();
3665 actor_id, target_id, 0,
"");
3680 const int act_id =
paction->id;
3686 "Treasury contains %d gold.",
3696 impossible->setStandardButtons(QMessageBox::Ok);
3697 impossible->setAttribute(Qt::WA_DeleteOnClose);
3703 PL_(
"Incite a revolt for %d gold?\n%s",
3704 "Incite a revolt for %d gold?\n%s",
cost),
cost,
buf);
3705 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3706 ask->setDefaultButton(QMessageBox::Cancel);
3707 ask->set_text_title(
buf2,
_(
"Incite a Revolt!"));
3708 ask->setAttribute(Qt::WA_DeleteOnClose);
3709 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
3719 PL_(
"Inciting a revolt costs %d gold.\n%s",
3720 "Inciting a revolt costs %d gold.\n%s",
cost),
cost,
3723 too_much->setStandardButtons(QMessageBox::Ok);
3724 too_much->setAttribute(Qt::WA_DeleteOnClose);
3743 const int act_id =
paction->id;
3749 "Treasury contains %d gold.",
3755 "Bribe unit for %d gold?\n%s",
3757 ask->set_text_title(
buf2,
_(
"Bribe Enemy Unit"));
3758 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3759 ask->setDefaultButton(QMessageBox::Cancel);
3760 ask->setAttribute(Qt::WA_DeleteOnClose);
3761 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
3769 PL_(
"Bribing the unit costs %d gold.\n%s",
3770 "Bribing the unit costs %d gold.\n%s",
cost),
cost,
buf);
3771 ask->set_text_title(
buf2,
_(
"Traitors Demand Too Much!"));
3772 ask->setAttribute(Qt::WA_DeleteOnClose);
3791 const int act_id =
paction->id;
3797 "Treasury contains %d gold.",
3803 "Bribe unit stack for %d gold?\n%s",
3805 ask->set_text_title(
buf2,
_(
"Bribe Enemy Stack"));
3806 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3807 ask->setDefaultButton(QMessageBox::Cancel);
3808 ask->setAttribute(Qt::WA_DeleteOnClose);
3809 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
3817 PL_(
"Bribing the unit stack costs %d gold.\n%s",
3818 "Bribing the unit stack costs %d gold.\n%s",
cost),
cost,
buf);
3819 ask->set_text_title(
buf2,
_(
"Traitors Demand Too Much!"));
3820 ask->setAttribute(Qt::WA_DeleteOnClose);
3837 what = data1.toInt();
3854 action_id act_id = data1.toList().at(2).toInt();
3858 if (data2.toInt() ==
B_LAST) {
3863 }
else if (data2.toInt() == -1) {
3889 _(
"Select Improvement to Sabotage"),
3890 gui()->game_tab_widget,
3913 if (pimprove->sabotage > 0) {
3917 .replace(
"&",
"&&");
3954 gui()->game_tab_widget);
3988 str =
QString(
PL_(
"Are you sure you want to disband that %1 unit?",
3989 "Are you sure you want to disband those %1 units?",
4039 text =
QString(
"It might not work with other tilesets.\n"
4040 "You are currently using tileset %1.")
4042 ask->addButton(
_(
"Keep current tileset"), QMessageBox::RejectRole);
4043 ask->addButton(
_(
"Load tileset"), QMessageBox::AcceptRole);
4045 ask->setAttribute(Qt::WA_DeleteOnClose);
4047 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4050 gui()->map_scale)) {
4052 _(
"Can't load requested tileset."));
4070 text =
QString(
"It might not work with other tilesets.\n"
4071 "You are currently using soundset %1.")
4073 ask->addButton(
_(
"Keep current soundset"), QMessageBox::RejectRole);
4074 ask->addButton(
_(
"Load soundset"), QMessageBox::AcceptRole);
4076 ask->setAttribute(Qt::WA_DeleteOnClose);
4077 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4095 text =
QString(
"It might not work with other tilesets.\n"
4096 "You are currently using musicset %1.")
4098 ask->addButton(
_(
"Keep current musicset"), QMessageBox::RejectRole);
4099 ask->addButton(
_(
"Load musicset"), QMessageBox::AcceptRole);
4101 ask->setAttribute(Qt::WA_DeleteOnClose);
4102 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4144 QApplication::alert(
gui()->central_wdg);
4162 gui()->popdown_unit_sel();
4166 if (gtd !=
nullptr) {
4180 if (
cd !=
nullptr) {
4197 if (
cd !=
nullptr) {
4214 if (
cd !=
nullptr) {
4231 if (
cd !=
nullptr) {
4248 if (
cd !=
nullptr) {
4270 asd =
gui()->get_diplo_dialog();
4271 if (
asd ==
nullptr) {
4273 "The action selection dialog should have been open");
4279 "The action selection dialog is for another actor unit.");
4286 if (cancel_button !=
nullptr) {
4289 asd->stack_button(cancel_button);
4320 "Action enabled against non existing unit!");
4331 "Action enabled against non existing city!");
4344 "Action enabled against all units on "
4345 "non existing tile!");
4359 if (
asd->get_identified_button(act)) {
4371 if (
wait_button !=
nullptr || cancel_button !=
nullptr) {
4374 asd->unstack_all_buttons();
4385 cd =
gui()->get_diplo_dialog();
4386 if (
cd !=
nullptr) {
4413 if (
std_gui !=
nullptr || fatal) {
4415 QMessageBox *
ask =
new QMessageBox(
parent);
4419 _(
"Tileset \"%s\" problem, it's probably incompatible with "
4423 _(
"Tileset problem, it's probably incompatible with "
4424 "the ruleset:\n%s"), msg);
4428 ask->setStandardButtons(QMessageBox::Ok);
4429 ask->setWindowTitle(
_(
"Tileset error"));
4432 ask->setAttribute(Qt::WA_DeleteOnClose);
4462 title =
_(
"Upgrade Unit!");
4463 ask->setStandardButtons(QMessageBox::Ok);
4465 title =
_(
"Upgrade Obsolete Units");
4466 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
4467 ask->setDefaultButton(QMessageBox::Cancel);
4470 ask->setAttribute(Qt::WA_DeleteOnClose);
4471 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
4475 for (
int id : *
uptr) {
4497 ufont.setItalic(
true);
4510 if (p.y() -
height() < 0) {
4551 if (
pix !=
nullptr) {
4570 if (
h_pix !=
nullptr) {
4589 pix->fill(Qt::transparent);
4601 Qt::KeepAspectRatio,
4602 Qt::SmoothTransformation);
4606 Qt::KeepAspectRatio,
4607 Qt::SmoothTransformation);
4609 pixc = QPixmap::fromImage(
img);
4617 ufont.setPixelSize(a);
4681 ||
y <
fm.height() + 3 ||
x < 11) {
4702 if (
event->button() == Qt::RightButton) {
4776 if (
pix !=
nullptr) {
4790 pen.setColor(
palette().color(QPalette::HighlightedText));
4791 painter->setBrush(
palette().color(QPalette::HighlightedText).darker());
4792 painter->setPen(
palette().color(QPalette::HighlightedText).darker());
4793 painter->drawRect(
pix->width() + 10, h, 8, h +
pix->height());
4840 if (
utile ==
nullptr) {
4847 if (
utile !=
nullptr) {
4868 gui()->mapview_wdg->setFocus();
4869 QWidget::closeEvent(
event);
4883 if (
event->angleDelta().y() < 0) {
4901 if (
event->key() == Qt::Key_Escape) {
4906 QWidget::keyPressEvent(
event);
4943#ifndef FREECIV_NDEBUG
4960 }
else if (
tcount == 1) {
4980 int attacker_hp,
int defender_hp,
4981 bool make_att_veteran,
bool make_def_veteran)
4983 if (
gui()->qt_settings.show_battle_log) {
4986 attacker_hp, defender_hp,
4989 gui()->battlelog_wdg->scale,
4990 gui()->battlelog_wdg);
4992 gui()->battlelog_wdg->add_combat_info(
huc);
4993 gui()->battlelog_wdg->show();
5005 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
5006 ask->setDefaultButton(QMessageBox::Cancel);
5008 ask->setAttribute(Qt::WA_DeleteOnClose);
5009 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
5012 QObject::connect(
ask, &hud_message_box::rejected, [=]() {
5027 hdr =
QString(
_(
"Are you sure you want to do %1?")).
5030 if (
expl !=
nullptr) {
5044 if (
spr !=
nullptr) {
5045 QDialog *win =
new QDialog(
gui());
5048 QLabel *
lbl =
new QLabel;
5053 lbl->setPixmap(*
pm);
5061 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
QVBoxLayout * get_layout()
QList< Choice_dialog_button * > buttons_list
void(* run_on_close)(int)
choice_dialog(const QString title, const QString text, QWidget *parent=nullptr, void(*run_on_close_in)(int)=nullptr)
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 diplomat_bribe_unit(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 conquer_city_shrink2(QVariant data1, QVariant data2)
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 popup_bribe_stack_dialog(struct unit *actor, struct tile *ttile, int cost, const struct action *paction)
void popdown_races_dialog(void)
void popup_tileset_suggestion_dialog(void)
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 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)
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 diplomat_bribe_stack(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 conquer_city_shrink(QVariant data1, QVariant data2)
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)
void show_tileset_error(bool fatal, const char *tset_name, const char *msg)
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_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 struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id popup_bribe_unit_dialog
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 struct unit struct city const struct action *paction const char * expl
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 popup_sabotage_dialog
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 * 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 * 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 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 struct unit struct city * pcity
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
#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::@84::@86 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)