Freeciv21
Develop your civilization from humble roots to a global empire
minimap_panel Class Reference

The panel at the bottom right of the game screen, holding the minimap and the Turn Done button. More...

#include <minimap_panel.h>

+ Inheritance diagram for minimap_panel:
+ Collaboration diagram for minimap_panel:

Public Member Functions

 minimap_panel (map_view *map, QWidget *parent=nullptr)
 Constructor. More...
 
virtual ~minimap_panel ()=default
 Destructor. More...
 
void update_menu () override
 
void set_minimap_visible (bool visible)
 Shows or hides the minimap. More...
 
auto minimap ()
 Retrieves the minimap widget. More...
 
auto turn_done ()
 Retrieves the Turn Done button. More...
 
- Public Member Functions inherited from resizable_widget
void setResizable (Qt::Edges edges)
 Set resizable flags. More...
 
Qt::Edges getResizable () const
 Get resizable flags of wdiget. More...
 
- Public Member Functions inherited from fcwidget
 fcwidget (QWidget *parent=nullptr)
 Constructor. More...
 

Private Member Functions

void setup_minimap_menu ()
 Creates the menu with the minimap settings. More...
 

Private Attributes

Ui::minimap_panel ui
 
QAction * m_show_relief
 
QAction * m_show_borders
 
QAction * m_show_borders_ocean
 
QAction * m_show_cities
 
QAction * m_show_fog
 

Additional Inherited Members

- Signals inherited from resizable_widget
void resized (QRect rect)
 
- Protected Member Functions inherited from resizable_widget
void mousePressEvent (QMouseEvent *event) override
 Checks if info_tab can be moved. More...
 
void mouseMoveEvent (QMouseEvent *event) override
 Called when mouse moved (mouse track is enabled). More...
 
void mouseReleaseEvent (QMouseEvent *event) override
 Restores cursor when resizing is done. More...
 

Detailed Description

The panel at the bottom right of the game screen, holding the minimap and the Turn Done button.

Definition at line 23 of file minimap_panel.h.

Constructor & Destructor Documentation

◆ minimap_panel()

minimap_panel::minimap_panel ( map_view map,
QWidget *  parent = nullptr 
)
explicit

Constructor.

Definition at line 25 of file minimap_panel.cpp.

◆ ~minimap_panel()

virtual minimap_panel::~minimap_panel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ minimap()

auto minimap_panel::minimap ( )
inline

Retrieves the minimap widget.

Definition at line 36 of file minimap_panel.h.

Referenced by update_minimap().

◆ set_minimap_visible()

void minimap_panel::set_minimap_visible ( bool  visible)

Shows or hides the minimap.

Definition at line 56 of file minimap_panel.cpp.

Referenced by mr_menu::setup_menus().

◆ setup_minimap_menu()

void minimap_panel::setup_minimap_menu ( )
private

Creates the menu with the minimap settings.

Definition at line 78 of file minimap_panel.cpp.

Referenced by minimap_panel().

◆ turn_done()

auto minimap_panel::turn_done ( )
inline

Retrieves the Turn Done button.

Definition at line 39 of file minimap_panel.h.

Referenced by fc_game_tab_widget::event(), update_timeout_label(), and update_turn_done_button_state().

◆ update_menu()

void minimap_panel::update_menu ( )
inlineoverridevirtual

Implements fcwidget.

Definition at line 31 of file minimap_panel.h.

Member Data Documentation

◆ m_show_borders

QAction * minimap_panel::m_show_borders
private

Definition at line 46 of file minimap_panel.h.

Referenced by setup_minimap_menu().

◆ m_show_borders_ocean

QAction * minimap_panel::m_show_borders_ocean
private

Definition at line 46 of file minimap_panel.h.

Referenced by setup_minimap_menu().

◆ m_show_cities

QAction * minimap_panel::m_show_cities
private

Definition at line 47 of file minimap_panel.h.

Referenced by setup_minimap_menu().

◆ m_show_fog

QAction * minimap_panel::m_show_fog
private

Definition at line 47 of file minimap_panel.h.

Referenced by setup_minimap_menu().

◆ m_show_relief

QAction* minimap_panel::m_show_relief
private

Definition at line 46 of file minimap_panel.h.

Referenced by setup_minimap_menu().

◆ ui

Ui::minimap_panel minimap_panel::ui
private