23#ifdef SDL2_PLAIN_INCLUDE
33#include <QApplication>
34#include <QLibraryInfo>
37#include <QStyleFactory>
111 _(
"This client accepts the standard Qt command-line options\n"
112 "after '--'. See the Qt documentation.\n\n"));
115 _(
"Other gui-specific options are:\n"));
118 _(
"-s, --shortcutreset\tReset shortcut keys to "
119 "default values\n"));
157 log_normal(
_(
"Migrating Qt-client options from freeciv-2.5 options."));
182#ifdef FREECIV_SVG_FLAGS
239#define option_var_set_callback(var, callback) \
240 if ((poption = optset_option_by_name(client_optset, #var))) { \
241 option_set_changed_callback(poption, callback); \
243 log_error("Didn't find option %s!", #var); \
265#undef option_var_set_callback
295 QApplication::beep();
296 QApplication::alert(
gui()->central_wdg);
356 if (
gui()->unit_sel !=
nullptr &&
gui()->unit_sel->isVisible()) {
360 if (
gui()->gtd !=
nullptr &&
gui()->gtd->isVisible()) {
386 Qt::WindowFlags flags = Qt::Window;
395 gui()->setWindowFlags(flags);
400 flags |= Qt::CustomizeWindowHint;
401 gui()->setWindowFlags(flags);
567 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
568 ask->setDefaultButton(QMessageBox::Cancel);
569 ask->set_text_title(
_(
"Are you sure you want to quit?"),
_(
"Quit?"));
570 ask->setAttribute(Qt::WA_DeleteOnClose);
571 QObject::connect(
ask, &hud_message_box::accepted, [=]() {
589 QByteArray ver = QLibraryInfo::version().toString().toUtf8();
596#elif defined(FC_QT6X_MODE)
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_setup_gui_properties()
void qtg_add_net_input(int sock)
static void apply_titlebar(struct option *poption)
static void apply_sidebar(struct option *poption)
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)
struct client_properties gui_properties
#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 qtg_real_science_report_dialog_update(void *unused)
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)