Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-qt/fonts.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
fonts.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifndef FC__FONTS_H
15#define FC__FONTS_H
16
17// Qt
18#include <QMap>
19
20// gui-qt
21#include "listener.h"
22
23class QFont;
24
25 namespace fonts
26{
27 const char * const default_font = "gui_qt_font_default";
28 const char * const notify_label = "gui_qt_font_notify_label";
29 const char * const help_label = "gui_qt_font_help_label";
30 const char * const help_text = "gui_qt_font_help_text";
31 const char * const chatline = "gui_qt_font_chatline";
32 const char * const city_names = "gui_qt_font_city_names";
33 const char * const city_productions = "gui_qt_font_city_productions";
34 const char * const reqtree_text = "gui_qt_font_reqtree_text";
35}
36
37
38 class fc_font
39{
40 Q_DISABLE_COPY(fc_font);
41private:
42 QMap <QString, QFont *> font_map;
43 static fc_font *m_instance;
44 explicit fc_font();
45public:
46 static fc_font *instance();
47 static void drop();
48 void set_font(QString name, QFont *qf);
49 QFont *get_font(QString name);
50 void init_fonts();
51 void release_fonts();
52 void get_mapfont_size();
53 int city_fontsize;
54 int prod_fontsize;
55};
56
57void configure_fonts();
58QString configure_font(QString font_name, QStringList sl, int size,
59 bool bold = false);
60
61#endif // FC__FONTS_H
bold
static QString bold(QString text)
Definition citydlg.cpp:3866
fc_font
Definition fonts.h:39
fc_font::city_fontsize
int city_fontsize
Definition fonts.h:53
fc_font::fc_font
fc_font()
Definition fonts.cpp:34
fc_font::m_instance
static fc_font * m_instance
Definition fonts.h:43
fc_font::Q_DISABLE_COPY
Q_DISABLE_COPY(fc_font)
fc_font::init_fonts
void init_fonts()
Definition fonts.cpp:79
fc_font::instance
static fc_font * instance()
Definition fonts.cpp:41
fc_font::set_font
void set_font(QString name, QFont *qf)
Definition fonts.cpp:125
fc_font::get_font
QFont * get_font(QString name)
Definition fonts.cpp:63
fc_font::drop
static void drop()
Definition fonts.cpp:51
fc_font::release_fonts
void release_fonts()
Definition fonts.cpp:106
fc_font::get_mapfont_size
void get_mapfont_size()
Definition fonts.cpp:116
fc_font::font_map
QMap< QString, QFont * > font_map
Definition fonts.h:42
fc_font::prod_fontsize
int prod_fontsize
Definition fonts.h:54
configure_font
QString configure_font(QString font_name, QStringList sl, int size, bool bold=false)
Definition fonts.cpp:220
configure_fonts
void configure_fonts()
Definition fonts.cpp:156
font_name
const char * font_name
Definition gui_main_g.h:43
name
const char * name
Definition inputfile.c:127
listener.h
fonts
Definition fonts.h:26
fonts::city_productions
const char *const city_productions
Definition fonts.h:33
fonts::chatline
const char *const chatline
Definition fonts.h:31
fonts::default_font
const char *const default_font
Definition fonts.h:27
fonts::notify_label
const char *const notify_label
Definition fonts.h:28
fonts::help_label
const char *const help_label
Definition fonts.h:29
fonts::city_names
const char *const city_names
Definition fonts.h:32
fonts::help_text
const char *const help_text
Definition fonts.h:30
fonts::reqtree_text
const char *const reqtree_text
Definition fonts.h:34
size
size_t size
Definition specvec.h:72