Freeciv-3.2: tab_gov Class Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Public Member Functions | Private Slots | Private Member Functions | Private Attributes
tab_gov Class Reference

`#include <tab_gov.h>`

Inheritance diagram for tab_gov:

## Public Member Functions

| tab_gov (ruledit_gui *ui_in)
void | refresh ()

## Private Slots

void | name_given ()
void | select_gov ()
void | add_now ()
void | delete_now ()
void | same_name_toggle (bool checked)
void | edit_reqs ()
void | edit_effects ()

## Private Member Functions

void | update_gov_info (struct government *pgov)
bool | initialize_new_gov (struct government *pgov)

## Private Attributes

ruledit_gui * | ui
QLineEdit * | name
QLineEdit * | rname
QListWidget * | gov_list
QCheckBox * | same_name
struct government * | selected

## Detailed Description

Definition at line 30 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 45 of file tab_gov.cpp.

## Member Function Documentation

## ◆ add_now

void tab_gov::add_now | ( |  | ) |

privateslot

User requested new government

Definition at line 238 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 297 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 286 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 224 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 171 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 275 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 156 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 128 of file tab_gov.cpp.

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

## Field Documentation

## ◆ gov_list

QListWidget* tab_gov::gov_list

private

Definition at line 45 of file tab_gov.h.

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

## ◆ name

QLineEdit* tab_gov::name

private

Definition at line 43 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 44 of file tab_gov.h.

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

## ◆ same_name

QCheckBox* tab_gov::same_name

private

Definition at line 46 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 48 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 39 of file tab_gov.h.

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