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

#include <dialogs.h>

+ Inheritance diagram for races_dialog:

Public Member Functions

 races_dialog (struct player *pplayer, QWidget *parent=0)
 
 ~races_dialog ()
 
void refresh ()
 
void update_nationset_combo ()
 
- Public Member Functions inherited from qfc_dialog
 qfc_dialog (QWidget *parent)
 
void reactivate ()
 

Private Slots

void set_index (int index)
 
void nation_selected (const QItemSelection &sl, const QItemSelection &ds)
 
void style_selected (const QItemSelection &sl, const QItemSelection &ds)
 
void group_selected (const QItemSelection &sl, const QItemSelection &ds)
 
void nationset_changed (int index)
 
void leader_selected (int index)
 
void ok_pressed ()
 
void cancel_pressed ()
 
void random_pressed ()
 

Private Attributes

QGridLayoutmain_layout
 
QTableWidget * nation_tabs
 
QList< QWidget * > * nations_tabs_list
 
QTableWidget * selected_nation_tabs
 
QComboBoxleader_name
 
QComboBoxqnation_set
 
QButtonGroupsex_buttons
 
QRadioButtonis_male
 
QRadioButtonis_female
 
QTableWidget * styles
 
QTextEditdescription
 
QPushButton * ok_button
 
QPushButton * random_button
 
int selected_nation
 
int selected_style
 
struct playertplayer
 
int last_index
 

Additional Inherited Members

- Protected Member Functions inherited from qfc_dialog
void paintEvent (QPaintEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void mousePressEvent (QMouseEvent *event)
 
void mouseReleaseEvent (QMouseEvent *event)
 

Detailed Description

Definition at line 128 of file dialogs.h.

Constructor & Destructor Documentation

◆ races_dialog()

races_dialog::races_dialog ( struct player pplayer,
QWidget *  parent = 0 
)

Constructor for selecting nations

Definition at line 431 of file dialogs.cpp.

◆ ~races_dialog()

races_dialog::~races_dialog ( )

Destructor for races dialog

Definition at line 606 of file dialogs.cpp.

Member Function Documentation

◆ cancel_pressed

void races_dialog::cancel_pressed ( )
privateslot

Button canceling all selections has been pressed.

Definition at line 1097 of file dialogs.cpp.

Referenced by races_dialog().

◆ group_selected

void races_dialog::group_selected ( const QItemSelection sl,
const QItemSelection ds 
)
privateslot

Selected group of nation

Definition at line 680 of file dialogs.cpp.

Referenced by races_dialog().

◆ leader_selected

void races_dialog::leader_selected ( int  index)
privateslot

Sets selected leader

Definition at line 827 of file dialogs.cpp.

Referenced by races_dialog().

◆ nation_selected

void races_dialog::nation_selected ( const QItemSelection selected,
const QItemSelection deselcted 
)
privateslot

Sets selected nation and updates style and leaders selector

Definition at line 757 of file dialogs.cpp.

Referenced by races_dialog().

◆ nationset_changed

void races_dialog::nationset_changed ( int  index)
privateslot

User changed nation_set

Definition at line 1170 of file dialogs.cpp.

◆ ok_pressed

void races_dialog::ok_pressed ( )
privateslot

Button accepting all selection has been pressed, closes dialog if everything is ok

Definition at line 842 of file dialogs.cpp.

Referenced by races_dialog().

◆ random_pressed

void races_dialog::random_pressed ( )
privateslot

Sets random nation

Definition at line 1105 of file dialogs.cpp.

Referenced by races_dialog().

◆ refresh()

void races_dialog::refresh ( )

Sets first index to call update of nation list

Definition at line 614 of file dialogs.cpp.

Referenced by races_dialog(), races_toggles_set_sensitive(), and races_update_pickable().

◆ set_index

void races_dialog::set_index ( int  index)
privateslot

Sets new nations' group by current selection, index is used only when there is no current selection.

Definition at line 697 of file dialogs.cpp.

Referenced by group_selected(), races_dialog(), and refresh().

◆ style_selected

void races_dialog::style_selected ( const QItemSelection selected,
const QItemSelection deselcted 
)
privateslot

Sets selected style

Definition at line 808 of file dialogs.cpp.

Referenced by races_dialog().

◆ update_nationset_combo()

void races_dialog::update_nationset_combo ( )

Updates nation_set combo ( usually called from option change )

Definition at line 664 of file dialogs.cpp.

Referenced by races_dialog(), and update_nationset_combo().

Field Documentation

◆ description

QTextEdit* races_dialog::description
private

Definition at line 141 of file dialogs.h.

Referenced by nation_selected(), and races_dialog().

◆ is_female

QRadioButton* races_dialog::is_female
private

Definition at line 139 of file dialogs.h.

Referenced by leader_selected(), and races_dialog().

◆ is_male

QRadioButton* races_dialog::is_male
private

Definition at line 138 of file dialogs.h.

Referenced by leader_selected(), and races_dialog().

◆ last_index

int races_dialog::last_index
private

Definition at line 166 of file dialogs.h.

Referenced by set_index().

◆ leader_name

QComboBox* races_dialog::leader_name
private

Definition at line 135 of file dialogs.h.

Referenced by leader_selected(), nation_selected(), ok_pressed(), and races_dialog().

◆ main_layout

QGridLayout* races_dialog::main_layout
private

Definition at line 131 of file dialogs.h.

Referenced by races_dialog().

◆ nation_tabs

QTableWidget* races_dialog::nation_tabs
private

Definition at line 132 of file dialogs.h.

Referenced by races_dialog(), refresh(), and set_index().

◆ nations_tabs_list

QList<QWidget*>* races_dialog::nations_tabs_list
private

Definition at line 133 of file dialogs.h.

◆ ok_button

QPushButton* races_dialog::ok_button
private

Definition at line 142 of file dialogs.h.

Referenced by races_dialog().

◆ qnation_set

QComboBox* races_dialog::qnation_set
private

Definition at line 136 of file dialogs.h.

Referenced by nationset_changed(), races_dialog(), and update_nationset_combo().

◆ random_button

QPushButton* races_dialog::random_button
private

Definition at line 143 of file dialogs.h.

Referenced by races_dialog().

◆ selected_nation

int races_dialog::selected_nation
private

Definition at line 163 of file dialogs.h.

Referenced by nation_selected(), ok_pressed(), and races_dialog().

◆ selected_nation_tabs

QTableWidget* races_dialog::selected_nation_tabs
private

Definition at line 134 of file dialogs.h.

Referenced by races_dialog(), and set_index().

◆ selected_style

int races_dialog::selected_style
private

Definition at line 164 of file dialogs.h.

Referenced by ok_pressed(), races_dialog(), and style_selected().

◆ sex_buttons

QButtonGroup* races_dialog::sex_buttons
private

Definition at line 137 of file dialogs.h.

Referenced by ok_pressed(), and races_dialog().

◆ styles

QTableWidget* races_dialog::styles
private

Definition at line 140 of file dialogs.h.

Referenced by nation_selected(), and races_dialog().

◆ tplayer

struct player* races_dialog::tplayer
private

Definition at line 165 of file dialogs.h.

Referenced by nation_selected(), ok_pressed(), races_dialog(), and random_pressed().