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

#include <menu.h>

+ Inheritance diagram for gov_menu:
+ Collaboration diagram for gov_menu:

Public Slots

void revolution ()
 Shows the dialog asking for confirmation before starting a revolution. More...
 
void change_gov (int target_gov)
 Shows the dialog asking for confirmation before starting a revolution. More...
 
void create ()
 Creates the menu once the government list is known. More...
 
void update ()
 Updates the menu to take gov availability into account. More...
 

Public Member Functions

 gov_menu (QWidget *parent=0)
 Creates a new government menu. More...
 
 ~gov_menu () override
 Destructor. More...
 

Static Public Member Functions

static void create_all ()
 Updates all gov_menu instances. More...
 
static void update_all ()
 Updates all gov_menu instances. More...
 

Private Attributes

QVector< QAction * > actions
 

Static Private Attributes

static QSet< gov_menu * > instances = QSet<gov_menu *>()
 Keeps track of all gov_menu instances. More...
 

Detailed Description

Definition at line 109 of file menu.h.

Constructor & Destructor Documentation

◆ gov_menu()

gov_menu::gov_menu ( QWidget *  parent = 0)

Creates a new government menu.

Definition at line 140 of file menu.cpp.

◆ ~gov_menu()

gov_menu::~gov_menu ( )
override

Destructor.

Definition at line 150 of file menu.cpp.

Member Function Documentation

◆ change_gov

void gov_menu::change_gov ( int  target_gov)
slot

Shows the dialog asking for confirmation before starting a revolution.

Definition at line 231 of file menu.cpp.

Referenced by create().

◆ create

void gov_menu::create ( )
slot

Creates the menu once the government list is known.

Definition at line 159 of file menu.cpp.

Referenced by top_bar_indicators_menu().

◆ create_all()

void gov_menu::create_all ( )
static

Updates all gov_menu instances.

Definition at line 244 of file menu.cpp.

Referenced by real_menus_init().

◆ revolution

void gov_menu::revolution ( )
slot

Shows the dialog asking for confirmation before starting a revolution.

Definition at line 223 of file menu.cpp.

Referenced by create().

◆ update

void gov_menu::update ( )
slot

Updates the menu to take gov availability into account.

Definition at line 199 of file menu.cpp.

Referenced by top_bar_indicators_menu().

◆ update_all()

void gov_menu::update_all ( )
static

Updates all gov_menu instances.

Definition at line 254 of file menu.cpp.

Referenced by real_menus_update().

Member Data Documentation

◆ actions

QVector<QAction *> gov_menu::actions
private

Definition at line 113 of file menu.h.

Referenced by create(), update(), and ~gov_menu().

◆ instances

QSet< gov_menu * > gov_menu::instances = QSet<gov_menu *>()
staticprivate

Keeps track of all gov_menu instances.

Definition at line 111 of file menu.h.

Referenced by create_all(), gov_menu(), update_all(), and ~gov_menu().