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

#include <tab_gov.h>

+ Inheritance diagram for tab_gov:
+ Collaboration diagram for tab_gov:

Public Member Functions

 tab_gov (ruledit_gui *ui_in)
 Setup tab_gov object. More...
 
void refresh ()
 Refresh the information. More...
 

Private Slots

void name_given ()
 User entered name for the government. More...
 
void select_gov ()
 User selected government from the list. More...
 
void add_now ()
 User requested new government. More...
 
void delete_now ()
 User requested government deletion. More...
 
void same_name_toggle (bool checked)
 Toggled whether rule_name and name should be kept identical. More...
 
void edit_reqs ()
 User wants to edit reqs. More...
 
void edit_effects ()
 User wants to edit effects. More...
 

Private Member Functions

void update_gov_info (struct government *pgov)
 Update info of the government. More...
 
bool initialize_new_gov (struct government *pgov)
 Initialize new government for use. More...
 

Private Attributes

ruledit_guiui
 
QLineEdit * name
 
QLineEdit * rname
 
QListWidget * gov_list
 
QRadioButton * same_name
 
struct governmentselected
 

Detailed Description

Definition at line 28 of file tab_gov.h.

Constructor & Destructor Documentation

◆ tab_gov()

tab_gov::tab_gov ( ruledit_gui ui_in)
explicit

Setup tab_gov object.

Definition at line 39 of file tab_gov.cpp.

Member Function Documentation

◆ add_now

void tab_gov::add_now ( )
privateslot

User requested new government.

Definition at line 239 of file tab_gov.cpp.

Referenced by tab_gov().

◆ delete_now

void tab_gov::delete_now ( )
privateslot

User requested government deletion.

Definition at line 204 of file tab_gov.cpp.

Referenced by tab_gov().

◆ edit_effects

void tab_gov::edit_effects ( )
privateslot

User wants to edit effects.

Definition at line 298 of file tab_gov.cpp.

Referenced by tab_gov().

◆ edit_reqs

void tab_gov::edit_reqs ( )
privateslot

User wants to edit reqs.

Definition at line 287 of file tab_gov.cpp.

Referenced by tab_gov().

◆ initialize_new_gov()

bool tab_gov::initialize_new_gov ( struct government pgov)
private

Initialize new government for use.

Definition at line 225 of file tab_gov.cpp.

Referenced by add_now().

◆ name_given

void tab_gov::name_given ( )
privateslot

User entered name for the government.

Definition at line 173 of file tab_gov.cpp.

Referenced by tab_gov().

◆ refresh()

void tab_gov::refresh ( )

Refresh the information.

Definition at line 113 of file tab_gov.cpp.

Referenced by add_now(), delete_now(), ruledit_gui::launch_now(), name_given(), and tab_gov().

◆ same_name_toggle

void tab_gov::same_name_toggle ( bool  checked)
privateslot

Toggled whether rule_name and name should be kept identical.

Definition at line 276 of file tab_gov.cpp.

Referenced by tab_gov().

◆ select_gov

void tab_gov::select_gov ( )
privateslot

User selected government from the list.

Definition at line 158 of file tab_gov.cpp.

Referenced by tab_gov().

◆ update_gov_info()

void tab_gov::update_gov_info ( struct government pgov)
private

Update info of the government.

Definition at line 130 of file tab_gov.cpp.

Referenced by add_now(), delete_now(), and select_gov().

Member Data Documentation

◆ gov_list

QListWidget* tab_gov::gov_list
private

Definition at line 42 of file tab_gov.h.

Referenced by refresh(), select_gov(), and tab_gov().

◆ name

QLineEdit* tab_gov::name
private

Definition at line 40 of file tab_gov.h.

Referenced by name_given(), same_name_toggle(), tab_gov(), and update_gov_info().

◆ rname

QLineEdit* tab_gov::rname
private

Definition at line 41 of file tab_gov.h.

Referenced by name_given(), same_name_toggle(), tab_gov(), and update_gov_info().

◆ same_name

QRadioButton* tab_gov::same_name
private

Definition at line 43 of file tab_gov.h.

Referenced by name_given(), tab_gov(), and update_gov_info().

◆ selected

struct government* tab_gov::selected
private

Definition at line 45 of file tab_gov.h.

Referenced by delete_now(), edit_effects(), edit_reqs(), name_given(), tab_gov(), and update_gov_info().

◆ ui

ruledit_gui* tab_gov::ui
private

Definition at line 36 of file tab_gov.h.

Referenced by delete_now(), edit_effects(), edit_reqs(), name_given(), and tab_gov().