![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <fonts.h>
Collaboration diagram for fcFont:Public Member Functions | |
| void | setFont (const QString &name, const QFont &qf) |
| Adds new font or overwrite old one. More... | |
| void | setSizeAll (int) |
| Increases/decreases all fonts sizes. More... | |
| QFont | getFont (const QString &name, double zoom=1.0) const |
| Returns desired font. More... | |
| void | initFonts () |
| Initiazlizes fonts from client options. More... | |
| void | releaseFonts () |
| Deletes all fonts. More... | |
Static Public Member Functions | |
| static fcFont * | instance () |
| Returns instance of fc_font. More... | |
| static void | drop () |
| Deletes fc_icons instance. More... | |
Private Member Functions | |
| Q_DISABLE_COPY (fcFont) | |
| fcFont () | |
| Font provider constructor. More... | |
Private Attributes | |
| QMap< QString, QFont > | font_map |
Static Private Attributes | |
| static fcFont * | m_instance = 0 |
|
explicitprivate |
| QFont fcFont::getFont | ( | const QString & | name, |
| double | zoom = 1.0 |
||
| ) | const |
Returns desired font.
example: get_font("gui_qt_font_notify_label")
Definition at line 57 of file fonts.cpp.
Referenced by city_dialog::city_dialog(), city_font_update(), city_info::city_info(), cityIconInfoLabel::cityIconInfoLabel(), plr_item::data(), fc_corner::fc_corner(), get_font(), gui_update_font(), hud_input_box::hud_input_box(), hud_message_box::hud_message_box(), hud_text::hud_text(), make_helplabel(), make_helppiclabel(), hud_unit_combat::paintEvent(), city_production_model::populate(), turn_done_button::turn_done_button(), units_select::units_select(), hud_units::update_actions(), and help_widget::update_fonts().
| void fcFont::initFonts | ( | ) |
Initiazlizes fonts from client options.
default font names are: gui_qt_font_notify_label and so on. (full list is in options.c in client dir)
Definition at line 77 of file fonts.cpp.
Referenced by fc_client::fc_client().
|
static |
Returns instance of fc_font.
Definition at line 34 of file fonts.cpp.
Referenced by apply_help_font(), chat_widget::chat_widget(), city_dialog::city_dialog(), city_font_update(), city_info::city_info(), cityIconInfoLabel::cityIconInfoLabel(), configure_font(), plr_item::data(), freeciv::report_widget::event(), fc_client::fc_client(), fc_corner::fc_corner(), get_font(), gui_qt_apply_font(), gui_update_allfonts(), gui_update_font(), hud_input_box::hud_input_box(), hud_message_box::hud_message_box(), hud_text::hud_text(), info_tile::info_tile(), make_helplabel(), make_helppiclabel(), hud_unit_combat::paintEvent(), turn_done_button::paintEvent(), city_production_model::populate(), freeciv::report_widget::report_widget(), turn_done_button::sizeHint(), turn_done_button::turn_done_button(), units_select::units_select(), hud_units::update_actions(), chat_widget::update_font(), and help_widget::update_fonts().
|
private |
| void fcFont::releaseFonts | ( | ) |
| void fcFont::setFont | ( | const QString & | name, |
| const QFont & | qf | ||
| ) |
Adds new font or overwrite old one.
Definition at line 122 of file fonts.cpp.
Referenced by apply_help_font(), configure_font(), gui_qt_apply_font(), gui_update_font(), and initFonts().
| void fcFont::setSizeAll | ( | int | new_size | ) |
Increases/decreases all fonts sizes.
Definition at line 99 of file fonts.cpp.
Referenced by gui_update_allfonts().
|
private |
Definition at line 32 of file fonts.h.
Referenced by getFont(), releaseFonts(), and setFont().
|
staticprivate |
Definition at line 33 of file fonts.h.
Referenced by drop(), and instance().