23#ifdef SDL2_PLAIN_INCLUDE
33#include <QApplication>
34#include <QLibraryInfo>
37#include <QStyleFactory>
113 _(
"This client accepts the standard Qt command-line options\n"
114 "after '--'. See the Qt documentation.\n\n"));
117 _(
"Other gui-specific options are:\n"));
120 _(
"-s, --shortcutreset\tReset shortcut keys to "
121 "default values\n"));
159 log_normal(
_(
"Migrating Qt-client options from freeciv-2.5 options."));
184#ifdef FREECIV_SVG_FLAGS
241#define option_var_set_callback(var, callback) \
242 if ((poption = optset_option_by_name(client_optset, #var))) { \
243 option_set_changed_callback(poption, callback); \
245 log_error("Didn't find option %s!", #var); \
267#undef option_var_set_callback
297 QApplication::beep();
298 QApplication::alert(
gui()->central_wdg);
358 if (
gui()->unit_sel !=
nullptr &&
gui()->unit_sel->isVisible()) {
362 if (
gui()->gtd !=
nullptr &&
gui()->gtd->isVisible()) {
388 Qt::WindowFlags flags = Qt::Window;
397 gui()->setWindowFlags(flags);
402 flags |= Qt::CustomizeWindowHint;
403 gui()->setWindowFlags(flags);
569 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
570 ask->setDefaultButton(QMessageBox::Cancel);
571 ask->set_text_title(
_(
"Are you sure you want to quit?"),
_(
"Quit?"));
572 ask->setAttribute(Qt::WA_DeleteOnClose);
573 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
591 QByteArray ver = QLibraryInfo::version().toString().toUtf8();
static QFont * get_font(enum client_font font)
void add_server_source(int)
void update_sidebar_position()
void fc_main(QApplication *qapp)
void remove_server_source()
static fc_font * instance()
void set_font(QString name, QFont *qf)
QFont * get_font(QString name)
void add_callback(call_me_back *cb)
int client_main(int argc, char *argv[], bool postpone_tileset)
void start_quitting(void)
int default_tileset_select(void)
void disconnect_from_server(bool leaving_sound)
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
bool is_option(const char *option_name, char *option)
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
void update_city_descriptions(void)
static enum client_pages current_page
const char * client_string
#define option_var_set_callback(var, callback)
void qtg_editgui_popup_properties(const struct tile_list *tiles, int objtype)
void qtg_remove_net_input()
static void apply_notify_font(struct option *poption)
int main(int argc, char **argv)
void qtg_options_extra_init()
static QApplication * qapp
static void print_usage()
void qtg_editgui_refresh()
void reset_unit_table(void)
static void apply_fullscreen(struct option *poption)
int qtg_ui_main(int argc, char *argv[])
void qtg_editgui_popdown_all()
QApplication * current_app()
void qtg_real_conn_list_dialog_update(void *unused)
static fc_client * freeciv_qt
static void apply_help_font(struct option *poption)
void qtg_editgui_tileset_changed()
void qtg_editgui_notify_object_created(int tag, int id)
void qtg_add_net_input(int sock)
static void apply_titlebar(struct option *poption)
static void apply_sidebar(struct option *poption)
void real_science_report_dialog_update(void *)
void qtg_editgui_notify_object_changed(int objtype, int object_id, bool removal)
void qtg_gui_update_font(const char *font_name, const char *font_value)
void qtg_set_unit_icon(int idx, struct unit *punit)
void qtg_real_focus_units_changed(void)
void qtg_insert_client_build_info(char *outbuf, size_t outlen)
void qtg_set_unit_icons_more_arrow(bool onoff)
const char *const gui_character_encoding
void qtg_add_idle_callback(void(callback)(void *), void *data)
enum gui_type qtg_get_gui_type()
static void migrate_options_from_2_5()
static bool parse_options(int argc, char **argv)
void restart_notify_dialogs()
const bool gui_use_transliteration
static void apply_font(struct option *poption)
#define log_normal(message,...)
const char *const default_font
void option_changed(struct option *poption)
const struct option_set * client_optset
const char * option_name(const struct option *poption)
bool option_bool_get(const struct option *poption)
enum option_type option_type(const struct option *poption)
struct client_options gui_options
const char * option_font_get(const struct option *poption)
#define options_iterate(poptset, poption)
#define options_iterate_end
void qtg_real_set_client_page(enum client_pages page)
enum client_pages qtg_get_current_client_page()
void qtg_gui_clear_theme()
void(* callback)(void *data)
char gui_qt_default_theme_name[512]
bool gui_qt_migrated_from_2_5
bool gui_qt_default_fonts_set
int cat_snprintf(char *str, size_t n, const char *format,...)
bool svg_flag_enable(void)
void tileset_load_tiles(struct tileset *t)
struct sprite * get_icon_sprite(const struct tileset *t, enum icon_type icon)
void tileset_init(struct tileset *t)