Freeciv21
Develop your civilization from humble roots to a global empire
themes.cpp File Reference
#include <QApplication>
#include <QDir>
#include <QMetaEnum>
#include <QPalette>
#include <QSettings>
#include <QStyle>
#include <QStyleFactory>
#include <QTextStream>
#include "shared.h"
#include "chatline.h"
#include "colors_common.h"
#include "fc_client.h"
#include "page_game.h"
#include "qtg_cxxside.h"
#include "themes_common.h"
#include <array>
+ Include dependency graph for themes.cpp:

Go to the source code of this file.

Functions

void gui_load_theme (const QString &directory, const QString &theme_name)
 Loads a qt theme directory/theme_name. More...
 
void gui_clear_theme ()
 Clears a theme (sets default system theme) More...
 
QStringList get_gui_specific_themes_directories (int *count)
 Each gui has its own themes directories. More...
 
QStringList get_useable_themes_in_directory (QString &directory)
 Return an array of names of usable themes in the given directory. More...
 
QColor get_diag_color (color_std c)
 Gets a diagram color. More...
 

Variables

QString current_theme
 

Function Documentation

◆ get_diag_color()

QColor get_diag_color ( color_std  c)

Gets a diagram color.

They come from the tileset, but the theme can override them.

Definition at line 255 of file themes.cpp.

Referenced by draw_reqtree(), edge_color(), and get_edge_type().

◆ get_gui_specific_themes_directories()

QStringList get_gui_specific_themes_directories ( int *  count)

Each gui has its own themes directories.

Returns an array containing these strings and sets array size in count. The caller is responsible for freeing the array and the paths.

Definition at line 197 of file themes.cpp.

Referenced by init_themes().

◆ get_useable_themes_in_directory()

QStringList get_useable_themes_in_directory ( QString &  directory)

Return an array of names of usable themes in the given directory.

Array size is stored in count. The caller is responsible for freeing the array and the names

Definition at line 215 of file themes.cpp.

Referenced by init_themes().

◆ gui_clear_theme()

void gui_clear_theme ( )

Clears a theme (sets default system theme)

Definition at line 180 of file themes.cpp.

Referenced by gui_load_theme(), and ui_main().

◆ gui_load_theme()

void gui_load_theme ( const QString &  directory,
const QString &  theme_name 
)

Loads a qt theme directory/theme_name.

Definition at line 120 of file themes.cpp.

Referenced by load_theme().

Variable Documentation

◆ current_theme

QString current_theme
extern

Definition at line 24 of file icons.cpp.

Referenced by fcIcons::getIcon(), fcIcons::getPixmap(), and gui_load_theme().