Freeciv21
Develop your civilization from humble roots to a global empire
tileset_debugger.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 2021 Freeciv21 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 <QDialog>
13 
14 class QAction;
15 class QLabel;
16 class QListWidget;
17 class QTreeWidget;
18 
19 struct tile;
20 struct tileset;
21 
22 namespace freeciv {
23 
24 class tileset_debugger : public QDialog {
25  Q_OBJECT
26 
27 public:
28  explicit tileset_debugger(QWidget *parent = nullptr);
29  virtual ~tileset_debugger();
30 
31  void refresh(const struct tileset *t);
32 
33  const ::tile *tile() const { return m_tile; }
34  void set_tile(const ::tile *t);
35 
36 signals:
37  void tile_picking_requested(bool active);
38 
39 private slots:
40  void pick_tile(bool active);
41 
42 private:
43  void refresh_messages(const struct tileset *t);
44 
45  const ::tile *m_tile;
46  QLabel *m_label;
47  QAction *m_pick_action;
48  QListWidget *m_messages;
49  QTreeWidget *m_content;
50 };
51 
52 } // namespace freeciv
A dialog to perform debugging of the tileset.
void tile_picking_requested(bool active)
void set_tile(const ::tile *t)
Sets the tile being debugged.
void refresh_messages(const struct tileset *t)
Refresh the messages list.
virtual ~tileset_debugger()
Destructor.
tileset_debugger(QWidget *parent=nullptr)
Constructor.
const ::tile * tile() const
void refresh(const struct tileset *t)
Enters or exits tile picking mode.
void pick_tile(bool active)
Enters or exits tile picking mode.
Definition: path.cpp:10
Definition: tile.h:42