Freeciv-3.3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes
tab_tech Class Reference

#include <tab_tech.h>

+ Inheritance diagram for tab_tech:

Public Member Functions

 tab_tech (ruledit_gui *ui_in)
 
void refresh ()
 

Static Public Member Functions

static void techs_to_menu (QMenu *fill_menu)
 
static QString tech_name (struct advance *padv)
 

Private Slots

void name_given ()
 
void select_tech ()
 
void req1_jump ()
 
void req2_jump ()
 
void root_req_jump ()
 
void req1_menu (QAction *action)
 
void req2_menu (QAction *action)
 
void root_req_menu (QAction *action)
 
void add_now ()
 
void delete_now ()
 
void edit_now ()
 
void same_name_toggle (bool checked)
 
void edit_effects ()
 

Private Member Functions

void update_tech_info (struct advance *adv)
 
QMenu * prepare_req_button (QToolButton *button, enum tech_req rn)
 
bool initialize_new_tech (struct advance *padv)
 

Private Attributes

ruledit_guiui
 
QLineEdit * name
 
QLineEdit * rname
 
QToolButtonreq1_button
 
QToolButtonreq2_button
 
QToolButtonroot_req_button
 
QMenu * req1
 
QMenu * req2
 
QMenu * root_req
 
QListWidgettech_list
 
QCheckBoxsame_name
 
struct advanceselected
 

Detailed Description

Definition at line 37 of file tab_tech.h.

Constructor & Destructor Documentation

◆ tab_tech()

tab_tech::tab_tech ( ruledit_gui ui_in)
explicit

Setup tab_tech object

Definition at line 46 of file tab_tech.cpp.

Member Function Documentation

◆ add_now

void tab_tech::add_now ( )
privateslot

User requested new tech

Definition at line 428 of file tab_tech.cpp.

Referenced by tab_tech().

◆ delete_now

void tab_tech::delete_now ( )
privateslot

User requested tech deletion

Definition at line 381 of file tab_tech.cpp.

Referenced by tab_tech().

◆ edit_effects

void tab_tech::edit_effects ( )
privateslot

User wants to edit effects

Definition at line 474 of file tab_tech.cpp.

Referenced by tab_tech().

◆ edit_now

void tab_tech::edit_now ( )
privateslot

User requested tech edit dialog

Definition at line 490 of file tab_tech.cpp.

Referenced by tab_tech().

◆ initialize_new_tech()

bool tab_tech::initialize_new_tech ( struct advance padv)
private

Initialize new tech for use.

Definition at line 405 of file tab_tech.cpp.

Referenced by add_now().

◆ name_given

void tab_tech::name_given ( )
privateslot

User entered name for tech

Definition at line 348 of file tab_tech.cpp.

Referenced by tab_tech().

◆ prepare_req_button()

QMenu * tab_tech::prepare_req_button ( QToolButton button,
enum tech_req  rn 
)
private

Build tech req button

Definition at line 157 of file tab_tech.cpp.

Referenced by tab_tech().

◆ refresh()

void tab_tech::refresh ( )

Refresh the information.

Definition at line 139 of file tab_tech.cpp.

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

◆ req1_jump

void tab_tech::req1_jump ( )
privateslot

Req1 of the current tech selected.

Definition at line 264 of file tab_tech.cpp.

Referenced by tab_tech().

◆ req1_menu

void tab_tech::req1_menu ( QAction action)
privateslot

User selected tech to be req1

Definition at line 294 of file tab_tech.cpp.

Referenced by prepare_req_button().

◆ req2_jump

void tab_tech::req2_jump ( )
privateslot

Req2 of the current tech selected.

Definition at line 274 of file tab_tech.cpp.

Referenced by tab_tech().

◆ req2_menu

void tab_tech::req2_menu ( QAction action)
privateslot

User selected tech to be req2

Definition at line 312 of file tab_tech.cpp.

Referenced by prepare_req_button().

◆ root_req_jump

void tab_tech::root_req_jump ( )
privateslot

Root req of the current tech selected.

Definition at line 284 of file tab_tech.cpp.

Referenced by tab_tech().

◆ root_req_menu

void tab_tech::root_req_menu ( QAction action)
privateslot

User selected tech to be root_req

Definition at line 330 of file tab_tech.cpp.

Referenced by prepare_req_button().

◆ same_name_toggle

void tab_tech::same_name_toggle ( bool  checked)
privateslot

Toggled whether rule_name and name should be kept identical

Definition at line 463 of file tab_tech.cpp.

Referenced by tab_tech().

◆ select_tech

void tab_tech::select_tech ( )
privateslot

User selected tech from the list.

Definition at line 249 of file tab_tech.cpp.

Referenced by tab_tech().

◆ tech_name()

QString tab_tech::tech_name ( struct advance padv)
static

Display name of the tech

Definition at line 199 of file tab_tech.cpp.

Referenced by techs_to_menu(), and update_tech_info().

◆ techs_to_menu()

void tab_tech::techs_to_menu ( QMenu *  fill_menu)
static

Fill menu with all possible tech values

Definition at line 187 of file tab_tech.cpp.

Referenced by refresh().

◆ update_tech_info()

void tab_tech::update_tech_info ( struct advance adv)
private

Update info of the tech

Definition at line 211 of file tab_tech.cpp.

Referenced by add_now(), delete_now(), req1_jump(), req1_menu(), req2_jump(), req2_menu(), root_req_jump(), root_req_menu(), select_tech(), and tab_tech().

Field Documentation

◆ name

QLineEdit* tab_tech::name
private

Definition at line 53 of file tab_tech.h.

Referenced by name_given(), same_name_toggle(), tab_tech(), and update_tech_info().

◆ req1

QMenu* tab_tech::req1
private

Definition at line 58 of file tab_tech.h.

Referenced by refresh(), and tab_tech().

◆ req1_button

QToolButton* tab_tech::req1_button
private

Definition at line 55 of file tab_tech.h.

Referenced by tab_tech(), and update_tech_info().

◆ req2

QMenu* tab_tech::req2
private

Definition at line 59 of file tab_tech.h.

Referenced by refresh(), and tab_tech().

◆ req2_button

QToolButton* tab_tech::req2_button
private

Definition at line 56 of file tab_tech.h.

Referenced by tab_tech(), and update_tech_info().

◆ rname

QLineEdit* tab_tech::rname
private

Definition at line 54 of file tab_tech.h.

Referenced by name_given(), same_name_toggle(), tab_tech(), and update_tech_info().

◆ root_req

QMenu* tab_tech::root_req
private

Definition at line 60 of file tab_tech.h.

Referenced by refresh(), and tab_tech().

◆ root_req_button

QToolButton* tab_tech::root_req_button
private

Definition at line 57 of file tab_tech.h.

Referenced by tab_tech(), and update_tech_info().

◆ same_name

QCheckBox* tab_tech::same_name
private

Definition at line 62 of file tab_tech.h.

Referenced by name_given(), tab_tech(), and update_tech_info().

◆ selected

struct advance* tab_tech::selected
private

◆ tech_list

QListWidget* tab_tech::tech_list
private

Definition at line 61 of file tab_tech.h.

Referenced by refresh(), select_tech(), and tab_tech().

◆ ui

ruledit_gui* tab_tech::ui
private

Definition at line 48 of file tab_tech.h.

Referenced by delete_now(), edit_effects(), edit_now(), name_given(), and tab_tech().