Freeciv21
Develop your civilization from humble roots to a global empire
view_nations_data.cpp File Reference
#include "fcintl.h"
#include "support.h"
#include "game.h"
#include "government.h"
#include "nation.h"
#include "research.h"
#include "client_main.h"
#include "climisc.h"
#include "options.h"
#include "text.h"
#include "views/view_nations_data.h"
+ Include dependency graph for view_nations_data.cpp:

Go to the source code of this file.

Functions

static QString col_name (const struct player *player)
 The player-name (aka nation leader) column of the plrdlg. More...
 
static int cmp_name (const struct player *pplayer1, const struct player *pplayer2)
 Compares the names of two players in players dialog. More...
 
static QString col_username (const struct player *player)
 The username (connection name) column of the plrdlg. More...
 
static QString col_nation (const struct player *player)
 The name of the player's nation for the plrdlg. More...
 
static QString col_team (const struct player *player)
 The name of the player's team (or empty) for the plrdlg. More...
 
static bool col_ai (const struct player *plr)
 TRUE if the player is AI-controlled. More...
 
static QString col_embassy (const struct player *player)
 Returns a translated string giving the embassy status (none/with us/with them/both). More...
 
static QString col_diplstate (const struct player *player)
 Returns a translated string giving the diplomatic status ("war" or "ceasefire (5)"). More...
 
static int diplstate_value (const struct player *plr)
 Return a numerical value suitable for ordering players by their diplomatic status in the players dialog. More...
 
static int cmp_diplstate (const struct player *player1, const struct player *player2)
 Compares diplomatic status of two players in players dialog. More...
 
static QString col_love (const struct player *player)
 Return a string displaying the AI's love (or not) for you... More...
 
static int cmp_love (const struct player *player1, const struct player *player2)
 Compares ai's attitude toward the player. More...
 
static QString col_vision (const struct player *player)
 Returns a translated string giving our shared-vision status. More...
 
QString plrdlg_col_state (const struct player *plr)
 Returns a translated string giving the player's "state". More...
 
static QString col_idle (const struct player *plr)
 Returns a string telling how many turns the player has been idle. More...
 
static int cmp_score (const struct player *player1, const struct player *player2)
 Compare scores of two players in players dialog. More...
 
QString col_government (const struct player *them)
 The name of the player's government. More...
 
static int cmp_culture (const struct player *player1, const struct player *player2)
 Compare culture of two players in players dialog, needed to sort column. More...
 
QString get_culture_info (const struct player *them)
 Show others player's culture to me if I am allowed to know it. More...
 
QString col_culture (const struct player *pplayer)
 Player's culture value. More...
 
static int cmp_gold (const struct player *player1, const struct player *player2)
 Compare gold of two players in players dialog, needed to sort column. More...
 
QString col_gold (const struct player *them)
 Show player's gold to me if I am allowed to know it. More...
 
static int cmp_tax (const struct player *player1, const struct player *player2)
 Compare tax of two players in players dialog, needed to sort column. More...
 
QString col_tax (const struct player *them)
 Show player's tax to me if I am allowed to know it. More...
 
static int cmp_science (const struct player *player1, const struct player *player2)
 Compare science of two players in players dialog, needed to sort column. More...
 
QString col_science (const struct player *them)
 Show player's science to me if I am allowed to know it. More...
 
static int cmp_luxury (const struct player *player1, const struct player *player2)
 Compare luxury of two players in players dialog, needed to sort column. More...
 
QString col_luxury (const struct player *them)
 Show player's luxury to me if I am allowed to know it. More...
 
QString col_research (const struct player *them)
 Show player's research to me if I am allowed to know it. More...
 
void init_player_dlg_common ()
 Translate all titles. More...
 

Variables

struct player_dlg_column player_dlg_columns []
 ... More...
 
const int num_player_dlg_columns = ARRAY_SIZE(player_dlg_columns)
 

Function Documentation

◆ cmp_culture()

static int cmp_culture ( const struct player player1,
const struct player player2 
)
static

Compare culture of two players in players dialog, needed to sort column.

Definition at line 311 of file view_nations_data.cpp.

◆ cmp_diplstate()

static int cmp_diplstate ( const struct player player1,
const struct player player2 
)
static

Compares diplomatic status of two players in players dialog.

Definition at line 165 of file view_nations_data.cpp.

◆ cmp_gold()

static int cmp_gold ( const struct player player1,
const struct player player2 
)
static

Compare gold of two players in players dialog, needed to sort column.

Definition at line 343 of file view_nations_data.cpp.

◆ cmp_love()

static int cmp_love ( const struct player player1,
const struct player player2 
)
static

Compares ai's attitude toward the player.

Definition at line 188 of file view_nations_data.cpp.

◆ cmp_luxury()

static int cmp_luxury ( const struct player player1,
const struct player player2 
)
static

Compare luxury of two players in players dialog, needed to sort column.

Definition at line 415 of file view_nations_data.cpp.

◆ cmp_name()

static int cmp_name ( const struct player pplayer1,
const struct player pplayer2 
)
static

Compares the names of two players in players dialog.

Definition at line 49 of file view_nations_data.cpp.

◆ cmp_science()

static int cmp_science ( const struct player player1,
const struct player player2 
)
static

Compare science of two players in players dialog, needed to sort column.

Definition at line 391 of file view_nations_data.cpp.

◆ cmp_score()

static int cmp_score ( const struct player player1,
const struct player player2 
)
static

Compare scores of two players in players dialog.

Definition at line 287 of file view_nations_data.cpp.

◆ cmp_tax()

static int cmp_tax ( const struct player player1,
const struct player player2 
)
static

Compare tax of two players in players dialog, needed to sort column.

Definition at line 367 of file view_nations_data.cpp.

◆ col_ai()

static bool col_ai ( const struct player plr)
static

TRUE if the player is AI-controlled.

Definition at line 82 of file view_nations_data.cpp.

◆ col_culture()

QString col_culture ( const struct player pplayer)

Player's culture value.

Definition at line 334 of file view_nations_data.cpp.

◆ col_diplstate()

static QString col_diplstate ( const struct player player)
static

Returns a translated string giving the diplomatic status ("war" or "ceasefire (5)").

Definition at line 103 of file view_nations_data.cpp.

◆ col_embassy()

static QString col_embassy ( const struct player player)
static

Returns a translated string giving the embassy status (none/with us/with them/both).

Definition at line 94 of file view_nations_data.cpp.

◆ col_gold()

QString col_gold ( const struct player them)

Show player's gold to me if I am allowed to know it.

Definition at line 352 of file view_nations_data.cpp.

◆ col_government()

QString col_government ( const struct player them)

The name of the player's government.

Definition at line 296 of file view_nations_data.cpp.

◆ col_idle()

static QString col_idle ( const struct player plr)
static

Returns a string telling how many turns the player has been idle.

Definition at line 270 of file view_nations_data.cpp.

◆ col_love()

static QString col_love ( const struct player player)
static

Return a string displaying the AI's love (or not) for you...

Definition at line 174 of file view_nations_data.cpp.

◆ col_luxury()

QString col_luxury ( const struct player them)

Show player's luxury to me if I am allowed to know it.

Definition at line 424 of file view_nations_data.cpp.

◆ col_name()

static QString col_name ( const struct player player)
static

The player-name (aka nation leader) column of the plrdlg.

Definition at line 41 of file view_nations_data.cpp.

◆ col_nation()

static QString col_nation ( const struct player player)
static

The name of the player's nation for the plrdlg.

Definition at line 66 of file view_nations_data.cpp.

◆ col_research()

QString col_research ( const struct player them)

Show player's research to me if I am allowed to know it.

Definition at line 438 of file view_nations_data.cpp.

◆ col_science()

QString col_science ( const struct player them)

Show player's science to me if I am allowed to know it.

Definition at line 400 of file view_nations_data.cpp.

◆ col_tax()

QString col_tax ( const struct player them)

Show player's tax to me if I am allowed to know it.

Definition at line 376 of file view_nations_data.cpp.

◆ col_team()

static QString col_team ( const struct player player)
static

The name of the player's team (or empty) for the plrdlg.

Definition at line 74 of file view_nations_data.cpp.

◆ col_username()

static QString col_username ( const struct player player)
static

The username (connection name) column of the plrdlg.

Definition at line 58 of file view_nations_data.cpp.

◆ col_vision()

static QString col_vision ( const struct player player)
static

Returns a translated string giving our shared-vision status.

Definition at line 215 of file view_nations_data.cpp.

◆ diplstate_value()

static int diplstate_value ( const struct player plr)
static

Return a numerical value suitable for ordering players by their diplomatic status in the players dialog.

A lower value stands for more friendly diplomatic status.

Definition at line 129 of file view_nations_data.cpp.

Referenced by cmp_diplstate().

◆ get_culture_info()

QString get_culture_info ( const struct player them)

Show others player's culture to me if I am allowed to know it.

Definition at line 320 of file view_nations_data.cpp.

Referenced by col_culture().

◆ init_player_dlg_common()

void init_player_dlg_common ( )

Translate all titles.

Definition at line 507 of file view_nations_data.cpp.

Referenced by client_main().

◆ plrdlg_col_state()

QString plrdlg_col_state ( const struct player plr)

Returns a translated string giving the player's "state".

FIXME: These terms aren't very intuitive for new players.

Definition at line 225 of file view_nations_data.cpp.

Variable Documentation

◆ num_player_dlg_columns

◆ player_dlg_columns