19#include <QApplication>
27#include <QTableWidget>
44#define SPECENUM_NAME gotodlg_columns
46#define SPECENUM_VALUE0 GOTODLG_CITY
47#define SPECENUM_VALUE0NAME N_("City")
48#define SPECENUM_VALUE1 GOTODLG_NATION
49#define SPECENUM_VALUE1NAME N_("Nation")
50#define SPECENUM_VALUE2 GOTODLG_CONTINENT
51#define SPECENUM_VALUE2NAME N_("Continent")
52#define SPECENUM_VALUE3 GOTODLG_BUILDING
53#define SPECENUM_VALUE3NAME N_("Building")
54#define SPECENUM_VALUE4 GOTODLG_AIRLIFT
55#define SPECENUM_VALUE4NAME N_("Airlift")
56#define SPECENUM_VALUE5 GOTODLG_SIZE
57#define SPECENUM_VALUE5NAME N_("Size")
58#define SPECENUM_VALUE6 GOTODLG_DISTANCE
59#define SPECENUM_VALUE6NAME N_("Distance")
60#define SPECENUM_VALUE7 GOTODLG_TRADE
61#define SPECENUM_VALUE7NAME N_("Trade")
63#define SPECENUM_COUNT NUM_GOTODLG_COLUMNS
83 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
99 goto_tab->setProperty(
"showGrid",
"false");
100 goto_tab->setSelectionBehavior(QAbstractItemView::SelectRows);
101 goto_tab->setEditTriggers(QAbstractItemView::NoEditTriggers);
102 goto_tab->verticalHeader()->setVisible(
false);
103 goto_tab->horizontalHeader()->setVisible(
true);
104 goto_tab->setSelectionMode(QAbstractItemView::SingleSelection);
108 goto_tab->horizontalHeader()->setSectionResizeMode(
109 QHeaderView::ResizeToContents);
112 layout->setRowStretch(0, 100);
125 connect(
show_all, &QCheckBox::checkStateChanged,
128 connect(
show_all, &QCheckBox::stateChanged,
197 city_id =
item->data(Qt::UserRole).toInt();
221 goto_tab->sortByColumn(0, Qt::AscendingOrder);
237 if (p.y() -
height() < 0) {
263 goto_tab->horizontalHeader()->setStretchLastSection(
false);
265 goto_tab->horizontalHeader()->setStretchLastSection(
true);
277 QFont f = QApplication::font();
322 while (
str.length() < 3) {
334 item->setTextAlignment(Qt::AlignHCenter);
339 while (
str.length() < 2) {
346 if (
punit ==
nullptr) {
348 item->setTextAlignment(Qt::AlignHCenter);
351 while (
str.length() < 6) {
363 if (
punit !=
nullptr) {
376 item->setTextAlignment(Qt::AlignHCenter);
380 while (
str.length() < 3) {
441 0)->data(Qt::UserRole).toInt());
463 0)->data(Qt::UserRole).toInt());
527 if (gtd !=
nullptr) {
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
const char * city_name_get(const struct city *pcity)
const char * city_production_name_translation(const struct city *pcity)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
#define city_list_iterate_end
void checkbox_changed(Qt::CheckState state)
struct tile * original_tile
goto_dialog(QWidget *parent=0)
void checkbox_changed_depr(int state)
void paint(QPainter *painter, QPaintEvent *event)
QPushButton * airlift_city
void paintEvent(QPaintEvent *event)
void item_selected(const QItemSelection &sl, const QItemSelection &ds)
void fill_tab(struct player *pplayer)
enum client_states client_state(void)
bool client_has_player(void)
void request_unit_airlift(struct unit *punit, struct city *pcity)
struct unit_list * get_units_in_focus(void)
struct unit * head_of_units_in_focus(void)
int get_num_units_in_focus(void)
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 city * game_city_by_number(int id)
bool send_goto_tile(struct unit *punit, struct tile *ptile)
void popup_goto_dialog(void)
#define fc_assert(condition)
int sq_map_distance(const struct tile *tile0, const struct tile *tile1)
struct tile * get_center_tile_mapcanvas(void)
void center_tile_mapcanvas(const struct tile *ptile)
const char * nation_adjective_translation(const struct nation_type *pnation)
struct nation_type * nation_of_player(const struct player *pplayer)
#define players_iterate_end
#define players_iterate(_pplayer)
struct city_list * cities
const char * get_airlift_text(const struct unit_list *punits, const struct city *pdest)
void tile_virtual_destroy(struct tile *vtile)
struct tile * tile_virtual_new(const struct tile *ptile)
#define tile_continent(_tile)
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)
#define trade_routes_iterate_end
#define trade_routes_iterate(c, proute)
bool unit_can_airlift_to(const struct civ_map *nmap, const struct unit *punit, const struct city *pdest_city)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end