20 #define DEFAULT_METASERVER_OPTION "default"
163 #define FC_QT_DEFAULT_THEME_NAME "NightStalker"
188 #define SPECENUM_NAME option_type
189 #define SPECENUM_VALUE0 OT_BOOLEAN
190 #define SPECENUM_VALUE1 OT_INTEGER
191 #define SPECENUM_VALUE2 OT_STRING
192 #define SPECENUM_VALUE3 OT_ENUM
193 #define SPECENUM_VALUE4 OT_BITWISE
194 #define SPECENUM_VALUE5 OT_FONT
195 #define SPECENUM_VALUE6 OT_COLOR
196 #include "specenum_gen.h"
237 void (*callback)(
struct option *));
292 #define options_iterate(poptset, poption) \
294 struct option *poption = optset_option_first(poptset); \
295 for (; nullptr != poption; poption = option_next(poption)) {
297 #define options_iterate_end \
304 const char *op_value,
316 #define MW_MESSAGES 2
323 #define GUI_DEFAULT_MAPIMG_FILENAME "freeciv"
unsigned option_bitwise_mask(const struct option *poption)
Returns the mask of this bitwise option.
void desired_settable_options_update()
Desired settable options.
const char * option_str_def(const struct option *poption)
Returns the default value of this string option.
void option_changed(struct option *poption)
Force to use the option changed callback.
void options_free()
Free the option module.
unsigned option_bitwise_def(const struct option *poption)
Returns the default value of this bitwise option.
int option_enum_str_to_int(const struct option *poption, const char *str)
Returns the value corresponding to the user-visible (translatable but not translated) string.
int option_int_min(const struct option *poption)
Returns the minimal value of this integer option.
bool option_bool_def(const struct option *poption)
Returns the default value of this boolean option.
void options_init()
Initialize the option module.
const char * option_name(const struct option *poption)
Returns the name of the option.
const struct option_set * server_optset
const char * option_str_get(const struct option *poption)
Returns the current value of this string option.
void options_dialogs_set()
This set the city and player report dialog options.
bool option_reset(struct option *poption)
Set the option to its default value.
const QVector< QString > * option_str_values(const struct option *poption)
Returns the possible string values of this string option.
struct ft_color option_color_get(const struct option *poption)
Returns the current value of this color option.
client_options * gui_options
int option_enum_get_int(const struct option *poption)
Returns the current value of this enum option (as an integer).
void options_dialogs_update()
Dialog report options.
int option_number(const struct option *poption)
Returns the number of the option.
void server_options_free()
Free the server options, if already received.
#define DEFAULT_METASERVER_OPTION
void desired_settable_option_update(const char *op_name, const char *op_value, bool allow_replace)
Update a desired settable option in the hash table from a value which can be different of the current...
struct option * option_next(const struct option *poption)
Returns the next option or nullptr if this is the last.
QString option_font_target(const struct option *poption)
Returns the target style name of this font option.
bool option_str_set(struct option *poption, const char *str)
Sets the value of this string option.
const struct option_set * client_optset
struct option * optset_option_first(const struct option_set *poptset)
Returns the first option of this option set.
int option_int_get(const struct option *poption)
Returns the current value of this integer option.
int messages_where[]
Message Options:
bool option_font_set(struct option *poption, const QFont &font)
Sets the value of this font option.
const char * optset_category_name(const struct option_set *poptset, int category)
Returns the name (translated) of the category of this option set.
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
Returns the option corresponding of the name in this option set.
bool option_color_set(struct option *poption, struct ft_color color)
Sets the value of this color option.
QString option_enum_int_to_str(const struct option *poption, int val)
Returns the user-visible (translatable but not translated) string corresponding to the value.
void option_set_changed_callback(struct option *poption, void(*callback)(struct option *))
Set the function to call every time this option changes.
void(* option_save_log_callback)(QtMsgType lvl, const QString &msg)
const QVector< QString > * option_bitwise_values(const struct option *poption)
Returns a vector of strings describing every bit of this option, as user-visible (translatable but no...
bool option_bool_set(struct option *poption, bool val)
Sets the value of this boolean option.
bool option_is_changeable(const struct option *poption)
Returns TRUE if this option can be modified.
void option_set_gui_data(struct option *poption, void *data)
Set the gui data for this option.
const char * option_description(const struct option *poption)
Returns the description (translated) of the option.
bool option_enum_set_int(struct option *poption, int val)
Sets the value of this enum option.
bool option_bool_get(const struct option *poption)
Returns the current value of this boolean option.
enum option_type option_type(const struct option *poption)
Returns the type of the option.
int option_get_cb_data(const struct option *poption)
Returns the callback data of this option.
struct option * optset_option_by_number(const struct option_set *poptset, int id)
Returns the option corresponding of the number in this option set.
void option_font_set_default(const struct option *poption, const QFont &font)
Returns the default value of this font option.
int option_int_max(const struct option *poption)
Returns the maximal value of this integer option.
QString option_category_name(const struct option *poption)
Returns the name (translated) of the category of the option.
void fill_topo_ts_default()
Fill default tilesets for topology-specific settings.
void * option_get_gui_data(const struct option *poption)
Returns the gui data of this option.
void options_save(option_save_log_callback log_cb)
Save all options.
QFont option_font_get(const struct option *poption)
Returns the current value of this font option.
void options_load()
Load from the rc file any options that are not ruleset specific.
bool option_bitwise_set(struct option *poption, unsigned val)
Sets the value of this bitwise option.
QString option_help_text(const struct option *poption)
Returns the help text (translated) of the option.
const char * tileset_name_for_topology(int topology_id)
Option framework wrapper for mapimg_get_format_list()
struct ft_color option_color_def(const struct option *poption)
Returns the default value of this color option.
@ OLAYER_BORDERS_ON_OCEAN
unsigned option_bitwise_get(const struct option *poption)
Returns the current value of this bitwise option.
int option_enum_def_int(const struct option *poption)
Returns the default value of this enum option (as an integer).
bool option_int_set(struct option *poption, int val)
Sets the value of this integer option.
QFont option_font_def(const struct option *poption)
Returns the default value of this font option.
void server_options_init()
Initialize the server options (not received yet).
const struct option_set * option_optset(const struct option *poption)
Returns the option set owner of this option.
int option_int_def(const struct option *poption)
Returns the default value of this integer option.
QFont gui_qt_font_city_names
bool show_previous_turn_messages
char gui_qt_default_theme_name[512]
bool sound_bell_at_new_turn
bool autoaccept_tileset_suggestion
bool autoaccept_musicset_suggestion
bool enable_cursor_changes
bool gui_qt_allied_chat_only
QFont gui_qt_font_city_productions
int gui_qt_increase_fonts
int smooth_center_slide_msec
bool sound_enable_menu_music
bool player_dlg_show_dead_players
char default_tileset_hex_name[512]
bool draw_city_productions
char default_sound_set_name[512]
bool voteinfo_bar_hide_when_not_player
QFont gui_qt_font_help_text
int smooth_move_unit_msec
QFont gui_qt_font_chatline
std::map< QString, std::map< QString, bool > > tileset_options
Saved tileset options.
char default_tileset_iso_name[512]
char default_metaserver[512]
bool draw_fortress_airbase
bool mapimg_layer[MAPIMG_LAYER_COUNT]
bool auto_center_on_automated
char default_tileset_overhead_name[512]
QFont gui_qt_font_help_label
bool auto_center_each_turn
char default_server_host[512]
QFont gui_qt_font_default
struct ft_color highlight_our_names
bool draw_city_trade_routes
char default_chat_logfile[512]
bool unit_selection_clears_orders
bool voteinfo_bar_new_at_front
bool center_when_popup_city
char default_tileset_square_name[512]
bool reqtree_curved_lines
bool save_options_on_exit
bool gui_qt_show_titlebar
bool sound_enable_effects
bool autoaccept_soundset_suggestion
int smooth_combat_step_msec
bool first_boot
Migrations.
char default_tileset_isohex_name[512]
bool concise_city_production
bool voteinfo_bar_always_show
char mapimg_filename[512]
char default_music_set_name[512]
char default_city_bar_style_name[512]
bool sound_enable_game_music
bool auto_center_on_combat
bool separate_unit_selection
char default_sound_plugin_name[512]
bool popup_attack_actions
bool solid_color_behind_units
Local Options:
bool popup_last_move_to_allied
char default_user_name[512]
QFont gui_qt_font_notify_label
QFont gui_qt_font_reqtree_text
The base class for options.
const struct option_set * poptset
bool layers[OLAYER_COUNT]