![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <optiondlg.h>
Inheritance diagram for option_dialog:
Collaboration diagram for option_dialog:Public Member Functions | |
| option_dialog (const QString &name, const option_set *options, QWidget *parent=0) | |
| Constructor for options dialog. More... | |
| ~option_dialog () override | |
| Destructor for options dialog. More... | |
| void | fill (const struct option_set *poptset) |
| Create all widgets. More... | |
| void | add_option (struct option *poption) |
| Create widget for option. More... | |
| void | option_dialog_refresh (struct option *poption) |
| Refresh one given option for option dialog. More... | |
| void | option_dialog_reset (struct option *poption) |
| Reset one option. More... | |
| void | full_refresh () |
| Refresh all options. More... | |
| void | apply_options () |
| Apply all options. More... | |
Public Member Functions inherited from qfc_dialog | |
| qfc_dialog (QWidget *parent) | |
| Constructor for custom dialog with themed titlebar. More... | |
| ~qfc_dialog () override | |
Private Slots | |
| void | apply_option (int response) |
| Apply desired action depending on user's request (clicked button). More... | |
| void | set_color () |
| Set color of buttons (user just changed colors). More... | |
| void | set_font () |
| Sets font and text in pushbutton (user just chosen font) More... | |
Private Member Functions | |
| void | set_bool (struct option *poption, bool value) |
| Set the boolean value of the option. More... | |
| void | set_int (struct option *poption, int value) |
| Set the integer value of the option. More... | |
| void | set_string (struct option *poption, const char *string) |
| Set the string value of the option. More... | |
| void | set_enum (struct option *poption, int index) |
| Set desired index(text) in combobox. More... | |
| void | set_bitwise (struct option *poption, unsigned value) |
| Set the enum value of the option. More... | |
| void | set_color (struct option *poption, struct ft_color color) |
| Set color of the buttons depending on given colors. More... | |
| void | set_font (struct option *poption, const QFont &font) |
| 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. More... | |
| void | get_color (struct option *poption, QByteArray &a1, QByteArray &a2) |
| Return selected colors (for highlighting chat). More... | |
| bool | get_bool (struct option *poption) |
| Get the boolean value from checkbox. More... | |
| int | get_int (struct option *poption) |
| Get int value from spinbox. More... | |
| QFont | get_font (struct option *poption) |
| QFont | get_button_font (struct option *poption) |
| Get font from pushbutton. More... | |
| QByteArray | get_string (struct option *poption) |
| Get string for desired option from combobox or lineedit. More... | |
| int | get_enum (struct option *poption) |
| Get indexed value from combobox. More... | |
| struct option * | get_color_option () |
| Find option indicating colors. More... | |
| unsigned | get_bitwise (struct option *poption) |
| Return the enum value from groupbox. More... | |
| void | full_reset () |
| Reset all options. More... | |
Private Attributes | |
| QVBoxLayout * | main_layout |
| QTabWidget * | tab_widget |
| QDialogButtonBox * | button_box |
| QList< QString > | categories |
| QMap< QString, QWidget * > | widget_map |
| const option_set * | curr_options |
Additional Inherited Members | |
Protected Member Functions inherited from qfc_dialog | |
| void | paintEvent (QPaintEvent *event) override |
| Paint event for themed dialog. More... | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| Mouse move event for themed titlebar (moves dialog with left mouse) More... | |
| void | mousePressEvent (QMouseEvent *event) override |
| Mouse press event - catches left click. More... | |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| Mouse release event for themed dialog. More... | |
Definition at line 27 of file optiondlg.h.
| option_dialog::option_dialog | ( | const QString & | name, |
| const option_set * | options, | ||
| QWidget * | parent = 0 |
||
| ) |
Constructor for options dialog.
Definition at line 109 of file optiondlg.cpp.
|
override |
Destructor for options dialog.
Definition at line 173 of file optiondlg.cpp.
| void option_dialog::add_option | ( | struct option * | poption | ) |
|
privateslot |
Apply desired action depending on user's request (clicked button).
Definition at line 184 of file optiondlg.cpp.
Referenced by option_dialog().
| void option_dialog::apply_options | ( | ) |
| void option_dialog::fill | ( | const struct option_set * | poptset | ) |
| void option_dialog::full_refresh | ( | ) |
|
private |
|
private |
Return the enum value from groupbox.
Definition at line 417 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Get the boolean value from checkbox.
Definition at line 289 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Get font from pushbutton.
Definition at line 757 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Return selected colors (for highlighting chat).
Definition at line 215 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Find option indicating colors.
Definition at line 438 of file optiondlg.cpp.
Referenced by set_color().
|
private |
Get indexed value from combobox.
Definition at line 385 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
|
private |
Get int value from spinbox.
Definition at line 325 of file optiondlg.cpp.
Referenced by apply_options().
|
private |
Get string for desired option from combobox or lineedit.
Definition at line 357 of file optiondlg.cpp.
Referenced by apply_options().
| void option_dialog::option_dialog_refresh | ( | struct option * | poption | ) |
Refresh one given option for option dialog.
Definition at line 479 of file optiondlg.cpp.
Referenced by add_option(), full_refresh(), and option_gui_update().
| void option_dialog::option_dialog_reset | ( | struct option * | poption | ) |
|
private |
Set the enum value of the option.
Definition at line 396 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
|
private |
Set the boolean value of the option.
Definition at line 274 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
|
privateslot |
Set color of buttons (user just changed colors).
Definition at line 766 of file optiondlg.cpp.
Referenced by add_option(), option_dialog_refresh(), and option_dialog_reset().
Set color of the buttons depending on given colors.
Definition at line 453 of file optiondlg.cpp.
|
private |
Set desired index(text) in combobox.
Definition at line 374 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
|
privateslot |
Sets font and text in pushbutton (user just chosen font)
Definition at line 739 of file optiondlg.cpp.
Referenced by add_option(), option_dialog_refresh(), and option_dialog_reset().
|
private |
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 313 of file optiondlg.cpp.
|
private |
Set the integer value of the option.
Definition at line 300 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
|
private |
Set the string value of the option.
Definition at line 336 of file optiondlg.cpp.
Referenced by option_dialog_refresh(), and option_dialog_reset().
|
private |
Definition at line 31 of file optiondlg.h.
Referenced by option_dialog().
|
private |
Definition at line 32 of file optiondlg.h.
Referenced by add_option(), and option_dialog().
|
private |
Definition at line 47 of file optiondlg.h.
Referenced by apply_option(), apply_options(), full_refresh(), full_reset(), get_color_option(), option_dialog(), and ~option_dialog().
|
private |
Definition at line 29 of file optiondlg.h.
Referenced by option_dialog().
|
private |
Definition at line 30 of file optiondlg.h.
Referenced by add_option(), and option_dialog().
|
private |
Definition at line 33 of file optiondlg.h.
Referenced by add_option().