![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <fc_config.h>#include <cstring>#include <qglobal.h>#include <sys/stat.h>#include <QDir>#include <QHash>#include <QUrl>#include "deprecations.h"#include "fcintl.h"#include "log.h"#include "registry.h"#include "registry_ini.h"#include "shared.h"#include "support.h"#include "fc_version.h"#include "events.h"#include "version.h"#include "gui_main_g.h"#include "menu_g.h"#include "optiondlg_g.h"#include "repodlgs_g.h"#include "voteinfo_bar_g.h"#include "audio/audio.h"#include "chatline_common.h"#include "citybar.h"#include "client_main.h"#include "climisc.h"#include "connectdlg_common.h"#include "global_worklist.h"#include "governor.h"#include "mapctrl_common.h"#include "music.h"#include "options.h"#include "overview_common.h"#include "packhand_gen.h"#include "qtg_cxxside.h"#include "themes_common.h"#include "tileset/tilespec.h"#include "views/view_cities_data.h"#include "views/view_map_common.h"#include "views/view_nations_data.h"
Include dependency graph for options.cpp:Go to the source code of this file.
Classes | |
| struct | option_set |
| Option set structure. More... | |
| struct | option_common_vtable |
| struct | option_bool_vtable |
| struct | option_int_vtable |
| struct | option_str_vtable |
| struct | option_enum_vtable |
| struct | option_bitwise_vtable |
| struct | option_font_vtable |
| struct | option_color_vtable |
| struct | option |
| The base class for options. More... | |
| struct | copt_val_name |
| struct | client_option |
| Derived class client option, inherinting of base class option. More... | |
| struct | server_option |
| Derived class server option, inheriting from base class option. More... | |
Macros | |
| #define | OPTION(poption) ((struct option *) (poption)) |
| #define | OPTION_INIT(optset, spec_type, spec_table_var, common_table, spec_table, changed_cb, cb_data) |
| #define | OPTION_BOOL_INIT(optset, common_table, bool_table, changed_cb) |
| #define | OPTION_INT_INIT(optset, common_table, int_table, changed_cb) |
| #define | OPTION_STR_INIT(optset, common_table, str_table, changed_cb, cb_data) |
| #define | OPTION_ENUM_INIT(optset, common_table, enum_table, changed_cb) |
| #define | OPTION_BITWISE_INIT(optset, common_table, bitwise_table, changed_cb) |
| #define | OPTION_FONT_INIT(optset, common_table, font_table, changed_cb) |
| #define | OPTION_COLOR_INIT(optset, common_table, color_table, changed_cb) |
| #define | CLIENT_OPTION(poption) ((struct client_option *) (poption)) |
| #define | GEN_BOOL_OPTION(oname, odesc, ohelp, ocat, odef, ocb) |
| #define | GEN_INT_OPTION(oname, odesc, ohelp, ocat, odef, omin, omax, ocb) |
| #define | GEN_STR_OPTION(oname, odesc, ohelp, ocat, odef, ocb, cbd) |
| #define | GEN_STR_LIST_OPTION(oname, odesc, ohelp, ocat, odef, oacc, ocb, cbd) |
| #define | GEN_ENUM_OPTION(oname, odesc, ohelp, ocat, odef, oacc, ocb) |
| #define | GEN_BITWISE_OPTION(oname, odesc, ohelp, ocat, odef, oacc, ocb) |
| #define | GEN_FONT_OPTION(oname, otgt, odesc, ohelp, ocat, ocb) |
| #define | GEN_COLOR_OPTION(oname, odesc, ohelp, ocat, odef_fg, odef_bg, ocb) |
| #define | color_set(color_tgt, color) |
| #define | SERVER_OPTION(poption) ((struct server_option *) (poption)) |
| #define | handle_server_setting_common(psoption, packet) |
| Common part of handle_server_setting_*() functions. More... | |
| #define | OLD_OPTION_FILE_NAME ".civclientrc" |
| #define | MID_OPTION_FILE_NAME ".freeciv-client-rc-%d.%d" |
| #define | NEW_OPTION_FILE_NAME "freeciv-client-rc-%d.%d" |
| #define | MAJOR_NEW_OPTION_FILE_NAME MAJOR_VERSION |
| #define | MINOR_NEW_OPTION_FILE_NAME MINOR_VERSION |
| #define | FIRST_MAJOR_NEW_OPTION_FILE_NAME 2 |
| #define | FIRST_MINOR_NEW_OPTION_FILE_NAME 6 |
| #define | FIRST_MAJOR_MID_OPTION_FILE_NAME 2 |
| #define | FIRST_MINOR_MID_OPTION_FILE_NAME 2 |
| #define | FIRST_MAJOR_NEW_BOOLEAN 2 |
| #define | FIRST_MINOR_NEW_BOOLEAN 3 |
| #define | SETTING_CASE(ARG_name, ...) |
Typedefs | |
| typedef QHash< QString, QString > | optionsHash |
| typedef QHash< QString, intptr_t > | dialOptionsHash |
Enumerations | |
| enum | client_option_category { COC_GRAPHICS , COC_OVERVIEW , COC_SOUND , COC_INTERFACE , COC_MAPIMG , COC_NETWORK , COC_FONT , COC_MAX } |
Functions | |
| struct option * | optset_option_by_number (const struct option_set *poptset, int id) |
| Returns the option corresponding of the number in this option set. More... | |
| 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. More... | |
| struct option * | optset_option_first (const struct option_set *poptset) |
| Returns the first option of this option set. More... | |
| const char * | optset_category_name (const struct option_set *poptset, int category) |
| Returns the name (translated) of the category of this option set. More... | |
| const struct option_set * | option_optset (const struct option *poption) |
| Returns the option set owner of this option. More... | |
| int | option_number (const struct option *poption) |
| Returns the number of the option. More... | |
| const char * | option_name (const struct option *poption) |
| Returns the name of the option. More... | |
| const char * | option_description (const struct option *poption) |
| Returns the description (translated) of the option. More... | |
| QString | option_help_text (const struct option *poption) |
| Returns the help text (translated) of the option. More... | |
| enum option_type | option_type (const struct option *poption) |
| Returns the type of the option. More... | |
| QString | option_category_name (const struct option *poption) |
| Returns the name (translated) of the category of the option. More... | |
| bool | option_is_changeable (const struct option *poption) |
| Returns TRUE if this option can be modified. More... | |
| struct option * | option_next (const struct option *poption) |
| Returns the next option or nullptr if this is the last. More... | |
| bool | option_reset (struct option *poption) |
| Set the option to its default value. More... | |
| void | option_set_changed_callback (struct option *poption, void(*callback)(struct option *)) |
| Set the function to call every time this option changes. More... | |
| void | option_changed (struct option *poption) |
| Force to use the option changed callback. More... | |
| void | option_set_gui_data (struct option *poption, void *data) |
| Set the gui data for this option. More... | |
| void * | option_get_gui_data (const struct option *poption) |
| Returns the gui data of this option. More... | |
| int | option_get_cb_data (const struct option *poption) |
| Returns the callback data of this option. More... | |
| bool | option_bool_get (const struct option *poption) |
| Returns the current value of this boolean option. More... | |
| bool | option_bool_def (const struct option *poption) |
| Returns the default value of this boolean option. More... | |
| bool | option_bool_set (struct option *poption, bool val) |
| Sets the value of this boolean option. More... | |
| int | option_int_get (const struct option *poption) |
| Returns the current value of this integer option. More... | |
| int | option_int_def (const struct option *poption) |
| Returns the default value of this integer option. More... | |
| int | option_int_min (const struct option *poption) |
| Returns the minimal value of this integer option. More... | |
| int | option_int_max (const struct option *poption) |
| Returns the maximal value of this integer option. More... | |
| bool | option_int_set (struct option *poption, int val) |
| Sets the value of this integer option. More... | |
| const char * | option_str_get (const struct option *poption) |
| Returns the current value of this string option. More... | |
| const char * | option_str_def (const struct option *poption) |
| Returns the default value of this string option. More... | |
| const QVector< QString > * | option_str_values (const struct option *poption) |
| Returns the possible string values of this string option. More... | |
| bool | option_str_set (struct option *poption, const char *str) |
| Sets the value of this string option. More... | |
| 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. More... | |
| 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. More... | |
| int | option_enum_get_int (const struct option *poption) |
| Returns the current value of this enum option (as an integer). More... | |
| int | option_enum_def_int (const struct option *poption) |
| Returns the default value of this enum option (as an integer). More... | |
| bool | option_enum_set_int (struct option *poption, int val) |
| Sets the value of this enum option. More... | |
| unsigned | option_bitwise_get (const struct option *poption) |
| Returns the current value of this bitwise option. More... | |
| unsigned | option_bitwise_def (const struct option *poption) |
| Returns the default value of this bitwise option. More... | |
| unsigned | option_bitwise_mask (const struct option *poption) |
| Returns the mask of this bitwise option. More... | |
| 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 not translated) strings. More... | |
| bool | option_bitwise_set (struct option *poption, unsigned val) |
| Sets the value of this bitwise option. More... | |
| QFont | option_font_get (const struct option *poption) |
| Returns the current value of this font option. More... | |
| QFont | option_font_def (const struct option *poption) |
| Returns the default value of this font option. More... | |
| void | option_font_set_default (const struct option *poption, const QFont &font) |
| Returns the default value of this font option. More... | |
| QString | option_font_target (const struct option *poption) |
| Returns the target style name of this font option. More... | |
| bool | option_font_set (struct option *poption, const QFont &font) |
| Sets the value of this font option. More... | |
| struct ft_color | option_color_get (const struct option *poption) |
| Returns the current value of this color option. More... | |
| struct ft_color | option_color_def (const struct option *poption) |
| Returns the default value of this color option. More... | |
| bool | option_color_set (struct option *poption, struct ft_color color) |
| Sets the value of this color option. More... | |
| static struct option * | client_optset_option_by_number (int id) |
| Client option set. More... | |
| static struct option * | client_optset_option_first () |
| Returns the first valid option pointer for the current gui type. More... | |
| static int | client_optset_category_number () |
| Returns the number of client option categories. More... | |
| static const char * | client_optset_category_name (int category) |
| Returns the name (translated) of the option class. More... | |
| static int | client_option_number (const struct option *poption) |
| Virtuals tables for the client options. More... | |
| static const char * | client_option_name (const struct option *poption) |
| Returns the name of this client option. More... | |
| static const char * | client_option_description (const struct option *poption) |
| Returns the description of this client option. More... | |
| static const char * | client_option_help_text (const struct option *poption) |
| Returns the help text for this client option. More... | |
| static int | client_option_category (const struct option *poption) |
| Returns the category of this client option. More... | |
| static bool | client_option_is_changeable (const struct option *poption) |
| Returns TRUE if this client option can be modified. More... | |
| static struct option * | client_option_next (const struct option *poption) |
| Returns the next valid option pointer for the current gui type. More... | |
| static bool | client_option_bool_get (const struct option *poption) |
| Returns the value of this client option of type OT_BOOLEAN. More... | |
| static bool | client_option_bool_def (const struct option *poption) |
| Returns the default value of this client option of type OT_BOOLEAN. More... | |
| static bool | client_option_bool_set (struct option *poption, bool val) |
| Set the value of this client option of type OT_BOOLEAN. More... | |
| static int | client_option_int_get (const struct option *poption) |
| Returns the value of this client option of type OT_INTEGER. More... | |
| static int | client_option_int_def (const struct option *poption) |
| Returns the default value of this client option of type OT_INTEGER. More... | |
| static int | client_option_int_min (const struct option *poption) |
| Returns the minimal value for this client option of type OT_INTEGER. More... | |
| static int | client_option_int_max (const struct option *poption) |
| Returns the maximal value for this client option of type OT_INTEGER. More... | |
| static bool | client_option_int_set (struct option *poption, int val) |
| Set the value of this client option of type OT_INTEGER. More... | |
| static const char * | client_option_str_get (const struct option *poption) |
| Returns the value of this client option of type OT_STRING. More... | |
| static const char * | client_option_str_def (const struct option *poption) |
| Returns the default value of this client option of type OT_STRING. More... | |
| static const QVector< QString > * | client_option_str_values (const struct option *poption) |
| Returns the possible string values of this client option of type OT_STRING. More... | |
| static bool | client_option_str_set (struct option *poption, const char *str) |
| Set the value of this client option of type OT_STRING. More... | |
| static QFont | client_option_font_get (const struct option *poption) |
| Returns the value of this client option of type OT_FONT. More... | |
| static QFont | client_option_font_def (const struct option *poption) |
| Returns the default value of this client option of type OT_FONT. More... | |
| static void | client_option_font_set_def (const struct option *poption, const QFont &font) |
| Returns the default value of this client option of type OT_FONT. More... | |
| static QString | client_option_font_target (const struct option *poption) |
| Returns the default value of this client option of type OT_FONT. More... | |
| static bool | client_option_font_set (struct option *poption, const QFont &font) |
| Set the value of this client option of type OT_FONT. More... | |
| static struct ft_color | client_option_color_get (const struct option *poption) |
| Returns the value of this client option of type OT_COLOR. More... | |
| static struct ft_color | client_option_color_def (const struct option *poption) |
| Returns the default value of this client option of type OT_COLOR. More... | |
| static bool | client_option_color_set (struct option *poption, struct ft_color color) |
| Set the value of this client option of type OT_COLOR. More... | |
| static void | reqtree_show_icons_callback (struct option *poption) |
| Enumerator name accessors. More... | |
| static void | view_option_changed_callback (struct option *poption) |
| Callback for when any view option is changed. More... | |
| static void | manual_turn_done_callback (struct option *poption) |
| Callback for when ai_manual_turn_done is changed. More... | |
| static void | voteinfo_bar_callback (struct option *poption) |
| Callback for when any voteinfo bar option is changed. More... | |
| static void | font_changed_callback (struct option *poption) |
| Callback for font options. More... | |
| static void | allfont_changed_callback (struct option *poption) |
| Callback for font options. More... | |
| static void | game_music_enable_callback (struct option *poption) |
| Callback for mapimg options. More... | |
| static void | menu_music_enable_callback (struct option *poption) |
| Callback for music enabling option. More... | |
| static void | sound_volume_callback (struct option *poption) |
| Callback for changing music volume. More... | |
| static void | init_client_options () |
| static struct client_option * | client_option_next_valid (struct client_option *poption) |
| Returns the next valid option pointer for the current gui type. More... | |
| static const char * | client_option_enum_secfile_str (secfile_data_t data, int val) |
| Returns the "support" name of the value for this client option of type OT_ENUM (a string suitable for saving in a file). More... | |
| static const char * | client_option_bitwise_secfile_str (secfile_data_t data, int val) |
| Returns the "support" name of a single value for this client option of type OT_BITWISE (a string suitable for saving in a file). More... | |
| static bool | client_option_load (struct option *poption, struct section_file *sf) |
| Load the option from a file. More... | |
| static void | client_option_save (struct option *poption, struct section_file *sf) |
| Save the option to a file. More... | |
| static struct option * | server_optset_option_by_number (int id) |
| Server option set. More... | |
| static struct option * | server_optset_option_first () |
| Returns the first valid (visible) option pointer. More... | |
| static int | server_optset_category_number () |
| Returns the number of server option categories. More... | |
| static const char * | server_optset_category_name (int category) |
| Returns the name (translated) of the server option category. More... | |
| static int | server_option_number (const struct option *poption) |
| Virtuals tables for the client options. More... | |
| static const char * | server_option_name (const struct option *poption) |
| Returns the name of this server option. More... | |
| static const char * | server_option_description (const struct option *poption) |
| Returns the (translated) description of this server option. More... | |
| static const char * | server_option_help_text (const struct option *poption) |
| Returns the (translated) help text for this server option. More... | |
| static int | server_option_category (const struct option *poption) |
| Returns the category of this server option. More... | |
| static bool | server_option_is_changeable (const struct option *poption) |
| Returns TRUE if this client option can be modified. More... | |
| static struct option * | server_option_next (const struct option *poption) |
| Returns the next valid (visible) option pointer. More... | |
| static bool | server_option_bool_get (const struct option *poption) |
| Returns the value of this server option of type OT_BOOLEAN. More... | |
| static bool | server_option_bool_def (const struct option *poption) |
| Returns the default value of this server option of type OT_BOOLEAN. More... | |
| static bool | server_option_bool_set (struct option *poption, bool val) |
| Set the value of this server option of type OT_BOOLEAN. More... | |
| static int | server_option_int_get (const struct option *poption) |
| Returns the value of this server option of type OT_INTEGER. More... | |
| static int | server_option_int_def (const struct option *poption) |
| Returns the default value of this server option of type OT_INTEGER. More... | |
| static int | server_option_int_min (const struct option *poption) |
| Returns the minimal value for this server option of type OT_INTEGER. More... | |
| static int | server_option_int_max (const struct option *poption) |
| Returns the maximal value for this server option of type OT_INTEGER. More... | |
| static bool | server_option_int_set (struct option *poption, int val) |
| Set the value of this server option of type OT_INTEGER. More... | |
| static const char * | server_option_str_get (const struct option *poption) |
| Returns the value of this server option of type OT_STRING. More... | |
| static const char * | server_option_str_def (const struct option *poption) |
| Returns the default value of this server option of type OT_STRING. More... | |
| static const QVector< QString > * | server_option_str_values (const struct option *poption) |
| Returns the possible string values of this server option of type OT_STRING. More... | |
| static bool | server_option_str_set (struct option *poption, const char *str) |
| Set the value of this server option of type OT_STRING. More... | |
| static int | server_option_enum_get (const struct option *poption) |
| Returns the current value of this server option of type OT_ENUM. More... | |
| static int | server_option_enum_def (const struct option *poption) |
| Returns the default value of this server option of type OT_ENUM. More... | |
| static const QVector< QString > * | server_option_enum_pretty (const struct option *poption) |
| Returns the user-visible, translatable (but untranslated) "pretty" names of this server option of type OT_ENUM. More... | |
| static bool | server_option_enum_set (struct option *poption, int val) |
| Set the value of this server option of type OT_ENUM. More... | |
| static unsigned | server_option_bitwise_get (const struct option *poption) |
| Returns the current value of this server option of type OT_BITWISE. More... | |
| static unsigned | server_option_bitwise_def (const struct option *poption) |
| Returns the default value of this server option of type OT_BITWISE. More... | |
| static const QVector< QString > * | server_option_bitwise_pretty (const struct option *poption) |
| Returns the user-visible, translatable (but untranslated) "pretty" names of this server option of type OT_BITWISE. More... | |
| static bool | server_option_bitwise_set (struct option *poption, unsigned val) |
| Set the value of this server option of type OT_BITWISE. More... | |
| static void | desired_settable_option_send (struct option *poption) |
| Send the desired server options to the server. More... | |
| void | server_options_init () |
| Initialize the server options (not received yet). More... | |
| static void | server_option_free (struct server_option *poption) |
| Free one server option. More... | |
| void | server_options_free () |
| Free the server options, if already received. More... | |
| void | handle_server_setting_control (const struct packet_server_setting_control *packet) |
| Allocate the server options and categories. More... | |
| void | handle_server_setting_const (const struct packet_server_setting_const *packet) |
| Receive a server setting info packet. More... | |
| void | handle_server_setting_bool (const struct packet_server_setting_bool *packet) |
| Receive a boolean server setting info packet. More... | |
| void | handle_server_setting_int (const struct packet_server_setting_int *packet) |
| Receive a integer server setting info packet. More... | |
| void | handle_server_setting_str (const struct packet_server_setting_str *packet) |
| Receive a string server setting info packet. More... | |
| void | handle_server_setting_enum (const struct packet_server_setting_enum *packet) |
| Receive an enumerator server setting info packet. More... | |
| void | handle_server_setting_bitwise (const struct packet_server_setting_bitwise *packet) |
| Receive a bitwise server setting info packet. More... | |
| static struct server_option * | server_option_next_valid (struct server_option *poption) |
| Returns the next valid option pointer for the current gui type. More... | |
| static void | server_option_enum_support_name (const struct option *poption, QString *pvalue, QString *pdefault) |
| Returns the long support names of the values of the server option of type OT_ENUM. More... | |
| static void | server_option_bitwise_support_base (const QVector< QString > *values, unsigned val, char *buf, size_t buf_len) |
| Compute the long support names of a value. More... | |
| static void | server_option_bitwise_support_name (const struct option *poption, char *val_buf, size_t val_len, char *def_buf, size_t def_len) |
| Compute the long support names of the values of the server option of type OT_BITWISE. More... | |
| static void | message_options_init () |
| These could be a static table initialisation, except its easier to do it this way. More... | |
| static void | message_options_free () |
| Free resources allocated for message options system. More... | |
| static void | message_options_load (struct section_file *file, const char *prefix) |
| Load the message options; use the function defined by specnum.h (see also events.h). More... | |
| static void | message_options_save (struct section_file *file, const char *prefix) |
| Save the message options; use the function defined by specnum.h (see also events.h). More... | |
| static void | load_cma_preset (struct section_file *file, int i) |
| Does heavy lifting for looking up a preset. More... | |
| static void | save_cma_preset (struct section_file *file, int i) |
| Does heavy lifting for inserting a preset. More... | |
| static void | save_cma_presets (struct section_file *file) |
| Insert all cma presets. More... | |
| static const char * | get_current_option_file_name () |
| Returns pointer to static memory containing name of the current option file. More... | |
| static const char * | get_last_option_file_name (bool *allow_digital_boolean) |
| Check the last option file we saved. More... | |
| static void | tileset_options_migrate_cimpletoon (struct client_options *options) |
| Migrate players using cimpletoon/toonhex to amplio2/hexemplio with the cimpletoon option enabled. More... | |
| static void | tileset_options_load (struct section_file *sf, struct client_options *options) |
| Load tileset options. More... | |
| static void | tileset_options_save (struct section_file *sf, const struct client_options *options) |
| Save tileset options. More... | |
| static void | settable_options_load (struct section_file *sf) |
| Load the server options. More... | |
| static void | settable_options_save (struct section_file *sf) |
| Save the desired server options. More... | |
| void | desired_settable_options_update () |
| Update the desired settable options hash table from the current setting configuration. More... | |
| 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 configuration. More... | |
| static bool | settable_option_upgrade_value (const struct option *poption, int old_value, char *buf, size_t buf_len) |
| Convert old integer to new values (Freeciv 2.2.x to Freeciv 2.3.x). More... | |
| static void | options_dialogs_load (struct section_file *sf) |
| Load the city and player report dialog options. More... | |
| static void | options_dialogs_save (struct section_file *sf) |
| Save the city and player report dialog options. More... | |
| void | options_dialogs_update () |
| This set the city and player report dialog options to the current ones. More... | |
| void | options_dialogs_set () |
| This set the city and player report dialog options. More... | |
| void | options_load () |
| Load from the rc file any options that are not ruleset specific. More... | |
| static void | option_save_output_window_callback (QtMsgType lvl, const QString &msg) |
| Write messages from option saving to the output window. More... | |
| void | options_save (option_save_log_callback log_cb) |
| Save all options. More... | |
| static void | options_init_names (const struct copt_val_name *(*acc)(int), QVector< QString > **support, QVector< QString > **pretty) |
| Initialize lists of names for a client option. More... | |
| void | options_init () |
| Initialize the option module. More... | |
| void | options_free () |
| Free the option module. More... | |
| const char * | tileset_name_for_topology (int topology_id) |
| Option framework wrapper for mapimg_get_format_list() More... | |
| static bool | is_ts_option_unset (const char *optname) |
| Does topology-specific tileset option lack value? More... | |
| void | fill_topo_ts_default () |
| Fill default tilesets for topology-specific settings. More... | |
| #define CLIENT_OPTION | ( | poption | ) | ((struct client_option *) (poption)) |
Definition at line 1020 of file options.cpp.
| #define color_set | ( | color_tgt, | |
| color | |||
| ) |
| #define FIRST_MAJOR_MID_OPTION_FILE_NAME 2 |
Definition at line 3718 of file options.cpp.
| #define FIRST_MAJOR_NEW_BOOLEAN 2 |
Definition at line 3721 of file options.cpp.
| #define FIRST_MAJOR_NEW_OPTION_FILE_NAME 2 |
Definition at line 3715 of file options.cpp.
| #define FIRST_MINOR_MID_OPTION_FILE_NAME 2 |
Definition at line 3719 of file options.cpp.
| #define FIRST_MINOR_NEW_BOOLEAN 3 |
Definition at line 3722 of file options.cpp.
| #define FIRST_MINOR_NEW_OPTION_FILE_NAME 6 |
Definition at line 3716 of file options.cpp.
| #define GEN_BITWISE_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef, | |||
| oacc, | |||
| ocb | |||
| ) |
Definition at line 1196 of file options.cpp.
| #define GEN_BOOL_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef, | |||
| ocb | |||
| ) |
Definition at line 1038 of file options.cpp.
| #define GEN_COLOR_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef_fg, | |||
| odef_bg, | |||
| ocb | |||
| ) |
Definition at line 1258 of file options.cpp.
| #define GEN_ENUM_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef, | |||
| oacc, | |||
| ocb | |||
| ) |
Definition at line 1165 of file options.cpp.
| #define GEN_FONT_OPTION | ( | oname, | |
| otgt, | |||
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| ocb | |||
| ) |
Definition at line 1228 of file options.cpp.
| #define GEN_INT_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef, | |||
| omin, | |||
| omax, | |||
| ocb | |||
| ) |
Definition at line 1069 of file options.cpp.
| #define GEN_STR_LIST_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef, | |||
| oacc, | |||
| ocb, | |||
| cbd | |||
| ) |
Definition at line 1134 of file options.cpp.
| #define GEN_STR_OPTION | ( | oname, | |
| odesc, | |||
| ohelp, | |||
| ocat, | |||
| odef, | |||
| ocb, | |||
| cbd | |||
| ) |
Definition at line 1100 of file options.cpp.
| #define handle_server_setting_common | ( | psoption, | |
| packet | |||
| ) |
Common part of handle_server_setting_*() functions.
See below.
Definition at line 2707 of file options.cpp.
| #define MAJOR_NEW_OPTION_FILE_NAME MAJOR_VERSION |
Definition at line 3707 of file options.cpp.
| #define MID_OPTION_FILE_NAME ".freeciv-client-rc-%d.%d" |
Definition at line 3701 of file options.cpp.
| #define MINOR_NEW_OPTION_FILE_NAME MINOR_VERSION |
Definition at line 3711 of file options.cpp.
| #define NEW_OPTION_FILE_NAME "freeciv-client-rc-%d.%d" |
Definition at line 3702 of file options.cpp.
| #define OLD_OPTION_FILE_NAME ".civclientrc" |
Definition at line 3699 of file options.cpp.
| #define OPTION | ( | poption | ) | ((struct option *) (poption)) |
Definition at line 244 of file options.cpp.
| #define OPTION_BITWISE_INIT | ( | optset, | |
| common_table, | |||
| bitwise_table, | |||
| changed_cb | |||
| ) |
Definition at line 266 of file options.cpp.
| #define OPTION_BOOL_INIT | ( | optset, | |
| common_table, | |||
| bool_table, | |||
| changed_cb | |||
| ) |
Definition at line 253 of file options.cpp.
| #define OPTION_COLOR_INIT | ( | optset, | |
| common_table, | |||
| color_table, | |||
| changed_cb | |||
| ) |
Definition at line 273 of file options.cpp.
| #define OPTION_ENUM_INIT | ( | optset, | |
| common_table, | |||
| enum_table, | |||
| changed_cb | |||
| ) |
Definition at line 263 of file options.cpp.
| #define OPTION_FONT_INIT | ( | optset, | |
| common_table, | |||
| font_table, | |||
| changed_cb | |||
| ) |
Definition at line 270 of file options.cpp.
| #define OPTION_INIT | ( | optset, | |
| spec_type, | |||
| spec_table_var, | |||
| common_table, | |||
| spec_table, | |||
| changed_cb, | |||
| cb_data | |||
| ) |
Definition at line 246 of file options.cpp.
| #define OPTION_INT_INIT | ( | optset, | |
| common_table, | |||
| int_table, | |||
| changed_cb | |||
| ) |
Definition at line 256 of file options.cpp.
| #define OPTION_STR_INIT | ( | optset, | |
| common_table, | |||
| str_table, | |||
| changed_cb, | |||
| cb_data | |||
| ) |
Definition at line 259 of file options.cpp.
| #define SERVER_OPTION | ( | poption | ) | ((struct server_option *) (poption)) |
Definition at line 2559 of file options.cpp.
| #define SETTING_CASE | ( | ARG_name, | |
| ... | |||
| ) |
| typedef QHash<QString, intptr_t> dialOptionsHash |
Definition at line 72 of file options.cpp.
| typedef QHash<QString, QString> optionsHash |
Definition at line 71 of file options.cpp.
| Enumerator | |
|---|---|
| COC_GRAPHICS | |
| COC_OVERVIEW | |
| COC_SOUND | |
| COC_INTERFACE | |
| COC_MAPIMG | |
| COC_NETWORK | |
| COC_FONT | |
| COC_MAX | |
Definition at line 948 of file options.cpp.
|
static |
Callback for font options.
Definition at line 4779 of file options.cpp.
Referenced by init_client_options().
|
static |
Returns the "support" name of a single value for this client option of type OT_BITWISE (a string suitable for saving in a file).
The prototype must match the 'secfile_enum_name_data_fn_t' type.
Definition at line 2180 of file options.cpp.
Referenced by client_option_load(), and client_option_save().
|
static |
Returns the default value of this client option of type OT_BOOLEAN.
Definition at line 2038 of file options.cpp.
|
static |
Returns the value of this client option of type OT_BOOLEAN.
Definition at line 2030 of file options.cpp.
|
static |
Set the value of this client option of type OT_BOOLEAN.
Returns TRUE if the value changed.
Definition at line 2047 of file options.cpp.
|
static |
Returns the category of this client option.
Definition at line 2005 of file options.cpp.
Returns the default value of this client option of type OT_COLOR.
Definition at line 2227 of file options.cpp.
Returns the value of this client option of type OT_COLOR.
Definition at line 2227 of file options.cpp.
Set the value of this client option of type OT_COLOR.
Returns TRUE if the value changed.
Definition at line 2259 of file options.cpp.
|
static |
Returns the description of this client option.
Definition at line 1989 of file options.cpp.
|
static |
Returns the "support" name of the value for this client option of type OT_ENUM (a string suitable for saving in a file).
The prototype must match the 'secfile_enum_name_data_fn_t' type.
Definition at line 2165 of file options.cpp.
Referenced by client_option_load(), and client_option_save().
|
static |
Returns the default value of this client option of type OT_FONT.
Definition at line 2201 of file options.cpp.
|
static |
Returns the value of this client option of type OT_FONT.
Definition at line 2193 of file options.cpp.
|
static |
Set the value of this client option of type OT_FONT.
Returns TRUE if the value changed.
Definition at line 2227 of file options.cpp.
|
static |
Returns the default value of this client option of type OT_FONT.
Definition at line 2209 of file options.cpp.
|
static |
Returns the default value of this client option of type OT_FONT.
Definition at line 2218 of file options.cpp.
|
static |
Returns the help text for this client option.
Definition at line 1997 of file options.cpp.
|
static |
Returns the default value of this client option of type OT_INTEGER.
Definition at line 2070 of file options.cpp.
|
static |
Returns the value of this client option of type OT_INTEGER.
Definition at line 2062 of file options.cpp.
|
static |
Returns the maximal value for this client option of type OT_INTEGER.
Definition at line 2086 of file options.cpp.
|
static |
Returns the minimal value for this client option of type OT_INTEGER.
Definition at line 2078 of file options.cpp.
|
static |
Set the value of this client option of type OT_INTEGER.
Returns TRUE if the value changed.
Definition at line 2095 of file options.cpp.
|
static |
Returns TRUE if this client option can be modified.
Definition at line 2013 of file options.cpp.
|
static |
Load the option from a file.
Returns TRUE if the option changed.
Definition at line 2294 of file options.cpp.
|
static |
Returns the name of this client option.
Definition at line 1981 of file options.cpp.
Returns the next valid option pointer for the current gui type.
Definition at line 2022 of file options.cpp.
|
static |
Returns the next valid option pointer for the current gui type.
Definition at line 1911 of file options.cpp.
Referenced by client_option_next(), and client_optset_option_first().
|
static |
Virtuals tables for the client options.
Returns the number of this client option.
Definition at line 1973 of file options.cpp.
|
static |
Save the option to a file.
Definition at line 2363 of file options.cpp.
Referenced by options_save().
|
static |
Returns the default value of this client option of type OT_STRING.
Definition at line 2119 of file options.cpp.
|
static |
Returns the value of this client option of type OT_STRING.
Definition at line 2111 of file options.cpp.
|
static |
Set the value of this client option of type OT_STRING.
Returns TRUE if the value changed.
Definition at line 2140 of file options.cpp.
Returns the possible string values of this client option of type OT_STRING.
Definition at line 2129 of file options.cpp.
Referenced by client_option_str_set().
|
static |
Returns the name (translated) of the option class.
Definition at line 1943 of file options.cpp.
|
static |
Returns the number of client option categories.
Definition at line 1938 of file options.cpp.
|
static |
Client option set.
Returns the option corresponding to this id.
Definition at line 1919 of file options.cpp.
|
static |
Returns the first valid option pointer for the current gui type.
Definition at line 1930 of file options.cpp.
|
static |
Send the desired server options to the server.
Definition at line 4177 of file options.cpp.
| 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 configuration.
Definition at line 4126 of file options.cpp.
| void desired_settable_options_update | ( | ) |
Update the desired settable options hash table from the current setting configuration.
Desired settable options.
Definition at line 4064 of file options.cpp.
Referenced by option_dialog::apply_option().
| void fill_topo_ts_default | ( | ) |
Fill default tilesets for topology-specific settings.
Definition at line 4906 of file options.cpp.
Referenced by client_main().
|
static |
Callback for font options.
Definition at line 4788 of file options.cpp.
Referenced by init_client_options().
|
static |
Callback for mapimg options.
Callback for music enabling option.
Definition at line 4822 of file options.cpp.
Referenced by init_client_options().
|
static |
Returns pointer to static memory containing name of the current option file.
Usually used for saving. Ie, based on FREECIV_OPT env var, and freeciv storage root dir. (or a OPTION_FILE_NAME define defined in fc_config.h) Or nullptr if problem.
Definition at line 3731 of file options.cpp.
Referenced by options_save().
|
static |
Check the last option file we saved.
Usually used to load. Ie, based on FREECIV_OPT env var, and home dir. (or a OPTION_FILE_NAME define defined in fc_config.h), or nullptr if not found.
Set in allow_digital_boolean if we should look for old boolean values (saved as 0 and 1), so if the rc file version is older than 2.3.0.
Definition at line 3765 of file options.cpp.
| void handle_server_setting_bitwise | ( | const struct packet_server_setting_bitwise * | packet | ) |
Receive a bitwise server setting info packet.
Definition at line 2920 of file options.cpp.
| void handle_server_setting_bool | ( | const struct packet_server_setting_bool * | packet | ) |
Receive a boolean server setting info packet.
Definition at line 2726 of file options.cpp.
| void handle_server_setting_const | ( | const struct packet_server_setting_const * | packet | ) |
Receive a server setting info packet.
Definition at line 2685 of file options.cpp.
| void handle_server_setting_control | ( | const struct packet_server_setting_control * | packet | ) |
Allocate the server options and categories.
Definition at line 2653 of file options.cpp.
| void handle_server_setting_enum | ( | const struct packet_server_setting_enum * | packet | ) |
Receive an enumerator server setting info packet.
Definition at line 2837 of file options.cpp.
| void handle_server_setting_int | ( | const struct packet_server_setting_int * | packet | ) |
Receive a integer server setting info packet.
Definition at line 2759 of file options.cpp.
| void handle_server_setting_str | ( | const struct packet_server_setting_str * | packet | ) |
Receive a string server setting info packet.
Definition at line 2794 of file options.cpp.
|
static |
Definition at line 1290 of file options.cpp.
Referenced by options_init().
|
static |
Does topology-specific tileset option lack value?
Definition at line 4887 of file options.cpp.
|
static |
Does heavy lifting for looking up a preset.
Definition at line 3624 of file options.cpp.
|
static |
Callback for when ai_manual_turn_done is changed.
Definition at line 4745 of file options.cpp.
Referenced by init_client_options().
|
static |
Callback for music enabling option.
Definition at line 4837 of file options.cpp.
Referenced by init_client_options().
|
static |
Free resources allocated for message options system.
Definition at line 3429 of file options.cpp.
Referenced by options_free().
|
static |
These could be a static table initialisation, except its easier to do it this way.
Definition at line 3389 of file options.cpp.
Referenced by options_init().
|
static |
Load the message options; use the function defined by specnum.h (see also events.h).
Definition at line 3435 of file options.cpp.
|
static |
Save the message options; use the function defined by specnum.h (see also events.h).
Definition at line 3603 of file options.cpp.
Referenced by options_save().
| unsigned option_bitwise_def | ( | const struct option * | poption | ) |
Returns the default value of this bitwise option.
Definition at line 693 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), and option_reset().
| unsigned option_bitwise_get | ( | const struct option * | poption | ) |
Returns the current value of this bitwise option.
Definition at line 682 of file options.cpp.
Referenced by client_option_save(), client_ss_val_bitwise_get(), and option_dialog::option_dialog_refresh().
| unsigned option_bitwise_mask | ( | const struct option * | poption | ) |
Returns the mask of this bitwise option.
Definition at line 704 of file options.cpp.
Referenced by option_bitwise_set().
| bool option_bitwise_set | ( | struct option * | poption, |
| unsigned | val | ||
| ) |
Sets the value of this bitwise option.
Returns TRUE if the value changed.
Definition at line 732 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), and option_reset().
Returns a vector of strings describing every bit of this option, as user-visible (translatable but not translated) strings.
Definition at line 721 of file options.cpp.
Referenced by option_dialog::add_option().
| bool option_bool_def | ( | const struct option * | poption | ) |
Returns the default value of this boolean option.
Definition at line 468 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), and option_reset().
| bool option_bool_get | ( | const struct option * | poption | ) |
Returns the current value of this boolean option.
Definition at line 457 of file options.cpp.
Referenced by apply_titlebar(), blink_turn_done_button(), can_end_turn(), client_option_save(), client_ss_val_bool_get(), desired_settable_option_send(), option_dialog::option_dialog_refresh(), and plrdlg_col_state().
| bool option_bool_set | ( | struct option * | poption, |
| bool | val | ||
| ) |
Sets the value of this boolean option.
Returns TRUE if the value changed.
Definition at line 479 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), and option_reset().
| QString option_category_name | ( | const struct option * | poption | ) |
Returns the name (translated) of the category of the option.
Definition at line 340 of file options.cpp.
Referenced by option_dialog::add_option().
| void option_changed | ( | struct option * | poption | ) |
Force to use the option changed callback.
Definition at line 408 of file options.cpp.
Referenced by option_bitwise_set(), option_bool_set(), option_color_def(), option_color_set(), option_enum_set_int(), option_int_set(), and option_str_set().
Returns the default value of this color option.
Definition at line 793 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), and option_reset().
Returns the current value of this color option.
Definition at line 793 of file options.cpp.
Referenced by client_option_save(), option_dialog::option_dialog_refresh(), and option_dialog::set_color().
Sets the value of this color option.
Returns TRUE if the value changed.
Definition at line 835 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), and option_reset().
| const char* option_description | ( | const struct option * | poption | ) |
Returns the description (translated) of the option.
Definition at line 310 of file options.cpp.
Referenced by option_dialog::add_option().
| int option_enum_def_int | ( | const struct option * | poption | ) |
Returns the default value of this enum option (as an integer).
Definition at line 656 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), and option_reset().
| int option_enum_get_int | ( | const struct option * | poption | ) |
Returns the current value of this enum option (as an integer).
Definition at line 645 of file options.cpp.
Referenced by client_option_save(), and option_dialog::option_dialog_refresh().
| 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.
Returns nullptr on error.
Definition at line 626 of file options.cpp.
Referenced by option_dialog::add_option().
| bool option_enum_set_int | ( | struct option * | poption, |
| int | val | ||
| ) |
Sets the value of this enum option.
Returns TRUE if the value changed.
Definition at line 667 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), and option_reset().
| 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.
Returns -1 if not matched.
Definition at line 603 of file options.cpp.
| QFont option_font_def | ( | const struct option * | poption | ) |
Returns the default value of this font option.
Definition at line 760 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), and option_reset().
| QFont option_font_get | ( | const struct option * | poption | ) |
Returns the current value of this font option.
Definition at line 749 of file options.cpp.
Referenced by option_dialog::add_option(), apply_help_font(), apply_notify_font(), client_option_save(), font_changed_callback(), gui_qt_apply_font(), fcFont::initFonts(), option_dialog::option_dialog_refresh(), and fcFont::setSizeAll().
| bool option_font_set | ( | struct option * | poption, |
| const QFont & | font | ||
| ) |
Sets the value of this font option.
Returns TRUE if the value changed.
Definition at line 793 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), option_reset(), and fcFont::setSizeAll().
| void option_font_set_default | ( | const struct option * | poption, |
| const QFont & | font | ||
| ) |
Returns the default value of this font option.
Definition at line 771 of file options.cpp.
Referenced by configure_font().
| QString option_font_target | ( | const struct option * | poption | ) |
Returns the target style name of this font option.
Definition at line 782 of file options.cpp.
Referenced by font_changed_callback().
| int option_get_cb_data | ( | const struct option * | poption | ) |
Returns the callback data of this option.
Definition at line 447 of file options.cpp.
Referenced by get_tileset_list(), and tilespec_reread_callback().
| void* option_get_gui_data | ( | const struct option * | poption | ) |
Returns the gui data of this option.
Definition at line 437 of file options.cpp.
Referenced by option_dialog::get_bitwise(), option_dialog::get_bool(), option_dialog::get_button_font(), option_dialog::get_color(), option_dialog::get_enum(), option_dialog::get_int(), option_dialog::get_string(), option_dialog::set_bitwise(), option_dialog::set_bool(), option_dialog::set_color(), option_dialog::set_enum(), option_dialog::set_font(), option_dialog::set_int(), and option_dialog::set_string().
| QString option_help_text | ( | const struct option * | poption | ) |
Returns the help text (translated) of the option.
Definition at line 320 of file options.cpp.
Referenced by option_dialog::add_option().
| int option_int_def | ( | const struct option * | poption | ) |
Returns the default value of this integer option.
Definition at line 505 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), option_reset(), and options_init().
| int option_int_get | ( | const struct option * | poption | ) |
Returns the current value of this integer option.
Definition at line 494 of file options.cpp.
Referenced by client_option_save(), client_ss_val_int_get(), desired_settable_option_send(), and option_dialog::option_dialog_refresh().
| int option_int_max | ( | const struct option * | poption | ) |
Returns the maximal value of this integer option.
Definition at line 527 of file options.cpp.
Referenced by option_dialog::add_option(), and options_init().
| int option_int_min | ( | const struct option * | poption | ) |
Returns the minimal value of this integer option.
Definition at line 516 of file options.cpp.
Referenced by option_dialog::add_option(), and options_init().
| bool option_int_set | ( | struct option * | poption, |
| int | val | ||
| ) |
Sets the value of this integer option.
Returns TRUE if the value changed.
Definition at line 538 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), pregame_options::max_players_change(), and option_reset().
| bool option_is_changeable | ( | const struct option * | poption | ) |
Returns TRUE if this option can be modified.
Definition at line 351 of file options.cpp.
Referenced by option_dialog::add_option().
| const char* option_name | ( | const struct option * | poption | ) |
Returns the name of the option.
Definition at line 300 of file options.cpp.
Referenced by apply_help_font(), client_option_load(), client_option_save(), client_option_str_set(), client_ss_name_get(), desired_settable_option_send(), gui_qt_apply_font(), handle_server_setting_bitwise(), handle_server_setting_bool(), handle_server_setting_enum(), handle_server_setting_int(), handle_server_setting_str(), fcFont::initFonts(), option_gui_update(), options_init(), optset_option_by_name(), and mr_menu::slot_set_citybar().
Returns the next option or nullptr if this is the last.
Definition at line 361 of file options.cpp.
| int option_number | ( | const struct option * | poption | ) |
Returns the number of the option.
Definition at line 290 of file options.cpp.
Referenced by client_ss_by_name(), handle_server_setting_bitwise(), handle_server_setting_bool(), handle_server_setting_enum(), handle_server_setting_int(), and handle_server_setting_str().
| const struct option_set* option_optset | ( | const struct option * | poption | ) |
Returns the option set owner of this option.
Definition at line 280 of file options.cpp.
Referenced by option_gui_update().
| bool option_reset | ( | struct option * | poption | ) |
Set the option to its default value.
Returns TRUE if the option changed.
Definition at line 371 of file options.cpp.
Referenced by options_init().
|
static |
Write messages from option saving to the output window.
Definition at line 4486 of file options.cpp.
Referenced by options_save().
Set the function to call every time this option changes.
Can be nullptr.
Definition at line 397 of file options.cpp.
| void option_set_gui_data | ( | struct option * | poption, |
| void * | data | ||
| ) |
Set the gui data for this option.
Definition at line 427 of file options.cpp.
Referenced by option_dialog::add_option().
| const char* option_str_def | ( | const struct option * | poption | ) |
Returns the default value of this string option.
Definition at line 564 of file options.cpp.
Referenced by option_dialog::option_dialog_reset(), option_reset(), and options_init().
| const char* option_str_get | ( | const struct option * | poption | ) |
Returns the current value of this string option.
Definition at line 553 of file options.cpp.
Referenced by client_current_nation_set(), client_option_save(), desired_settable_option_send(), musicspec_reread_callback(), races_dialog::nationset_changed(), citybar_painter::option_changed(), option_dialog::option_dialog_refresh(), options_init(), theme_reread_callback(), tilespec_reread_callback(), and races_dialog::update_nationset_combo().
| bool option_str_set | ( | struct option * | poption, |
| const char * | str | ||
| ) |
Sets the value of this string option.
Returns TRUE if the value changed.
Definition at line 586 of file options.cpp.
Referenced by option_dialog::apply_options(), client_option_load(), races_dialog::nationset_changed(), and option_reset().
Returns the possible string values of this string option.
Definition at line 575 of file options.cpp.
Referenced by option_dialog::add_option(), option_dialog::get_string(), options_init(), and option_dialog::set_string().
| enum option_type option_type | ( | const struct option * | poption | ) |
Returns the type of the option.
Definition at line 320 of file options.cpp.
Referenced by option_dialog::add_option(), option_dialog::apply_options(), client_current_nation_set(), client_option_load(), client_option_save(), desired_settable_option_send(), font_changed_callback(), option_dialog::get_color_option(), fcFont::initFonts(), option_dialog::option_dialog_refresh(), option_dialog::option_dialog_reset(), option_reset(), options_free(), options_init(), and fcFont::setSizeAll().
|
static |
Load the city and player report dialog options.
Definition at line 4260 of file options.cpp.
|
static |
Save the city and player report dialog options.
Definition at line 4288 of file options.cpp.
Referenced by options_save().
| void options_dialogs_set | ( | ) |
This set the city and player report dialog options.
It's called when the client goes to C_S_RUNNING state.
Definition at line 4332 of file options.cpp.
Referenced by client_state().
| void options_dialogs_update | ( | ) |
This set the city and player report dialog options to the current ones.
Dialog report options.
It's called when the client goes to C_S_DISCONNECTED state.
Definition at line 4306 of file options.cpp.
Referenced by client_state(), and options_dialogs_save().
| void options_free | ( | ) |
| void options_init | ( | ) |
Initialize the option module.
Definition at line 4582 of file options.cpp.
Referenced by client_main().
|
static |
Initialize lists of names for a client option.
Definition at line 4564 of file options.cpp.
Referenced by options_init().
| void options_load | ( | ) |
Load from the rc file any options that are not ruleset specific.
It is called after ui_init(), yet before ui_main(). Unfortunately, this means that some clients cannot display. Instead, use log_*().
Definition at line 4362 of file options.cpp.
Referenced by client_main().
| void options_save | ( | option_save_log_callback | log_cb | ) |
Save all options.
Definition at line 4496 of file options.cpp.
Referenced by option_dialog::apply_option(), client_exit(), disconnect_from_server(), and mr_menu::save_options_now().
| const char* optset_category_name | ( | const struct option_set * | poptset, |
| int | category | ||
| ) |
Returns the name (translated) of the category of this option set.
Definition at line 138 of file options.cpp.
Referenced by option_category_name().
| 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.
Definition at line 110 of file options.cpp.
Referenced by blink_turn_done_button(), can_end_turn(), client_current_nation_set(), client_ss_by_name(), configure_font(), is_ts_option_unset(), pregame_options::max_players_change(), races_dialog::nationset_changed(), plrdlg_col_state(), mr_menu::tileset_custom_load(), and races_dialog::update_nationset_combo().
| struct option* optset_option_by_number | ( | const struct option_set * | poptset, |
| int | id | ||
| ) |
Returns the option corresponding of the number in this option set.
Definition at line 99 of file options.cpp.
Referenced by client_ss_name_get(), client_ss_val_bitwise_get(), client_ss_val_bool_get(), and client_ss_val_int_get().
| struct option* optset_option_first | ( | const struct option_set * | poptset | ) |
Returns the first option of this option set.
Definition at line 128 of file options.cpp.
|
static |
Enumerator name accessors.
Callback when the reqtree show icons option is changed.
The tree is recalculated.
Definition at line 4726 of file options.cpp.
Referenced by init_client_options().
|
static |
Does heavy lifting for inserting a preset.
Definition at line 3655 of file options.cpp.
Referenced by save_cma_presets().
|
static |
|
static |
Returns the default value of this server option of type OT_BITWISE.
Definition at line 3306 of file options.cpp.
|
static |
Returns the current value of this server option of type OT_BITWISE.
Definition at line 3298 of file options.cpp.
|
static |
Returns the user-visible, translatable (but untranslated) "pretty" names of this server option of type OT_BITWISE.
Definition at line 3316 of file options.cpp.
|
static |
Set the value of this server option of type OT_BITWISE.
Returns TRUE if the value changed.
Definition at line 3345 of file options.cpp.
|
static |
Compute the long support names of a value.
Definition at line 3325 of file options.cpp.
|
static |
Compute the long support names of the values of the server option of type OT_BITWISE.
Definition at line 3364 of file options.cpp.
Referenced by desired_settable_option_send().
|
static |
Returns the default value of this server option of type OT_BOOLEAN.
Definition at line 3117 of file options.cpp.
|
static |
Returns the value of this server option of type OT_BOOLEAN.
Definition at line 3109 of file options.cpp.
|
static |
Set the value of this server option of type OT_BOOLEAN.
Returns TRUE if the value changed.
Definition at line 3126 of file options.cpp.
|
static |
Returns the category of this server option.
Definition at line 3085 of file options.cpp.
|
static |
Returns the (translated) description of this server option.
Definition at line 3069 of file options.cpp.
|
static |
Returns the default value of this server option of type OT_ENUM.
Definition at line 3242 of file options.cpp.
|
static |
Returns the current value of this server option of type OT_ENUM.
Definition at line 3234 of file options.cpp.
Returns the user-visible, translatable (but untranslated) "pretty" names of this server option of type OT_ENUM.
Definition at line 3252 of file options.cpp.
|
static |
Set the value of this server option of type OT_ENUM.
Returns TRUE if the value changed.
Definition at line 3261 of file options.cpp.
|
static |
Returns the long support names of the values of the server option of type OT_ENUM.
Definition at line 3280 of file options.cpp.
Referenced by desired_settable_option_send().
|
static |
Free one server option.
Definition at line 2577 of file options.cpp.
Referenced by server_options_free().
|
static |
Returns the (translated) help text for this server option.
Definition at line 3077 of file options.cpp.
|
static |
Returns the default value of this server option of type OT_INTEGER.
Definition at line 3150 of file options.cpp.
|
static |
Returns the value of this server option of type OT_INTEGER.
Definition at line 3142 of file options.cpp.
|
static |
Returns the maximal value for this server option of type OT_INTEGER.
Definition at line 3166 of file options.cpp.
|
static |
Returns the minimal value for this server option of type OT_INTEGER.
Definition at line 3158 of file options.cpp.
|
static |
Set the value of this server option of type OT_INTEGER.
Returns TRUE if the value changed.
Definition at line 3175 of file options.cpp.
|
static |
Returns TRUE if this client option can be modified.
Definition at line 3093 of file options.cpp.
|
static |
Returns the name of this server option.
Definition at line 3061 of file options.cpp.
Returns the next valid (visible) option pointer.
Definition at line 3101 of file options.cpp.
|
static |
Returns the next valid option pointer for the current gui type.
Definition at line 3002 of file options.cpp.
Referenced by server_option_next(), and server_optset_option_first().
|
static |
Virtuals tables for the client options.
Returns the number of this server option.
Definition at line 3053 of file options.cpp.
|
static |
Returns the default value of this server option of type OT_STRING.
Definition at line 3199 of file options.cpp.
|
static |
Returns the value of this server option of type OT_STRING.
Definition at line 3191 of file options.cpp.
|
static |
Set the value of this server option of type OT_STRING.
Returns TRUE if the value changed.
Definition at line 3219 of file options.cpp.
Returns the possible string values of this server option of type OT_STRING.
Definition at line 3209 of file options.cpp.
| void server_options_free | ( | ) |
Free the server options, if already received.
Definition at line 2619 of file options.cpp.
Referenced by client_game_free().
| void server_options_init | ( | ) |
Initialize the server options (not received yet).
Definition at line 2566 of file options.cpp.
Referenced by client_game_init().
|
static |
Returns the name (translated) of the server option category.
Definition at line 3041 of file options.cpp.
|
static |
Returns the number of server option categories.
Definition at line 3036 of file options.cpp.
|
static |
Server option set.
Returns the server option associated to the number.
Definition at line 3017 of file options.cpp.
Referenced by handle_server_setting_bitwise(), handle_server_setting_bool(), handle_server_setting_const(), handle_server_setting_enum(), handle_server_setting_int(), and handle_server_setting_str().
|
static |
Returns the first valid (visible) option pointer.
Definition at line 3028 of file options.cpp.
|
static |
Convert old integer to new values (Freeciv 2.2.x to Freeciv 2.3.x).
Very ugly hack. TODO: Remove this later.
Definition at line 4137 of file options.cpp.
Referenced by desired_settable_option_send().
|
static |
Load the server options.
Definition at line 3966 of file options.cpp.
|
static |
Save the desired server options.
Definition at line 4029 of file options.cpp.
Referenced by options_save().
|
static |
Callback for changing music volume.
Definition at line 4761 of file options.cpp.
Referenced by init_client_options().
| const char* tileset_name_for_topology | ( | int | topology_id | ) |
Option framework wrapper for mapimg_get_format_list()
What is the user defined tileset for the given topology
Definition at line 4864 of file options.cpp.
Referenced by handle_set_topology().
|
static |
Load tileset options.
Every tileset has its own section called tileset_xxx. The options are saved as name=value pairs.
Definition at line 3909 of file options.cpp.
|
static |
Migrate players using cimpletoon/toonhex to amplio2/hexemplio with the cimpletoon option enabled.
Definition at line 3885 of file options.cpp.
|
static |
Save tileset options.
Definition at line 3952 of file options.cpp.
Referenced by options_save().
|
static |
Callback for when any view option is changed.
Definition at line 4735 of file options.cpp.
Referenced by init_client_options().
|
static |
Callback for when any voteinfo bar option is changed.
Definition at line 4770 of file options.cpp.
Referenced by init_client_options().
|
static |
Definition at line 891 of file options.cpp.
|
static |
Definition at line 940 of file options.cpp.
|
static |
Definition at line 878 of file options.cpp.
|
static |
Definition at line 928 of file options.cpp.
|
static |
Definition at line 902 of file options.cpp.
|
static |
Definition at line 915 of file options.cpp.
|
static |
Definition at line 1289 of file options.cpp.
| const struct option_set* client_optset = &client_optset_static |
Definition at line 860 of file options.cpp.
Referenced by configure_font(), fcFont::initFonts(), is_ts_option_unset(), popup_client_options(), fcFont::setSizeAll(), mr_menu::slot_set_citybar(), and mr_menu::tileset_custom_load().
|
static |
Definition at line 853 of file options.cpp.
| client_options* gui_options = nullptr |
Definition at line 74 of file options.cpp.
Referenced by animate_unit_explosion(), append_city_buycost_string(), audio_play_sound(), audio_select_plugin(), auto_center_on_focus_unit(), calculate_overview_dimensions(), map_view::center_on_tile(), chat_widget::chat_widget(), city_widget::city_view(), client_exit(), client_main(), client_state(), connect_to_server(), control_mouse_cursor(), cr_entry_building(), citybar_painter::current(), current_focus_append(), fc_client::current_page(), decrease_unit_hp_smooth(), disconnect_from_server(), freeciv::layer::do_draw_unit(), do_map_click(), do_move_unit(), draw_calculated_trade_routes(), draw_reqtree(), draw_trade_routes(), minimap_view::draw_viewport(), enter_goto_state(), fc_client::fc_client(), freeciv::layer_water::fill_irrigation_sprite_array(), freeciv::layer_background::fill_sprite_array(), freeciv::layer_city::fill_sprite_array(), freeciv::layer_city_size::fill_sprite_array(), freeciv::layer_fog::fill_sprite_array(), freeciv::layer_grid::fill_sprite_array(), freeciv::layer_overlays::fill_sprite_array(), freeciv::layer_units::fill_sprite_array(), find_visible_unit(), game_music_enable_callback(), get_city_dialog_production(), get_turn_done_button_state(), get_unit_nation_flag_sprite(), get_useable_themes_in_directory(), fcFont::getFont(), gui_to_overview_pos(), gui_update_allfonts(), handle_city_info(), handle_city_name_suggestion_info(), handle_city_short_info(), handle_event(), handle_new_year(), handle_player_info(), handle_ruleset_control(), handle_start_phase(), handle_traderoute_info(), handle_unit_actions(), handle_unit_bombard_info(), handle_unit_combat_info(), handle_unit_packet_common(), minimap_view::heightForWidth(), is_extra_drawing_enabled(), manual_turn_done_callback(), mapimg_client_define(), menu_music_enable_callback(), meswin_clear_older(), meswin_popup_city(), minimap_view::mousePressEvent(), move_unit_map_canvas(), music_finished_callback(), node_rectangle_minimum_size(), options_free(), options_init(), options_save(), overview_free(), overview_tile_color(), overview_to_map_pos(), overview_update_tile(), page_load::page_load(), simple_citybar_painter::paint(), traditional_citybar_painter::paint(), polished_citybar_painter::paint(), minimap_view::paint(), put_one_element(), put_overview_tile_area(), real_timer_callback(), redraw_overview(), request_move_unit_direction(), request_toggle_city_buycost(), request_toggle_city_growth(), request_toggle_city_names(), request_toggle_city_outlines(), request_toggle_city_output(), request_toggle_city_productions(), request_toggle_city_trade_routes(), request_toggle_map_borders(), request_toggle_map_grid(), request_toggle_map_native(), request_units_return(), chat_listener::send_chat_message(), map_view::set_scale(), mr_menu::setup_menus(), minimap_panel::setup_minimap_menu(), map_view::shortcut_pressed(), should_ask_server_for_actions(), minimap_view::sizeHint(), mr_menu::slot_fullscreen(), mr_menu::slot_set_citybar(), freeciv::layer::solid_background(), sound_volume_callback(), start_menu_music(), start_style_music(), page_load::state_preview(), tileset_name_for_topology(), tileset_set_option(), tileset_setup_options(), ui_main(), unit_drawn_with_city_outline(), unit_focus_advance(), freeciv::map_updates_handler::update(), page_load::update_load_page(), voteinfo_queue_add(), and mr_menu::zoom_scale_fonts().
| int messages_where[E_COUNT] |
Message Options:
Definition at line 3383 of file options.cpp.
Referenced by message_dlg::apply_changes(), message_dlg::fill_data(), and handle_event().
|
static |
Definition at line 78 of file options.cpp.
Referenced by option_changed().
|
static |
Definition at line 2503 of file options.cpp.
Referenced by handle_server_setting_bitwise().
|
static |
Definition at line 2454 of file options.cpp.
Referenced by handle_server_setting_bool().
|
static |
Definition at line 2441 of file options.cpp.
Referenced by handle_server_setting_bitwise(), handle_server_setting_bool(), handle_server_setting_enum(), handle_server_setting_int(), and handle_server_setting_str().
|
static |
Definition at line 2490 of file options.cpp.
Referenced by handle_server_setting_enum().
|
static |
Definition at line 2465 of file options.cpp.
Referenced by handle_server_setting_int().
|
static |
Definition at line 2478 of file options.cpp.
Referenced by handle_server_setting_str().
|
static |
Definition at line 2412 of file options.cpp.
Referenced by handle_server_setting_control(), server_option_number(), server_options_free(), server_options_init(), server_optset_option_by_number(), and server_optset_option_first().
|
static |
Server options variables.
Definition at line 2411 of file options.cpp.
Referenced by handle_server_setting_control(), server_options_free(), server_options_init(), and server_optset_category_name().
|
static |
Definition at line 2414 of file options.cpp.
Referenced by handle_server_setting_control(), server_options_free(), server_options_init(), server_optset_category_name(), and server_optset_category_number().
|
static |
Definition at line 2415 of file options.cpp.
Referenced by handle_server_setting_control(), server_options_free(), server_options_init(), and server_optset_option_by_number().
| const struct option_set* server_optset = &server_optset_static |
Definition at line 2430 of file options.cpp.
Referenced by blink_turn_done_button(), can_end_turn(), client_current_nation_set(), client_ss_by_name(), client_ss_name_get(), client_ss_val_bitwise_get(), client_ss_val_bool_get(), client_ss_val_int_get(), handle_server_setting_bitwise(), handle_server_setting_bool(), handle_server_setting_enum(), handle_server_setting_int(), handle_server_setting_str(), pregame_options::max_players_change(), races_dialog::nationset_changed(), option_gui_update(), plrdlg_col_state(), mr_menu::server_options(), server_options_free(), and races_dialog::update_nationset_combo().
|
static |
Definition at line 2423 of file options.cpp.
| const char* const TILESET_OPTIONS_PREFIX = "tileset_" |
Definition at line 69 of file options.cpp.