Freeciv-3.3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields | Private Member Functions | Private Attributes | Static Private Attributes
fc_font Class Reference

#include <fonts.h>

Public Member Functions

void set_font (QString name, QFont *qf)
 
QFontget_font (QString name)
 
void init_fonts ()
 
void release_fonts ()
 
void get_mapfont_size ()
 

Static Public Member Functions

static fc_fontinstance ()
 
static void drop ()
 

Data Fields

int city_fontsize
 
int prod_fontsize
 

Private Member Functions

 Q_DISABLE_COPY (fc_font)
 
 fc_font ()
 

Private Attributes

QMap< QString, QFont * > font_map
 

Static Private Attributes

static fc_fontm_instance = 0
 

Detailed Description

Definition at line 38 of file fonts.h.

Constructor & Destructor Documentation

◆ fc_font()

fc_font::fc_font ( )
explicitprivate

Font provider constructor

Definition at line 34 of file fonts.cpp.

Referenced by instance().

Member Function Documentation

◆ drop()

void fc_font::drop ( )
static

Deletes fc_font instance

Definition at line 51 of file fonts.cpp.

◆ get_font()

QFont * fc_font::get_font ( QString  name)

◆ get_mapfont_size()

void fc_font::get_mapfont_size ( )

Stores default font sizes

Definition at line 114 of file fonts.cpp.

Referenced by apply_font(), init_fonts(), and qtg_gui_update_font().

◆ init_fonts()

void fc_font::init_fonts ( )

Initializes 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::init().

◆ instance()

fc_font * fc_font::instance ( )
static

◆ Q_DISABLE_COPY()

fc_font::Q_DISABLE_COPY ( fc_font  )
private

◆ release_fonts()

void fc_font::release_fonts ( )

Deletes all fonts

Definition at line 104 of file fonts.cpp.

Referenced by drop().

◆ set_font()

void fc_font::set_font ( QString  name,
QFont qf 
)

Adds new font or overwrite old one

Definition at line 123 of file fonts.cpp.

Referenced by apply_font(), apply_help_font(), configure_font(), init_fonts(), and qtg_gui_update_font().

Field Documentation

◆ city_fontsize

int fc_font::city_fontsize

Definition at line 53 of file fonts.h.

Referenced by get_mapfont_size().

◆ font_map

QMap<QString, QFont *> fc_font::font_map
private

Definition at line 42 of file fonts.h.

Referenced by get_font(), release_fonts(), and set_font().

◆ m_instance

fc_font * fc_font::m_instance = 0
staticprivate

Definition at line 43 of file fonts.h.

Referenced by drop(), and instance().

◆ prod_fontsize

int fc_font::prod_fontsize

Definition at line 54 of file fonts.h.

Referenced by get_mapfont_size().