Freeciv-3.2
|
#include <optiondlg.h>
Public Member Functions | |
option_dialog (const QString &name, const option_set *options, bool client_set, QWidget *parent=nullptr) | |
~option_dialog () | |
void | fill (const struct option_set *poptset) |
void | add_option (struct option *poption) |
void | option_dialog_refresh (struct option *poption) |
void | option_dialog_reset (struct option *poption) |
void | full_refresh () |
void | apply_options () |
Public Member Functions inherited from qfc_dialog | |
qfc_dialog (QWidget *parent) | |
void | reactivate () |
Protected Member Functions | |
void | showEvent (QShowEvent *event) |
void | hideEvent (QHideEvent *event) |
void | closeEvent (QCloseEvent *event) |
Protected Member Functions inherited from qfc_dialog | |
void | paintEvent (QPaintEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
Private Slots | |
void | apply_option (int response) |
void | select_color () |
void | select_font () |
Private Member Functions | |
void | set_bool (struct option *poption, bool value) |
void | set_int (struct option *poption, int value) |
void | set_string (struct option *poption, const char *string) |
void | set_enum (struct option *poption, int index) |
void | set_bitwise (struct option *poption, unsigned value) |
void | set_color (struct option *poption, struct ft_color color) |
void | set_button_color (QPushButton *button, const char *colorname) |
void | set_font (struct option *poption, QString s) |
void | get_color (struct option *poption, QByteArray &a1, QByteArray &a2) |
bool | get_bool (struct option *poption) |
int | get_int (struct option *poption) |
QFont | get_font (struct option *poption) |
QByteArray | get_button_font (struct option *poption) |
QByteArray | get_string (struct option *poption) |
int | get_enum (struct option *poption) |
unsigned | get_bitwise (struct option *poption) |
void | full_reset () |
Private Attributes | |
QVBoxLayout * | main_layout |
QTabWidget * | tab_widget |
QDialogButtonBox * | button_box |
QList< QString > | categories |
QMap< QString, QWidget * > | widget_map |
bool | client_settings |
const option_set * | curr_options |
Definition at line 41 of file optiondlg.c.
option_dialog::option_dialog | ( | const QString & | name, |
const option_set * | options, | ||
bool | client_set, | ||
QWidget * | parent = nullptr |
||
) |
Constructor for options dialog.
Definition at line 127 of file optiondlg.cpp.
option_dialog::~option_dialog | ( | ) |
Destructor for options dialog.
Definition at line 193 of file optiondlg.cpp.
Apply desired action depending on user's request (clicked button).
Definition at line 204 of file optiondlg.cpp.
Referenced by option_dialog().
void option_dialog::apply_options | ( | ) |
|
protected |
Close event for options dialog
Definition at line 894 of file optiondlg.cpp.
void option_dialog::fill | ( | const struct option_set * | poptset | ) |
void option_dialog::full_refresh | ( | ) |
|
private |
Return the enum value from groupbox.
Definition at line 453 of file optiondlg.cpp.
Referenced by apply_options().
Get the boolean value from checkbox.
Definition at line 313 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Get font from pushbutton.
Definition at line 829 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Get indexed value from combobox.
Definition at line 421 of file optiondlg.cpp.
Referenced by apply_options().
Get int value from spinbox.
Definition at line 361 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Get string for desired option from combobox or lineedit.
Definition at line 393 of file optiondlg.cpp.
Referenced by apply_options().
|
protected |
Hide event for options dialog
Definition at line 882 of file optiondlg.cpp.
Refresh one given option for option dialog.
Definition at line 506 of file optiondlg.cpp.
Referenced by add_option(), full_refresh(), and option_gui_update().
|
privateslot |
Ask user for the color option value
Definition at line 842 of file optiondlg.cpp.
Referenced by add_option().
|
privateslot |
Ask user for the font option value
Definition at line 796 of file optiondlg.cpp.
Referenced by add_option().
Set the enum value of the option.
Definition at line 432 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
Set the boolean value of the option.
Definition at line 298 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
Update color button stylesheet to show new color
Definition at line 474 of file optiondlg.cpp.
Referenced by select_color(), and set_color().
Set color of the buttons depending on given colors.
Definition at line 490 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
Set desired index(text) in combobox.
Definition at line 410 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
Sets desired font name in button text and sets global font for that option That function is not executed when user changes font, but when applying or resetting options.
Definition at line 341 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
Set the integer value of the option.
Definition at line 328 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
Set the string value of the option.
Definition at line 372 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
|
protected |
Show event for options dialog
Definition at line 866 of file optiondlg.cpp.
union { ... } option_dialog |
union { ... } option_dialog |
struct advanced_dialog * option_dialog::advanced |
Definition at line 93 of file optiondlg.c.
Referenced by add_new_worklist_callback(), back_callback(), edit_worklist_callback(), option_dialog_destroy(), option_dialog_optset_category(), and option_dialog_worklist().
Definition at line 92 of file optiondlg.c.
Referenced by add_new_worklist_callback(), back_callback(), edit_worklist_callback(), main_optiondlg_callback(), option_dialog_destroy(), option_dialog_new(), option_dialog_optset(), option_dialog_optset_category(), option_dialog_worklist(), and update_worklist_report_dialog().
int * option_dialog::box_children |
Definition at line 46 of file optiondlg.c.
Referenced by option_dialog_destroy(), option_dialog_new(), option_dialog_option_add(), and option_dialog_option_remove().
|
private |
Definition at line 49 of file optiondlg.h.
Referenced by option_dialog().
Definition at line 50 of file optiondlg.h.
Referenced by add_option(), and option_dialog().
|
private |
Definition at line 65 of file optiondlg.h.
Referenced by closeEvent(), hideEvent(), and showEvent().
Definition at line 90 of file optiondlg.c.
Referenced by back_callback(), option_dialog_new(), option_dialog_optset(), option_dialog_optset_category(), and option_dialog_worklist().
|
private |
Definition at line 66 of file optiondlg.h.
Referenced by apply_option(), apply_options(), full_refresh(), full_reset(), option_dialog(), and ~option_dialog().
Definition at line 89 of file optiondlg.c.
Referenced by add_new_worklist_callback(), back_callback(), edit_worklist_callback(), main_optiondlg_callback(), option_dialog_destroy(), option_dialog_new(), option_dialog_optset(), option_dialog_optset_category(), option_dialog_worklist(), and update_worklist_report_dialog().
|
private |
Definition at line 47 of file optiondlg.h.
Referenced by option_dialog().
Definition at line 91 of file optiondlg.c.
Referenced by back_callback(), option_dialog_new(), option_dialog_optset(), option_dialog_optset_category(), and option_dialog_worklist().
enum option_dialog_mode option_dialog::mode |
Definition at line 94 of file optiondlg.c.
Referenced by apply_callback(), back_callback(), edit_worklist_callback(), option_dialog_destroy(), option_dialog_new(), option_dialog_optset(), option_dialog_optset_category(), option_dialog_popdown(), option_dialog_popup(), option_dialog_worklist(), option_gui_add(), option_gui_remove(), option_gui_update(), and update_worklist_report_dialog().
GtkWidget * option_dialog::notebook |
Definition at line 44 of file optiondlg.c.
Referenced by option_dialog_new(), option_dialog_option_add(), option_dialog_option_remove(), and option_dialog_reorder_notebook().
struct option_dialog_optset option_dialog::optset |
Definition at line 96 of file optiondlg.c.
Referenced by apply_callback(), back_callback(), option_dialog_destroy(), option_dialog_optset(), option_dialog_optset_category(), option_dialog_popdown(), option_dialog_popup(), option_gui_add(), option_gui_remove(), and option_gui_update().
const struct option_set * option_dialog::poptset |
Definition at line 42 of file optiondlg.c.
Referenced by fill(), option_dialog_destroy(), option_dialog_foreach(), option_dialog_get(), option_dialog_new(), option_dialog_popdown(), and option_dialog_popup().
GtkWidget * option_dialog::shell |
Definition at line 43 of file optiondlg.c.
Referenced by option_dialog_destroy(), option_dialog_destroy_callback(), and option_dialog_new().
|
private |
Definition at line 48 of file optiondlg.h.
Referenced by add_option(), and option_dialog().
GtkWidget ** option_dialog::vboxes |
Definition at line 45 of file optiondlg.c.
Referenced by option_dialog_destroy(), option_dialog_new(), option_dialog_option_add(), and option_dialog_option_remove().
Definition at line 51 of file optiondlg.h.
Referenced by add_option().
struct option_dialog_worklist option_dialog::worklist |
Definition at line 97 of file optiondlg.c.
Referenced by back_callback(), edit_worklist_callback(), option_dialog_worklist(), and update_worklist_report_dialog().