Freeciv21
Develop your civilization from humble roots to a global empire
view_cities_data.h
Go to the documentation of this file.
1 /*__ ___ ***************************************
2 / \ / \ Copyright (c) 1996-2020 Freeciv21 and Freeciv
3 \_ \ / __/ contributors. This file is part of Freeciv21.
4  _\ \ / /__ Freeciv21 is free software: you can redistribute it
5  \___ \____/ __/ and/or modify it under the terms of the GNU General
6  \_ _/ Public License as published by the Free Software
7  | @ @ \_ Foundation, either version 3 of the License,
8  | or (at your option) any later version.
9  _/ /\ You should have received a copy of the GNU
10  /o) (o/\ \_ General Public License along with Freeciv21.
11  \_____/ / If not, see https://www.gnu.org/licenses/.
12  \____/ ********************************************************/
13 #pragma once
14 
15 #include "fc_types.h"
16 
17 #include <QString>
18 
19 // Number of city report columns: have to set this manually now...
20 #define NUM_CREPORT_COLS (num_city_report_spec())
21 
23  bool show; // modify this to customize
24  int width; // 0 means variable; rightmost only
25  int space; // number of leading spaces (see below)
26  const char *title1; // already translated or nullptr
27  const char *title2; // already translated or nullptr
28  const char *explanation; // already translated
29  void *data;
30  QString (*func)(const struct city *pcity, const void *data);
31  const char *tagname; // for save_options
32 };
33 
34 extern std::vector<city_report_spec> city_report_specs;
35 
37 bool *city_report_spec_show_ptr(int i);
38 const char *city_report_spec_tagname(int i);
39 
41 
42 int cityrepfield_compare(const char *field1, const char *field2);
43 
44 bool can_city_sell_universal(const struct city *pcity,
45  const struct universal *target);
const char * tagname
const char * title2
QString(* func)(const struct city *pcity, const void *data)
const char * explanation
const char * title1
Definition: city.h:291
const char * city_report_spec_tagname(int i)
Simple wrapper for city_report_specs.tagname.
bool can_city_sell_universal(const struct city *pcity, const struct universal *target)
Same as can_city_sell_building(), but with universal argument.
int num_city_report_spec()
Simple wrapper for num_creport_cols()
std::vector< city_report_spec > city_report_specs
bool * city_report_spec_show_ptr(int i)
Simple wrapper for city_report_specs.show.
int cityrepfield_compare(const char *field1, const char *field2)
The real function: split the two strings, and compare them.
void init_city_report_game_data()
Initialize city report data.