mp::connect::side Class Reference

#include <multiplayer_connect.hpp>

Collaboration diagram for mp::connect::side:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 side (connect &parent, const config &cfg, int index)
 side (const side &a)
void add_widgets_to_scrollpane (gui::scrollpane &pane, int pos)
void process_event ()
bool changed ()
 Returns true if this side changed since last call to changed().
config get_config () const
 Gets a config object representing this side.
bool available () const
 Returns true if this side is waiting for a network player and players allowed.
bool allow_player () const
 Return true if players are allowed to take this side.
void set_controller (mp::controller controller)
 Sets the controller of a side.
mp::controller get_controller () const
void update_user_list ()
 Adds an user to the user list combo.
const std::string & get_id () const
 Returns the username of this side.
void set_id (const std::string &id)
 Sets the username of this side.
const std::string & get_save_id () const
void import_network_user (const config &data)
 Imports data from the network into this side, and updates the UI accordingly.
void reset (mp::controller controller)
 Resets this side to its default state, and updates the UI accordingly.
void resolve_random ()
 Resolves the random leader / factions.
void hide_ai_algorithm_combo (bool invis)

Private Member Functions

void init_ai_algorithm_combo ()
void update_ai_algorithm_combo ()
void update_controller_ui ()
void update_ui ()

Private Attributes

connectparent_
 The mp::connect widget owning this mp::connect::side.
config cfg_
 A non-const config.
int index_
std::string id_
std::string save_id_
mp::controller controller_
int faction_
int team_
int colour_
int gold_
int income_
std::string leader_
std::string gender_
std::string ai_algorithm_
gui::label player_number_
gui::combo combo_controller_
gui::label orig_controller_
gui::combo combo_ai_algorithm_
gui::combo combo_faction_
gui::combo combo_leader_
gui::combo combo_gender_
gui::combo combo_team_
gui::combo combo_colour_
gui::slider slider_gold_
gui::slider slider_income_
gui::label label_gold_
gui::label label_income_
bool allow_player_
bool enabled_
bool changed_
leader_list_manager llm_


Detailed Description

Definition at line 48 of file multiplayer_connect.hpp.


Constructor & Destructor Documentation

mp::connect::side::side ( connect parent,
const config cfg,
int  index 
)

mp::connect::side::side ( const side a  ) 


Member Function Documentation

void mp::connect::side::add_widgets_to_scrollpane ( gui::scrollpane pane,
int  pos 
)

void mp::connect::side::process_event (  ) 

bool mp::connect::side::changed (  ) 

Returns true if this side changed since last call to changed().

Definition at line 454 of file multiplayer_connect.cpp.

References changed_.

config mp::connect::side::get_config (  )  const

bool mp::connect::side::available (  )  const

Returns true if this side is waiting for a network player and players allowed.

Definition at line 461 of file multiplayer_connect.cpp.

References allow_player_, mp::CNTR_NETWORK, controller_, and id_.

bool mp::connect::side::allow_player (  )  const

Return true if players are allowed to take this side.

Definition at line 466 of file multiplayer_connect.cpp.

References allow_player_.

void mp::connect::side::set_controller ( mp::controller  controller  ) 

Sets the controller of a side.

Definition at line 709 of file multiplayer_connect.cpp.

References controller_, id_, and update_ui().

mp::controller mp::connect::side::get_controller (  )  const

Definition at line 717 of file multiplayer_connect.cpp.

References controller_.

void mp::connect::side::update_user_list (  ) 

Adds an user to the user list combo.

Definition at line 722 of file multiplayer_connect.cpp.

References combo_controller_, id_, parent_, mp::connect::player_types_, gui::combo::set_items(), update_controller_ui(), and mp::connect::users_.

const std::string & mp::connect::side::get_id (  )  const

Returns the username of this side.

Definition at line 745 of file multiplayer_connect.cpp.

References id_.

void mp::connect::side::set_id ( const std::string &  id  ) 

Sets the username of this side.

Definition at line 750 of file multiplayer_connect.cpp.

References controller_, mp::connect::find_player(), id_, parent_, update_ui(), and mp::connect::users_.

const std::string & mp::connect::side::get_save_id (  )  const

Definition at line 760 of file multiplayer_connect.cpp.

References save_id_.

void mp::connect::side::import_network_user ( const config data  ) 

void mp::connect::side::reset ( mp::controller  controller  ) 

void mp::connect::side::resolve_random (  ) 

void mp::connect::side::hide_ai_algorithm_combo ( bool  invis  ) 

void mp::connect::side::init_ai_algorithm_combo (  )  [private]

void mp::connect::side::update_ai_algorithm_combo (  )  [inline, private]

void mp::connect::side::update_controller_ui (  )  [private]

void mp::connect::side::update_ui (  )  [private]


Member Data Documentation

A non-const config.

Be careful not to insert keys when only reading. (Use cfg_.get_attribute().)

Definition at line 109 of file multiplayer_connect.hpp.

Referenced by get_config(), and side().

Definition at line 112 of file multiplayer_connect.hpp.

Referenced by get_config().

std::string mp::connect::side::id_ [private]

std::string mp::connect::side::save_id_ [private]

Definition at line 114 of file multiplayer_connect.hpp.

Referenced by get_save_id().

int mp::connect::side::team_ [private]

Definition at line 117 of file multiplayer_connect.hpp.

Referenced by get_config(), process_event(), side(), and update_ui().

Definition at line 118 of file multiplayer_connect.hpp.

Referenced by get_config(), process_event(), side(), and update_ui().

int mp::connect::side::gold_ [private]

Definition at line 119 of file multiplayer_connect.hpp.

Referenced by get_config(), process_event(), and update_ui().

Definition at line 120 of file multiplayer_connect.hpp.

Referenced by get_config(), process_event(), and update_ui().

std::string mp::connect::side::leader_ [private]

Definition at line 121 of file multiplayer_connect.hpp.

Referenced by get_config(), resolve_random(), and side().

std::string mp::connect::side::gender_ [private]

Definition at line 122 of file multiplayer_connect.hpp.

Referenced by get_config(), resolve_random(), and side().

std::string mp::connect::side::ai_algorithm_ [private]

Definition at line 123 of file multiplayer_connect.hpp.

Referenced by get_config(), init_ai_algorithm_combo(), process_event(), and side().

Definition at line 127 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane().

Definition at line 129 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), and hide_ai_algorithm_combo().

Definition at line 134 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), process_event(), side(), and update_ui().

Definition at line 135 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), process_event(), side(), and update_ui().

Definition at line 136 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), process_event(), side(), and update_ui().

Definition at line 137 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), process_event(), side(), and update_ui().

Definition at line 138 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), process_event(), side(), and update_ui().

Definition at line 139 of file multiplayer_connect.hpp.

Referenced by add_widgets_to_scrollpane(), process_event(), side(), and update_ui().

Definition at line 141 of file multiplayer_connect.hpp.

Referenced by allow_player(), available(), get_config(), and side().

Definition at line 143 of file multiplayer_connect.hpp.

Referenced by changed(), and process_event().


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs