Freeciv21
Develop your civilization from humble roots to a global empire
improvement_seller.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2023 Louis Moureaux <m_louis30@yahoo.com>
3  *
4  * SPDX-License-Identifier: GPLv3-or-later
5  */
6 
7 class QAction;
8 class QMenu;
9 class QWidget;
10 
11 struct city;
12 struct building;
13 
14 namespace freeciv {
15 
17 public:
18  improvement_seller(QWidget *parent, int city_id, int improvement_id);
19 
20  void operator()();
21 
22  static QAction *add_to_menu(QWidget *parent, QMenu *menu, const city *city,
23  int improvement_id);
24 
25 private:
27  QWidget *m_parent;
28 };
29 
30 } // namespace freeciv
Helper class to safely sell a city improvement.
void operator()()
Asks for confirmation then sells the improvement.
improvement_seller(QWidget *parent, int city_id, int improvement_id)
Constructor.
static QAction * add_to_menu(QWidget *parent, QMenu *menu, const city *city, int improvement_id)
Adds a menu item to sell an improvement in a city.
Definition: path.cpp:10
Definition: city.h:291