Freeciv21
Develop your civilization from humble roots to a global empire
view_economics.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2023 Freeciv21 and Freeciv contributors. This file is
3  part of Freeciv21. Freeciv21 is free software: you can redistribute it
4  and/or modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation, either version 3 of the
6  License, or (at your option) any later version. You should have received
7  a copy of the GNU General Public License along with Freeciv21. If not,
8  see https://www.gnu.org/licenses/.
9 **************************************************************************/
10 #pragma once
11 
12 #include "ui_view_economics.h"
13 
14 // client
15 #include "climisc.h"
16 #include "repodlgs_g.h"
17 
18 /****************************************************************************
19  Tab widget to display economy report (F5)
20 ****************************************************************************/
21 class eco_report : public QWidget {
22  Q_OBJECT
23 
24 public:
25  eco_report();
26  ~eco_report();
27  void update_report();
28  void init();
29 
30 private:
31  int index;
32  int curr_row{-1};
33  int max_row{0};
34  cid uid{0};
35  int counter{0};
36  Ui::FormEconomyReport ui;
37 private slots:
38  void disband_units();
39  void sell_buildings();
40  void sell_redundant();
41  void selection_changed(const QItemSelection &sl, const QItemSelection &ds);
42 };
43 
eco_report()
Constructor for economy report.
void selection_changed(const QItemSelection &sl, const QItemSelection &ds)
Action for selection changed in economy report.
void disband_units()
Disband pointed units (in economy report)
void sell_buildings()
Sell all pointed builings.
void init()
Initializes place in tab for economy report.
Ui::FormEconomyReport ui
~eco_report()
Destructor for economy report.
void sell_redundant()
Sells redundant buildings.
void update_report()
Refresh all widgets for economy report.
int cid
Definition: climisc.h:21
void popdown_economy_report()
Closes economy report.