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

#include <menu.h>

+ Inheritance diagram for go_act_menu:
+ Collaboration diagram for go_act_menu:

Public Slots

void start_go_act (int act_id, int sub_tgt_id)
 Activate the goto system. More...
 
void reset ()
 Reset the goto and act menu so it will be recreated. More...
 
void create ()
 Fill the new goto and act sub menu with menu items. More...
 
void update ()
 Update the goto and act menu based on the selected unit(s) More...
 

Public Member Functions

 go_act_menu (QWidget *parent=0)
 Instantiate a new goto and act sub menu. More...
 
 ~go_act_menu () override
 Destructor. More...
 

Static Public Member Functions

static void reset_all ()
 Reset all goto and act menu instances. More...
 
static void update_all ()
 Update all goto and act menu instances. More...
 

Private Attributes

QMap< QAction *, int > items
 

Static Private Attributes

static QSet< go_act_menu * > instances
 Store all goto and act menu items so they can be updated etc. More...
 

Detailed Description

Definition at line 133 of file menu.h.

Constructor & Destructor Documentation

◆ go_act_menu()

go_act_menu::go_act_menu ( QWidget *  parent = 0)

Instantiate a new goto and act sub menu.

Definition at line 264 of file menu.cpp.

◆ ~go_act_menu()

go_act_menu::~go_act_menu ( )
override

Destructor.

Definition at line 273 of file menu.cpp.

Member Function Documentation

◆ create

void go_act_menu::create ( )
slot

Fill the new goto and act sub menu with menu items.

Definition at line 313 of file menu.cpp.

Referenced by update().

◆ reset

void go_act_menu::reset ( )
slot

Reset the goto and act menu so it will be recreated.

Definition at line 301 of file menu.cpp.

◆ reset_all()

void go_act_menu::reset_all ( )
static

Reset all goto and act menu instances.

Definition at line 474 of file menu.cpp.

Referenced by real_menus_init().

◆ start_go_act

void go_act_menu::start_go_act ( int  act_id,
int  sub_tgt_id 
)
slot

Activate the goto system.

Definition at line 461 of file menu.cpp.

Referenced by create().

◆ update

void go_act_menu::update ( )
slot

Update the goto and act menu based on the selected unit(s)

Definition at line 421 of file menu.cpp.

◆ update_all()

void go_act_menu::update_all ( )
static

Update all goto and act menu instances.

Definition at line 484 of file menu.cpp.

Referenced by real_menus_update().

Member Data Documentation

◆ instances

QSet< go_act_menu * > go_act_menu::instances
staticprivate

Store all goto and act menu items so they can be updated etc.

Definition at line 135 of file menu.h.

Referenced by go_act_menu(), reset_all(), update_all(), and ~go_act_menu().

◆ items

QMap<QAction *, int> go_act_menu::items
private

Definition at line 137 of file menu.h.

Referenced by create(), reset(), and update().