Freeciv-3.2: tab_unit Class Reference

Freeciv-3.2

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

`#include <tab_unit.h>`

Inheritance diagram for tab_unit:

## Public Member Functions

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

## Private Slots

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

## Private Member Functions

void | update_utype_info (struct unit_type *ptype)
bool | initialize_new_utype (struct unit_type *ptype)

## Private Attributes

ruledit_gui * | ui
QLineEdit * | name
QLineEdit * | rname
QListWidget * | unit_list
QCheckBox * | same_name
struct unit_type * | selected

## Detailed Description

Definition at line 30 of file tab_unit.h.

## Constructor & Destructor Documentation

## ◆ tab_unit()

tab_unit::tab_unit | ( | ruledit_gui * | ui_in | ) |

explicit

Setup tab_unit object

Definition at line 46 of file tab_unit.cpp.

## Member Function Documentation

## ◆ add_now

void tab_unit::add_now | ( |  | ) |

privateslot

User requested new unit

Definition at line 262 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ delete_now

void tab_unit::delete_now | ( |  | ) |

privateslot

User requested unit deletion

Definition at line 206 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ edit_effects

void tab_unit::edit_effects | ( |  | ) |

privateslot

User wants to edit effects

Definition at line 321 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ edit_now

void tab_unit::edit_now | ( |  | ) |

privateslot

User requested unit edit dialog

Definition at line 230 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ edit_reqs

void tab_unit::edit_reqs | ( |  | ) |

privateslot

User wants to edit reqs

Definition at line 310 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ initialize_new_utype()

bool tab_unit::initialize_new_utype | ( | struct unit_type * | ptype | ) |

private

Initialize new tech for use.

Definition at line 247 of file tab_unit.cpp.

Referenced by add_now().

## ◆ name_given

void tab_unit::name_given | ( |  | ) |

privateslot

User entered name for the unit

Definition at line 173 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ refresh()

void tab_unit::refresh | ( |  | ) |

Refresh the information.

Definition at line 116 of file tab_unit.cpp.

Referenced by add_now(), delete_now(), name_given(), and tab_unit().

## ◆ same_name_toggle

void tab_unit::same_name_toggle | ( | bool | checked | ) |

privateslot

Toggled whether rule_name and name should be kept identical

Definition at line 299 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ select_unit

void tab_unit::select_unit | ( |  | ) |

privateslot

User selected unit from the list.

Definition at line 158 of file tab_unit.cpp.

Referenced by tab_unit().

## ◆ update_utype_info()

void tab_unit::update_utype_info | ( | struct unit_type * | ptype | ) |

private

Update info of the unit

Definition at line 130 of file tab_unit.cpp.

Referenced by add_now(), delete_now(), select_unit(), and tab_unit().

## Field Documentation

## ◆ name

QLineEdit* tab_unit::name

private

Definition at line 43 of file tab_unit.h.

Referenced by name_given(), same_name_toggle(), tab_unit(), and update_utype_info().

## ◆ rname

QLineEdit* tab_unit::rname

private

Definition at line 44 of file tab_unit.h.

Referenced by name_given(), same_name_toggle(), tab_unit(), and update_utype_info().

## ◆ same_name

QCheckBox* tab_unit::same_name

private

Definition at line 46 of file tab_unit.h.

Referenced by name_given(), tab_unit(), and update_utype_info().

## ◆ selected

struct unit_type* tab_unit::selected

private

Definition at line 48 of file tab_unit.h.

Referenced by delete_now(), edit_effects(), edit_now(), edit_reqs(), name_given(), tab_unit(), and update_utype_info().

## ◆ ui

ruledit_gui* tab_unit::ui

private

Definition at line 39 of file tab_unit.h.

Referenced by delete_now(), edit_effects(), edit_now(), edit_reqs(), name_given(), and tab_unit().

## ◆ unit_list

QListWidget* tab_unit::unit_list

private

Definition at line 45 of file tab_unit.h.

Referenced by refresh(), select_unit(), and tab_unit().