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

#include <tab_counters.h>

+ Inheritance diagram for tab_counter:

Public Member Functions

 tab_counter (ruledit_gui *ui_in)
 
void refresh ()
 

Static Public Member Functions

static void techs_to_menu (QMenu *fill_menu)
 
static QString counter_name (struct counter *padv)
 

Private Slots

void update_counter_info (struct counter *counter)
 
void checkpoint_given (int val)
 
void default_given (int val)
 
void name_given ()
 
void select_counter ()
 
void add_now ()
 
void delete_now ()
 
void same_name_toggle (bool checked)
 
void edit_effects ()
 
bool initialize_new_counter (struct counter *padv)
 
void counter_behaviour_selected (int item)
 

Private Attributes

ruledit_guiui
 
QLineEdit * name
 
QLineEdit * rname
 
QSpinBoxcheckpoint
 
QSpinBoxdef
 
QComboBoxtype
 
QCheckBoxsame_name
 
QPushButton * effects_button
 
QListWidgetcounter_list
 
struct counterselected
 

Detailed Description

Definition at line 35 of file tab_counters.h.

Constructor & Destructor Documentation

◆ tab_counter()

tab_counter::tab_counter ( ruledit_gui ui_in)
explicit

Setup tab_counter object

Definition at line 43 of file tab_counters.cpp.

Member Function Documentation

◆ add_now

void tab_counter::add_now ( )
privateslot

User requested new counter

Definition at line 333 of file tab_counters.cpp.

Referenced by tab_counter().

◆ checkpoint_given

void tab_counter::checkpoint_given ( int  val)
privateslot

User entered checkpoint value

Definition at line 242 of file tab_counters.cpp.

Referenced by tab_counter().

◆ counter_behaviour_selected

void tab_counter::counter_behaviour_selected ( int  item)
privateslot

Called when counter behaviour is set by user

Definition at line 161 of file tab_counters.cpp.

Referenced by tab_counter().

◆ counter_name()

static QString tab_counter::counter_name ( struct counter padv)
static

◆ default_given

void tab_counter::default_given ( int  val)
privateslot

User entered default value

Definition at line 253 of file tab_counters.cpp.

Referenced by tab_counter().

◆ delete_now

void tab_counter::delete_now ( )
privateslot

User requested counter deletion

Definition at line 292 of file tab_counters.cpp.

Referenced by tab_counter().

◆ edit_effects

void tab_counter::edit_effects ( )
privateslot

User wants to edit effects

Definition at line 379 of file tab_counters.cpp.

Referenced by tab_counter().

◆ initialize_new_counter

bool tab_counter::initialize_new_counter ( struct counter counter)
privateslot

Initialize new counter for use.

Definition at line 313 of file tab_counters.cpp.

Referenced by add_now().

◆ name_given

void tab_counter::name_given ( )
privateslot

User entered name for counter

Definition at line 264 of file tab_counters.cpp.

Referenced by tab_counter().

◆ refresh()

void tab_counter::refresh ( )

Refresh the information.

Definition at line 179 of file tab_counters.cpp.

Referenced by add_now(), counter_behaviour_selected(), delete_now(), name_given(), and tab_counter().

◆ same_name_toggle

void tab_counter::same_name_toggle ( bool  checked)
privateslot

Toggled whether rule_name and name should be kept identical

Definition at line 368 of file tab_counters.cpp.

Referenced by tab_counter().

◆ select_counter

void tab_counter::select_counter ( )
privateslot

User selected counter from the list.

Definition at line 222 of file tab_counters.cpp.

Referenced by tab_counter().

◆ techs_to_menu()

static void tab_counter::techs_to_menu ( QMenu *  fill_menu)
static

◆ update_counter_info

void tab_counter::update_counter_info ( struct counter counter)
privateslot

Update info of the counter

Definition at line 193 of file tab_counters.cpp.

Referenced by add_now(), counter_behaviour_selected(), delete_now(), select_counter(), and tab_counter().

Field Documentation

◆ checkpoint

QSpinBox* tab_counter::checkpoint
private

Definition at line 50 of file tab_counters.h.

Referenced by tab_counter(), and update_counter_info().

◆ counter_list

QListWidget* tab_counter::counter_list
private

Definition at line 56 of file tab_counters.h.

Referenced by refresh(), select_counter(), and tab_counter().

◆ def

QSpinBox* tab_counter::def
private

Definition at line 51 of file tab_counters.h.

Referenced by tab_counter(), and update_counter_info().

◆ effects_button

QPushButton* tab_counter::effects_button
private

Definition at line 54 of file tab_counters.h.

Referenced by tab_counter().

◆ name

QLineEdit* tab_counter::name
private

Definition at line 48 of file tab_counters.h.

Referenced by name_given(), same_name_toggle(), tab_counter(), and update_counter_info().

◆ rname

QLineEdit* tab_counter::rname
private

Definition at line 49 of file tab_counters.h.

Referenced by name_given(), same_name_toggle(), tab_counter(), and update_counter_info().

◆ same_name

QCheckBox* tab_counter::same_name
private

Definition at line 53 of file tab_counters.h.

Referenced by tab_counter().

◆ selected

struct counter* tab_counter::selected
private

◆ type

QComboBox* tab_counter::type
private

Definition at line 52 of file tab_counters.h.

Referenced by counter_behaviour_selected(), and tab_counter().

◆ ui

ruledit_gui* tab_counter::ui
private

Definition at line 46 of file tab_counters.h.

Referenced by delete_now(), edit_effects(), name_given(), and tab_counter().