Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-qt/gui_main.cpp Source File

Freeciv-3.1

Loading...
Searching...
No Matches
gui_main.cpp
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#ifdef AUDIO_SDL
19/* Though it would happily compile without this include,
20 * it is needed for sound to work.
21 * It defines "main" macro to rename our main() so that
22 * it can install SDL's own. */
23#ifdef SDL2_PLAIN_INCLUDE
24#include <SDL.h>
25#else /* PLAIN_INCLUDE */
26#include <SDL2/SDL.h>
27#endif /* PLAIN_INCLUDE */
28#endif /* AUDIO_SDL */
29
30#include <stdio.h>
31
32// Qt
33#include <QApplication>
34#include <QLibraryInfo>
35#include <QMessageBox>
36#include <QScrollBar>
37#include <QStyleFactory>
38
39// utility
40#include "fc_cmdline.h"
41#include "fciconv.h"
42#include "log.h"
43
44// client
45#include "client_main.h"
46#include "editgui_g.h"
47#include "options.h"
48#include "sprite.h"
49#include "themes_common.h"
50#include "tilespec.h"
51
52// gui-qt
53#include "fc_client.h"
54#include "fonts.h"
55#include "gui_main.h"
56#include "helpdlg.h"
57#include "hudwidget.h"
58#include "qtg_cxxside.h"
59
60extern "C" {
61 void real_science_report_dialog_update(void*);
62}
63extern void restart_notify_dialogs();
64extern void city_font_update();
65
66 const bool gui_use_transliteration = false;
67 const char * const gui_character_encoding = "UTF-8";
68 const char *client_string = "gui-qt";
69 static fc_client *freeciv_qt;
70 static QApplication *qapp = nullptr;
71
72void reset_unit_table(void);
73static void apply_font(struct option *poption);
74static void apply_help_font(struct option *poption);
75static void apply_notify_font(struct option *poption);
76static void apply_sidebar(struct option *poption);
77static void apply_titlebar(struct option *poption);
78static void apply_fullscreen(struct option *poption);
79
80/**********************************************************************/
83 class fc_client *gui()
84{
85 return freeciv_qt;
86}
87
88/**********************************************************************/
91 void qtg_ui_init()
92{}
93
94/**********************************************************************/
97 int main(int argc, char **argv)
98{
99 setup_gui_funcs();
100
101 return client_main(argc, argv, TRUE);
102}
103
104/**********************************************************************/
108 static void print_usage()
109{
110 /* add client-specific usage information here */
111 fc_fprintf(stderr,
112 _("This client accepts the standard Qt command-line options\n"
113 "after '--'. See the Qt documentation.\n\n"));
114
115 fc_fprintf(stderr,
116 _("Other gui-specific options are:\n"));
117
118 fc_fprintf(stderr,
119 _("-s, --shortcutreset\tReset shortcut keys to "
120 "default values\n"));
121
122 fc_fprintf(stderr, "\n");
123
124 /* TRANS: No full stop after the URL, could cause confusion. */
125 fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
126}
127
128/**********************************************************************/
133 static bool parse_options(int argc, char **argv)
134{
135 int i = 1;
136
137 while (i < argc) {
138 if (is_option("--help", argv[i])) {
139 print_usage();
140 return false;
141 }
142 if (is_option("--shortcutreset", argv[i])) {
143 shortcutreset();
144 }
145 // Can't check against unknown options, as those might be Qt options
146
147 i++;
148 }
149
150 return true;
151}
152
153/**********************************************************************/
156 static void migrate_options_from_2_5()
157{
158 log_normal(_("Migrating Qt-client options from freeciv-2.5 options."));
159
160 gui_options.gui_qt_fullscreen = gui_options.migrate_fullscreen;
161
162 gui_options.gui_qt_migrated_from_2_5 = TRUE;
163}
164
165/**********************************************************************/
169 int qtg_ui_main(int argc, char *argv[])
170{
171 if (parse_options(argc, argv)) {
172 qapp = new QApplication(argc, argv);
173 QPixmap *qpm;
174 QIcon app_icon;
175 int tsret;
176
177 tsret = default_tileset_select();
178 if (tsret != EXIT_SUCCESS) {
179 return tsret;
180 }
181
182 tileset_init(tileset);
183 tileset_load_tiles(tileset);
184 qpm = get_icon_sprite(tileset, ICON_FREECIV)->pm;
185 app_icon = ::QIcon(*qpm);
186 qapp->setWindowIcon(app_icon);
187 if (gui_options.first_boot) {
188 /* We're using fresh defaults for this version of this client,
189 * so prevent any future migrations from other versions */
190 gui_options.gui_qt_migrated_from_2_5 = TRUE;
191 } else if (!gui_options.gui_qt_migrated_from_2_5) {
192 migrate_options_from_2_5();
193 }
194 if (!load_theme(gui_options.gui_qt_default_theme_name)) {
195 qtg_gui_clear_theme();
196 }
197 freeciv_qt = new fc_client();
198
199 if (!gui_options.gui_qt_default_fonts_set) {
200 configure_fonts();
201 gui_options.gui_qt_default_fonts_set = TRUE;
202 }
203
204 // Initial fonts setup by forcing running change-callback for each
205 options_iterate(client_optset, poption) {
206 if (OT_FONT == option_type(poption)) {
207 option_changed(poption);
208 }
209 } options_iterate_end;
210
211 freeciv_qt->fc_main(qapp);
212 }
213
214 return EXIT_SUCCESS;
215}
216
217/**********************************************************************/
220QApplication *current_app()
221{
222 return qapp;
223}
224
225/**********************************************************************/
228 void qtg_options_extra_init()
229{
230 struct option *poption;
231
232#define option_var_set_callback(var, callback) \
233 if ((poption = optset_option_by_name(client_optset, #var))) { \
234 option_set_changed_callback(poption, callback); \
235 } else { \
236 log_error("Didn't find option %s!", #var); \
237 }
238 option_var_set_callback(gui_qt_font_city_names,
239 apply_font);
240 option_var_set_callback(gui_qt_font_city_productions,
241 apply_font);
242 option_var_set_callback(gui_qt_font_reqtree_text,
243 apply_font);
244 option_var_set_callback(gui_qt_font_default,
245 apply_font);
246 option_var_set_callback(gui_qt_font_help_text,
247 apply_help_font);
248 option_var_set_callback(gui_qt_font_chatline,
249 apply_font);
250 option_var_set_callback(gui_qt_font_notify_label,
251 apply_notify_font);
252 option_var_set_callback(gui_qt_show_titlebar,
253 apply_titlebar);
254 option_var_set_callback(gui_qt_sidebar_left,
255 apply_sidebar);
256 option_var_set_callback(gui_qt_fullscreen,
257 apply_fullscreen);
258#undef option_var_set_callback
259}
260
261/**********************************************************************/
264 void qtg_ui_exit()
265{
266 delete freeciv_qt;
267 delete qapp;
268 qapp = nullptr;
269}
270
271/**********************************************************************/
274 void qtg_real_conn_list_dialog_update(void *unused)
275{
276 if (qtg_get_current_client_page() == PAGE_NETWORK) {
277 qtg_real_set_client_page(PAGE_START);
278 }
279 gui()->update_start_page();
280}
281
282/**********************************************************************/
286 void qtg_sound_bell()
287{
288 QApplication::beep();
289 QApplication::alert(gui()->central_wdg);
290}
291
292/**********************************************************************/
299 void qtg_add_net_input(int sock)
300{
301 gui()->add_server_source(sock);
302}
303
304/**********************************************************************/
309 void qtg_remove_net_input()
310{
311 gui()->remove_server_source();
312}
313
314/**********************************************************************/
325 void qtg_set_unit_icon(int idx, struct unit *punit)
326{
327 /* PORTME */
328}
329
330/**********************************************************************/
337 void qtg_set_unit_icons_more_arrow(bool onoff)
338{
339 /* PORTME */
340}
341
342/**********************************************************************/
347 void qtg_real_focus_units_changed(void)
348{
349 if (gui()->unit_sel != nullptr && gui()->unit_sel->isVisible()) {
350 gui()->unit_sel->update_units();
351 }
352
353 if (gui()->gtd != nullptr && gui()->gtd->isVisible()) {
354 gui()->gtd->update_dlg();
355 }
356}
357
358/**********************************************************************/
363 void qtg_add_idle_callback(void (callback)(void *), void *data)
364{
365 call_me_back *cb = new call_me_back; /* removed in mr_idler:idling() */
366
367 cb->callback = callback;
368 cb->data = data;
369 gui()->mr_idler.add_callback(cb);
370}
371
372/**********************************************************************/
375 void apply_titlebar(struct option *poption)
376{
377 bool val;
378 QWidget *w;
379 Qt::WindowFlags flags = Qt::Window;
380 val = option_bool_get(poption);
381
382 if (gui()->current_page() < PAGE_GAME) {
383 return;
384 }
385
386 if (val) {
387 w = new QWidget();
388 gui()->setWindowFlags(flags);
389 delete gui()->corner_wid;
390 gui()->corner_wid = nullptr;
391 gui()->menu_bar->setCornerWidget(w);
392 } else {
393 flags |= Qt::CustomizeWindowHint;
394 gui()->setWindowFlags(flags);
395 gui()->corner_wid = new fc_corner(gui());
396 gui()->menu_bar->setCornerWidget(gui()->corner_wid);
397 }
398 gui()->show();
399}
400
401/**********************************************************************/
404 void apply_sidebar(struct option *poption)
405{
406 gui()->update_sidebar_position();
407}
408
409/**********************************************************************/
412 static void apply_font(struct option *poption)
413{
414 QFont *f;
415 QFont *remove_old;
416 QString s;
417
418 if (gui()) {
419 // FIXME: All this should be within gui()->update_fonts()
420 f = new QFont;
421 s = option_font_get(poption);
422 f->fromString(s);
423 s = option_name(poption);
424 remove_old = fc_font::instance()->get_font(s);
425 delete remove_old;
426 fc_font::instance()->set_font(s, f);
427 update_city_descriptions();
428 gui()->infotab->chtwdg->update_font();
429 QApplication::setFont(*fc_font::instance()->get_font(fonts::default_font));
430 real_science_report_dialog_update(nullptr);
431 fc_font::instance()->get_mapfont_size();
432 gui()->update_fonts();
433 }
434
435 apply_help_font(poption);
436}
437
438/**********************************************************************/
441 static void apply_help_font(struct option *poption)
442{
443 QFont *f;
444 QFont *remove_old;
445 QString s;
446
447 if (gui()) {
448 f = new QFont;
449 s = option_font_get(poption);
450 f->fromString(s);
451 s = option_name(poption);
452 remove_old = fc_font::instance()->get_font(s);
453 delete remove_old;
454 fc_font::instance()->set_font(s, f);
455 update_help_fonts();
456 }
457}
458
459/**********************************************************************/
462 static void apply_notify_font(struct option *poption)
463{
464 if (gui()) {
465 qtg_gui_update_font("notify_label", option_font_get(poption));
466 restart_notify_dialogs();
467 }
468 if (gui() && qtg_get_current_client_page() == PAGE_GAME) {
469 qtg_gui_update_font("city_label", option_font_get(poption));
470 city_font_update();
471 }
472}
473
474/**********************************************************************/
477 static void apply_fullscreen(struct option *poption)
478{
479 gui()->apply_fullscreen();
480}
481
482/**********************************************************************/
485 void qtg_editgui_tileset_changed()
486{}
487
488/**********************************************************************/
491 void qtg_editgui_refresh()
492{}
493
494/**********************************************************************/
497 void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
498{}
499
500/**********************************************************************/
503 void qtg_editgui_popdown_all()
504{}
505
506/**********************************************************************/
509 void qtg_editgui_notify_object_changed(int objtype, int object_id,
510 bool removal)
511{}
512
513/**********************************************************************/
516 void qtg_editgui_notify_object_created(int tag, int id)
517{}
518
519/**********************************************************************/
522 void qtg_gui_update_font(const char *font_name, const char *font_value)
523{
524 QFont *f;
525 QFont *remove_old;
526 QString fname;
527
528 fname = "gui_qt_font_" + QString(font_name);
529 f = new QFont;
530 f->fromString(font_value);
531 remove_old = fc_font::instance()->get_font(fname);
532 delete remove_old;
533 fc_font::instance()->set_font(fname, f);
534 fc_font::instance()->get_mapfont_size();
535}
536
537/**********************************************************************/
540 enum gui_type qtg_get_gui_type()
541{
542 return GUI_QT;
543}
544
545/**********************************************************************/
548 void reset_unit_table(void)
549{
550 /* FIXME */
551}
552
553/**********************************************************************/
556 void popup_quit_dialog()
557{
558 hud_message_box *ask = new hud_message_box(gui()->central_wdg);
559
560 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
561 ask->setDefaultButton(QMessageBox::Cancel);
562 ask->set_text_title(_("Are you sure you want to quit?"), _("Quit?"));
563 ask->setAttribute(Qt::WA_DeleteOnClose);
564 QObject::connect(ask, &hud_message_box::accepted, [=]() {
565 start_quitting();
566 if (client.conn.used) {
567 disconnect_from_server();
568 }
569 gui()->write_settings();
570 qapp->quit();
571 });
572 ask->show();
573}
574
575/**********************************************************************/
578 void qtg_insert_client_build_info(char *outbuf, size_t outlen)
579{
580 /* There's also an separate entry about Qt in help menu. */
581
582 QByteArray ver = QLibraryInfo::version().toString().toUtf8();
583
584 cat_snprintf(outbuf, outlen, _("\nBuilt against Qt %s, using %s"),
585 QT_VERSION_STR, ver.data());
586
587#ifndef FC_QT5_MODE
588 cat_snprintf(outbuf, outlen, _("\nBuilt in Qt6 mode."));
589#else /* FC_QT5_MODE */
590 cat_snprintf(outbuf, outlen, _("\nBuilt in Qt5 mode."));
591#endif /* FC_QT5_MODE */
592}
get_font
static QFont * get_font(enum client_font font)
Definition canvas.cpp:359
chatwdg::update_font
void update_font()
Definition chatline.cpp:352
fc_client
Definition fc_client.h:170
fc_client::apply_fullscreen
void apply_fullscreen()
Definition fc_client.cpp:426
fc_client::gtd
goto_dialog * gtd
Definition fc_client.h:265
fc_client::menu_bar
mr_menu * menu_bar
Definition fc_client.h:257
fc_client::fc_client
fc_client()
Definition fc_client.cpp:70
fc_client::mr_idler
mr_idle mr_idler
Definition fc_client.h:255
fc_client::unit_sel
units_select * unit_sel
Definition fc_client.h:263
fc_client::write_settings
void write_settings()
Definition fc_client.cpp:794
fc_client::infotab
info_tab * infotab
Definition fc_client.h:261
fc_client::add_server_source
void add_server_source(int)
Definition fc_client.cpp:449
fc_client::update_sidebar_position
void update_sidebar_position()
Definition pages.cpp:2295
fc_client::update_start_page
void update_start_page()
Definition pages.cpp:1662
fc_client::update_fonts
void update_fonts()
Definition fc_client.cpp:460
fc_client::fc_main
void fc_main(QApplication *qapp)
Definition fc_client.cpp:260
fc_client::corner_wid
fc_corner * corner_wid
Definition fc_client.h:258
fc_client::remove_server_source
void remove_server_source()
Definition fc_client.cpp:494
fc_corner
Definition fc_client.h:156
fc_font::instance
static fc_font * instance()
Definition fonts.cpp:41
fc_font::set_font
void set_font(QString name, QFont *qf)
Definition fonts.cpp:125
fc_font::get_font
QFont * get_font(QString name)
Definition fonts.cpp:63
fc_font::get_mapfont_size
void get_mapfont_size()
Definition fonts.cpp:116
goto_dialog::update_dlg
void update_dlg()
Definition gotodlg.cpp:236
hud_message_box
Definition hudwidget.h:56
hud_message_box::set_text_title
int set_text_title(QString s1, QString s2, bool return_exec=false)
Definition hudwidget.cpp:126
info_tab::chtwdg
chatwdg * chtwdg
Definition messagewin.h:79
mr_idle::add_callback
void add_callback(call_me_back *cb)
Definition mapview.cpp:187
units_select::update_units
void update_units()
Definition dialogs.cpp:4654
client_main
int client_main(int argc, char *argv[], bool postpone_tileset)
Definition client_main.c:344
client
struct civclient client
Definition client_main.c:149
start_quitting
void start_quitting(void)
Definition client_main.c:1645
default_tileset_select
int default_tileset_select(void)
Definition client_main.c:322
client_main.h
disconnect_from_server
void disconnect_from_server(void)
Definition clinet.c:305
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 * punit
Definition dialogs_g.h:73
editgui_g.h
objtype
int objtype
Definition editgui_g.h:28
fc_client.h
is_option
bool is_option(const char *option_name, char *option)
Definition fc_cmdline.c:112
fc_cmdline.h
fciconv.h
fc_fprintf
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
_
#define _(String)
Definition fcintl.h:67
configure_fonts
void configure_fonts()
Definition fonts.cpp:156
fonts.h
update_city_descriptions
void update_city_descriptions(void)
Definition mapview.c:470
current_page
static enum client_pages current_page
Definition pages.c:78
load_theme
static bool load_theme
Definition theme_dlg.c:30
gui_main.h
helpdlg.h
sprite.h
client_string
const char * client_string
Definition gui_main.cpp:68
option_var_set_callback
#define option_var_set_callback(var, callback)
qtg_ui_init
void qtg_ui_init()
Definition gui_main.cpp:91
qtg_editgui_popup_properties
void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
Definition gui_main.cpp:497
qtg_remove_net_input
void qtg_remove_net_input()
Definition gui_main.cpp:309
apply_notify_font
static void apply_notify_font(struct option *poption)
Definition gui_main.cpp:462
popup_quit_dialog
void popup_quit_dialog()
Definition gui_main.cpp:556
main
int main(int argc, char **argv)
Definition gui_main.cpp:97
qtg_options_extra_init
void qtg_options_extra_init()
Definition gui_main.cpp:228
qapp
static QApplication * qapp
Definition gui_main.cpp:70
print_usage
static void print_usage()
Definition gui_main.cpp:108
qtg_editgui_refresh
void qtg_editgui_refresh()
Definition gui_main.cpp:491
gui
class fc_client * gui()
Definition gui_main.cpp:83
city_font_update
void city_font_update()
Definition citydlg.cpp:3768
reset_unit_table
void reset_unit_table(void)
Definition gui_main.cpp:548
apply_fullscreen
static void apply_fullscreen(struct option *poption)
Definition gui_main.cpp:477
qtg_ui_main
int qtg_ui_main(int argc, char *argv[])
Definition gui_main.cpp:169
qtg_editgui_popdown_all
void qtg_editgui_popdown_all()
Definition gui_main.cpp:503
current_app
QApplication * current_app()
Definition gui_main.cpp:220
qtg_real_conn_list_dialog_update
void qtg_real_conn_list_dialog_update(void *unused)
Definition gui_main.cpp:274
freeciv_qt
static fc_client * freeciv_qt
Definition gui_main.cpp:69
apply_help_font
static void apply_help_font(struct option *poption)
Definition gui_main.cpp:441
qtg_editgui_tileset_changed
void qtg_editgui_tileset_changed()
Definition gui_main.cpp:485
qtg_editgui_notify_object_created
void qtg_editgui_notify_object_created(int tag, int id)
Definition gui_main.cpp:516
qtg_add_net_input
void qtg_add_net_input(int sock)
Definition gui_main.cpp:299
apply_titlebar
static void apply_titlebar(struct option *poption)
Definition gui_main.cpp:375
apply_sidebar
static void apply_sidebar(struct option *poption)
Definition gui_main.cpp:404
real_science_report_dialog_update
void real_science_report_dialog_update(void *)
Definition repodlgs.c:751
qtg_editgui_notify_object_changed
void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal)
Definition gui_main.cpp:509
qtg_gui_update_font
void qtg_gui_update_font(const char *font_name, const char *font_value)
Definition gui_main.cpp:522
qtg_set_unit_icon
void qtg_set_unit_icon(int idx, struct unit *punit)
Definition gui_main.cpp:325
qtg_ui_exit
void qtg_ui_exit()
Definition gui_main.cpp:264
qtg_real_focus_units_changed
void qtg_real_focus_units_changed(void)
Definition gui_main.cpp:347
qtg_insert_client_build_info
void qtg_insert_client_build_info(char *outbuf, size_t outlen)
Definition gui_main.cpp:578
qtg_set_unit_icons_more_arrow
void qtg_set_unit_icons_more_arrow(bool onoff)
Definition gui_main.cpp:337
gui_character_encoding
const char *const gui_character_encoding
Definition gui_main.cpp:67
qtg_add_idle_callback
void qtg_add_idle_callback(void(callback)(void *), void *data)
Definition gui_main.cpp:363
qtg_get_gui_type
enum gui_type qtg_get_gui_type()
Definition gui_main.cpp:540
migrate_options_from_2_5
static void migrate_options_from_2_5()
Definition gui_main.cpp:156
parse_options
static bool parse_options(int argc, char **argv)
Definition gui_main.cpp:133
restart_notify_dialogs
void restart_notify_dialogs()
Definition dialogs.cpp:3941
gui_use_transliteration
const bool gui_use_transliteration
Definition gui_main.cpp:66
apply_font
static void apply_font(struct option *poption)
Definition gui_main.cpp:412
qtg_sound_bell
void qtg_sound_bell()
Definition gui_main.cpp:286
font_name
const char * font_name
Definition gui_main_g.h:43
update_help_fonts
void update_help_fonts()
Definition helpdlg.cpp:113
hudwidget.h
log.h
log_normal
#define log_normal(message,...)
Definition log.h:107
fonts::default_font
const char *const default_font
Definition fonts.h:27
option_changed
void option_changed(struct option *poption)
Definition options.c:723
client_optset
const struct option_set * client_optset
Definition options.c:1255
option_name
const char * option_name(const struct option *poption)
Definition options.c:603
option_bool_get
bool option_bool_get(const struct option *poption)
Definition options.c:772
option_type
enum option_type option_type(const struct option *poption)
Definition options.c:633
gui_options
struct client_options gui_options
Definition options.c:71
option_font_get
const char * option_font_get(const struct option *poption)
Definition options.c:1116
options.h
options_iterate
#define options_iterate(poptset, poption)
Definition options.h:527
options_iterate_end
#define options_iterate_end
Definition options.h:532
qtg_real_set_client_page
void qtg_real_set_client_page(enum client_pages page)
Definition pages.cpp:102
qtg_get_current_client_page
enum client_pages qtg_get_current_client_page()
Definition pages.cpp:120
setup_gui_funcs
void setup_gui_funcs()
Definition qtg_cxxside.cpp:29
qtg_cxxside.h
qtg_gui_clear_theme
void qtg_gui_clear_theme()
Definition themes.cpp:104
shortcutreset
void shortcutreset()
Definition shortcuts.cpp:864
call_me_back
Definition mapview.h:53
call_me_back::callback
void(* callback)(void *data)
Definition mapview.h:54
call_me_back::data
void * data
Definition mapview.h:55
callback
Definition gui_main.c:2187
civclient::conn
struct connection conn
Definition client_main.h:96
client_options::gui_qt_fullscreen
bool gui_qt_fullscreen
Definition options.h:386
client_options::gui_qt_default_theme_name
char gui_qt_default_theme_name[512]
Definition options.h:390
client_options::first_boot
bool first_boot
Definition options.h:124
client_options::gui_qt_migrated_from_2_5
bool gui_qt_migrated_from_2_5
Definition options.h:135
client_options::migrate_fullscreen
bool migrate_fullscreen
Definition options.h:138
client_options::gui_qt_default_fonts_set
bool gui_qt_default_fonts_set
Definition options.h:136
connection::used
bool used
Definition connection.h:144
option
Definition options.c:454
sprite::pm
QPixmap * pm
Definition sprite.h:25
tileset
Definition tilespec.c:459
unit
Definition unit.h:138
cat_snprintf
int cat_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:995
TRUE
#define TRUE
Definition support.h:46
themes_common.h
tileset_load_tiles
void tileset_load_tiles(struct tileset *t)
Definition tilespec.c:3452
get_icon_sprite
struct sprite * get_icon_sprite(const struct tileset *t, enum icon_type icon)
Definition tilespec.c:6678
tileset_init
void tileset_init(struct tileset *t)
Definition tilespec.c:6827
tilespec.h
ICON_FREECIV
@ ICON_FREECIV
Definition tilespec.h:310