Freeciv21
Develop your civilization from humble roots to a global empire
citydlg.cpp File Reference
#include "citydlg.h"
#include <QApplication>
#include <QCheckBox>
#include <QGroupBox>
#include <QHeaderView>
#include <QMouseEvent>
#include <QPainter>
#include <QScreen>
#include <QScrollArea>
#include <QScrollBar>
#include <QSpacerItem>
#include <QSplitter>
#include <QVBoxLayout>
#include <QWidgetAction>
#include "fc_types.h"
#include "fcintl.h"
#include "player.h"
#include "support.h"
#include "citizens.h"
#include "city.h"
#include "game.h"
#include "canvas.h"
#include "citydlg_common.h"
#include "client_main.h"
#include "climisc.h"
#include "control.h"
#include "fc_client.h"
#include "fonts.h"
#include "global_worklist.h"
#include "governor.h"
#include "hudwidget.h"
#include "icons.h"
#include "mapctrl_common.h"
#include "page_game.h"
#include "qtg_cxxside.h"
#include "text.h"
#include "tileset/tilespec.h"
#include "tooltips.h"
#include "top_bar.h"
#include "unitlist.h"
#include "utils/improvement_seller.h"
#include "utils/unit_quick_menu.h"
#include "utils/unit_utils.h"
#include "views/view_cities.h"
#include "views/view_map.h"
#include "views/view_map_common.h"
#include "widgets/city/governor_widget.h"
+ Include dependency graph for citydlg.cpp:

Go to the source code of this file.

Functions

QString split_text (const QString &text, bool cut)
 Splits long text to 80 characters. More...
 
QString cut_helptext (const QString &text)
 Remove some text from given text(help text) to show as tooltip. More...
 
static void pixmap_put_x (QPixmap *pix)
 Draws X on pixmap pointing its useless. More...
 
void real_city_dialog_popup (struct city *pcity)
 Pop up (or bring to the front) a dialog for the given city. More...
 
void popdown_city_dialog ()
 Closes the city overlay. More...
 
void real_city_dialog_refresh (struct city *pcity)
 Refresh (update) all data for the given city's dialog. More...
 
void city_font_update ()
 Updates city font. More...
 
void refresh_unit_city_dialogs (struct unit *punit)
 Update city dialogs when the given unit's status changes. More...
 
struct cityis_any_city_dialog_open ()
 
bool city_dialog_is_open (struct city *pcity)
 Return whether the dialog for the given city is open. More...
 

Function Documentation

◆ city_dialog_is_open()

bool city_dialog_is_open ( struct city pcity)

Return whether the dialog for the given city is open.

Definition at line 2338 of file citydlg.cpp.

Referenced by city_packet_common(), is_any_city_dialog_open(), and real_city_dialog_refresh().

◆ city_font_update()

void city_font_update ( )

Updates city font.

Definition at line 2284 of file citydlg.cpp.

Referenced by apply_notify_font().

◆ cut_helptext()

QString cut_helptext ( const QString &  text)

Remove some text from given text(help text) to show as tooltip.

Definition at line 87 of file optiondlg.cpp.

◆ is_any_city_dialog_open()

◆ pixmap_put_x()

static void pixmap_put_x ( QPixmap *  pix)
static

Draws X on pixmap pointing its useless.

Definition at line 468 of file citydlg.cpp.

Referenced by city_production_delegate::paint().

◆ popdown_city_dialog()

◆ real_city_dialog_popup()

void real_city_dialog_popup ( struct city pcity)

Pop up (or bring to the front) a dialog for the given city.

It may or may not be modal.

Definition at line 2247 of file citydlg.cpp.

Referenced by cities_update_callback(), city_widget::city_view(), and notify_goto::inspect_city().

◆ real_city_dialog_refresh()

void real_city_dialog_refresh ( struct city pcity)

Refresh (update) all data for the given city's dialog.

Definition at line 2274 of file citydlg.cpp.

Referenced by cities_update_callback(), and refresh_unit_city_dialogs().

◆ refresh_unit_city_dialogs()

void refresh_unit_city_dialogs ( struct unit punit)

Update city dialogs when the given unit's status changes.

This typically means updating both the unit's home city (if any) and the city in which it is present (if any).

Definition at line 2304 of file citydlg.cpp.

Referenced by clear_unit_orders(), and handle_unit_packet_common().

◆ split_text()

QString split_text ( const QString &  text,
bool  cut 
)

Splits long text to 80 characters.

Definition at line 45 of file optiondlg.cpp.