Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
citydlg.h File Reference
#include <QElapsedTimer>
#include <QItemDelegate>
#include <QLabel>
#include <QProgressBar>
#include <QScrollArea>
#include <QTableView>
#include <QtMath>
#include <QVariant>
#include "unittype.h"
#include "canvas.h"
#include "fonts.h"
#include "dialogs.h"
#include "specenum_gen.h"

Go to the source code of this file.

Data Structures

class  fc_tooltip
 
class  progress_bar
 
class  unit_item
 
class  unit_info
 
class  impr_item
 
class  impr_info
 
class  city_map
 
class  city_production_delegate
 
class  production_item
 
class  city_production_model
 
class  production_widget
 
class  city_label
 
struct  city_dialog
 

Macros

#define SPECENUM_NAME   city_info
 
#define SPECENUM_VALUE0   INFO_CITIZEN
 
#define SPECENUM_VALUE0NAME   N_("Size:")
 
#define SPECENUM_VALUE1   INFO_FOOD
 
#define SPECENUM_VALUE1NAME   N_("Food:")
 
#define SPECENUM_VALUE2   INFO_SHIELD
 
#define SPECENUM_VALUE2NAME   N_("Prod:")
 
#define SPECENUM_VALUE3   INFO_TRADE
 
#define SPECENUM_VALUE3NAME   N_("Trade:")
 
#define SPECENUM_VALUE4   INFO_GOLD
 
#define SPECENUM_VALUE4NAME   N_("Gold:")
 
#define SPECENUM_VALUE5   INFO_LUXURY
 
#define SPECENUM_VALUE5NAME   N_("Luxury:")
 
#define SPECENUM_VALUE6   INFO_SCIENCE
 
#define SPECENUM_VALUE6NAME   N_("Science:")
 
#define SPECENUM_VALUE7   INFO_GRANARY
 
#define SPECENUM_VALUE7NAME   N_("Granary:")
 
#define SPECENUM_VALUE8   INFO_GROWTH
 
#define SPECENUM_VALUE8NAME   N_("Change in:")
 
#define SPECENUM_VALUE9   INFO_CORRUPTION
 
#define SPECENUM_VALUE9NAME   N_("Corruption:")
 
#define SPECENUM_VALUE10   INFO_WASTE
 
#define SPECENUM_VALUE10NAME   N_("Waste:")
 
#define SPECENUM_VALUE11   INFO_CULTURE
 
#define SPECENUM_VALUE11NAME   N_("Culture:")
 
#define SPECENUM_VALUE12   INFO_POLLUTION
 
#define SPECENUM_VALUE12NAME   N_("Pollution:")
 
#define SPECENUM_VALUE13   INFO_ILLNESS
 
#define SPECENUM_VALUE13NAME   N_("Plague risk:")
 
#define SPECENUM_VALUE14   INFO_STEAL
 
#define SPECENUM_VALUE14NAME   N_("Tech Stolen:")
 
#define SPECENUM_VALUE15   INFO_AIRLIFT
 
#define SPECENUM_VALUE15NAME   N_("Airlift:")
 
#define SPECENUM_COUNT   NUM_INFO_FIELDS
 

Functions

QString get_tooltip (QVariant qvar)
 
QString get_tooltip_improvement (const impr_type *building, struct city *pcity=nullptr, bool ext=false)
 
QString get_tooltip_unit (const struct unit_type *utype, bool ext=false)
 
void destroy_city_dialog ()
 
void city_font_update ()
 

Macro Definition Documentation

◆ SPECENUM_COUNT

#define SPECENUM_COUNT   NUM_INFO_FIELDS

Definition at line 86 of file citydlg.h.

◆ SPECENUM_NAME

#define SPECENUM_NAME   city_info

Definition at line 51 of file citydlg.h.

◆ SPECENUM_VALUE0

#define SPECENUM_VALUE0   INFO_CITIZEN

Definition at line 53 of file citydlg.h.

◆ SPECENUM_VALUE0NAME

#define SPECENUM_VALUE0NAME   N_("Size:")

Definition at line 54 of file citydlg.h.

◆ SPECENUM_VALUE1

#define SPECENUM_VALUE1   INFO_FOOD

Definition at line 55 of file citydlg.h.

◆ SPECENUM_VALUE10

#define SPECENUM_VALUE10   INFO_WASTE

Definition at line 73 of file citydlg.h.

◆ SPECENUM_VALUE10NAME

#define SPECENUM_VALUE10NAME   N_("Waste:")

Definition at line 74 of file citydlg.h.

◆ SPECENUM_VALUE11

#define SPECENUM_VALUE11   INFO_CULTURE

Definition at line 75 of file citydlg.h.

◆ SPECENUM_VALUE11NAME

#define SPECENUM_VALUE11NAME   N_("Culture:")

Definition at line 76 of file citydlg.h.

◆ SPECENUM_VALUE12

#define SPECENUM_VALUE12   INFO_POLLUTION

Definition at line 77 of file citydlg.h.

◆ SPECENUM_VALUE12NAME

#define SPECENUM_VALUE12NAME   N_("Pollution:")

Definition at line 78 of file citydlg.h.

◆ SPECENUM_VALUE13

#define SPECENUM_VALUE13   INFO_ILLNESS

Definition at line 79 of file citydlg.h.

◆ SPECENUM_VALUE13NAME

#define SPECENUM_VALUE13NAME   N_("Plague risk:")

Definition at line 80 of file citydlg.h.

◆ SPECENUM_VALUE14

#define SPECENUM_VALUE14   INFO_STEAL

Definition at line 81 of file citydlg.h.

◆ SPECENUM_VALUE14NAME

#define SPECENUM_VALUE14NAME   N_("Tech Stolen:")

Definition at line 82 of file citydlg.h.

◆ SPECENUM_VALUE15

#define SPECENUM_VALUE15   INFO_AIRLIFT

Definition at line 83 of file citydlg.h.

◆ SPECENUM_VALUE15NAME

#define SPECENUM_VALUE15NAME   N_("Airlift:")

Definition at line 84 of file citydlg.h.

◆ SPECENUM_VALUE1NAME

#define SPECENUM_VALUE1NAME   N_("Food:")

Definition at line 56 of file citydlg.h.

◆ SPECENUM_VALUE2

#define SPECENUM_VALUE2   INFO_SHIELD

Definition at line 57 of file citydlg.h.

◆ SPECENUM_VALUE2NAME

#define SPECENUM_VALUE2NAME   N_("Prod:")

Definition at line 58 of file citydlg.h.

◆ SPECENUM_VALUE3

#define SPECENUM_VALUE3   INFO_TRADE

Definition at line 59 of file citydlg.h.

◆ SPECENUM_VALUE3NAME

#define SPECENUM_VALUE3NAME   N_("Trade:")

Definition at line 60 of file citydlg.h.

◆ SPECENUM_VALUE4

#define SPECENUM_VALUE4   INFO_GOLD

Definition at line 61 of file citydlg.h.

◆ SPECENUM_VALUE4NAME

#define SPECENUM_VALUE4NAME   N_("Gold:")

Definition at line 62 of file citydlg.h.

◆ SPECENUM_VALUE5

#define SPECENUM_VALUE5   INFO_LUXURY

Definition at line 63 of file citydlg.h.

◆ SPECENUM_VALUE5NAME

#define SPECENUM_VALUE5NAME   N_("Luxury:")

Definition at line 64 of file citydlg.h.

◆ SPECENUM_VALUE6

#define SPECENUM_VALUE6   INFO_SCIENCE

Definition at line 65 of file citydlg.h.

◆ SPECENUM_VALUE6NAME

#define SPECENUM_VALUE6NAME   N_("Science:")

Definition at line 66 of file citydlg.h.

◆ SPECENUM_VALUE7

#define SPECENUM_VALUE7   INFO_GRANARY

Definition at line 67 of file citydlg.h.

◆ SPECENUM_VALUE7NAME

#define SPECENUM_VALUE7NAME   N_("Granary:")

Definition at line 68 of file citydlg.h.

◆ SPECENUM_VALUE8

#define SPECENUM_VALUE8   INFO_GROWTH

Definition at line 69 of file citydlg.h.

◆ SPECENUM_VALUE8NAME

#define SPECENUM_VALUE8NAME   N_("Change in:")

Definition at line 70 of file citydlg.h.

◆ SPECENUM_VALUE9

#define SPECENUM_VALUE9   INFO_CORRUPTION

Definition at line 71 of file citydlg.h.

◆ SPECENUM_VALUE9NAME

#define SPECENUM_VALUE9NAME   N_("Corruption:")

Definition at line 72 of file citydlg.h.

Function Documentation

◆ city_font_update()

void city_font_update ( )

Updates city font

Definition at line 3886 of file citydlg.cpp.

◆ destroy_city_dialog()

void destroy_city_dialog ( )

Closes city dialog

Definition at line 3839 of file citydlg.cpp.

◆ get_tooltip()

QString get_tooltip ( QVariant  qvar)

Returns shortened help for given universal ( stored in qvar )

Definition at line 4126 of file citydlg.cpp.

Referenced by city_production_model::data().

◆ get_tooltip_improvement()

QString get_tooltip_improvement ( const impr_type building,
struct city pcity,
bool  ext 
)

Returns improvement properties to append in tooltip ext is used to get extra info from help

Definition at line 3997 of file citydlg.cpp.

Referenced by get_tooltip(), impr_item::impr_item(), research_diagram::mouseMoveEvent(), and city_dialog::update_improvements().

◆ get_tooltip_unit()

QString get_tooltip_unit ( const struct unit_type utype,
bool  ext 
)

Returns unit properties to append in tooltip ext is used to get extra info from help

Definition at line 4056 of file citydlg.cpp.

Referenced by get_tooltip(), research_diagram::mouseMoveEvent(), and city_dialog::update_improvements().