Freeciv21
Develop your civilization from humble roots to a global empire
page_pregame Class Reference

#include <page_pregame.h>

+ Inheritance diagram for page_pregame:
+ Collaboration diagram for page_pregame:

Public Member Functions

 page_pregame (QWidget *, fc_client *)
 
 ~page_pregame () override
 
void update_start_page ()
 Updates start page (start page = client connected to server, but game not started) More...
 
void set_rulesets (int num_rulesets, QStringList rulesets)
 
void update_vote ()
 

Private Slots

void start_page_menu (QPoint pos)
 Context menu on some player, arg Qpoint specifies some pixel on screen. More...
 
void send_fake_chat_message (const QString &message)
 Slot to send fake chat messages. More...
 

Private Member Functions

void update_buttons ()
 Updates observe button in case user started observing manually. More...
 
void chat_message_received (const QString &message, const struct text_tag_list *tags) override
 Appends text to chat window. More...
 
void slot_pregame_observe ()
 User clicked Observe button in START_PAGE. More...
 
void slot_pregame_start ()
 User clicked Start in START_PAGE. More...
 
- Private Member Functions inherited from chat_listener
 chat_listener ()
 Constructor. More...
 
void send_chat_message (const QString &message)
 Sends commands to server, but first searches for custom keys, if it finds then it makes custom action. More...
 
QString back_in_history ()
 Goes back one position in history, and returns the message at the new position. More...
 
QString forward_in_history ()
 Goes forward one position in history, and returns the message at the new position. More...
 
void reset_history_position ()
 Go to the end of the history. More...
 
- Private Member Functions inherited from listener< chat_listener >
 listener ()
 
virtual ~listener ()
 
void listen ()
 

Private Attributes

Ui::FormPagePregame ui
 
fc_clientking
 

Additional Inherited Members

- Private Types inherited from listener< chat_listener >
typedef chat_listener type_t
 
- Static Private Member Functions inherited from listener< chat_listener >
static void invoke (_member_fct_ function, _args_ &&...args)
 
- Static Private Attributes inherited from chat_listener
static const int HISTORY_END = -1
 

Detailed Description

Definition at line 23 of file page_pregame.h.

Constructor & Destructor Documentation

◆ page_pregame()

page_pregame::page_pregame ( QWidget *  parent,
fc_client gui 
)

Definition at line 34 of file page_pregame.cpp.

◆ ~page_pregame()

page_pregame::~page_pregame ( )
overridedefault

Member Function Documentation

◆ chat_message_received()

void page_pregame::chat_message_received ( const QString &  message,
const struct text_tag_list *  tags 
)
overrideprivatevirtual

Appends text to chat window.

Reimplemented from chat_listener.

Definition at line 578 of file page_pregame.cpp.

◆ send_fake_chat_message

void page_pregame::send_fake_chat_message ( const QString &  message)
privateslot

Slot to send fake chat messages.

Do not use in new code.

Definition at line 570 of file page_pregame.cpp.

Referenced by start_page_menu().

◆ set_rulesets()

void page_pregame::set_rulesets ( int  num_rulesets,
QStringList  rulesets 
)

Definition at line 70 of file page_pregame.cpp.

◆ slot_pregame_observe()

void page_pregame::slot_pregame_observe ( )
private

User clicked Observe button in START_PAGE.

Definition at line 594 of file page_pregame.cpp.

Referenced by page_pregame().

◆ slot_pregame_start()

void page_pregame::slot_pregame_start ( )
private

User clicked Start in START_PAGE.

Definition at line 612 of file page_pregame.cpp.

Referenced by page_pregame().

◆ start_page_menu

void page_pregame::start_page_menu ( QPoint  pos)
privateslot

Context menu on some player, arg Qpoint specifies some pixel on screen.

qvar = 0 -> selected label -> do nothing qvar = 1 -> selected player (stored in qvar2)

Set AI difficulty submenu

Put to Team X submenu

Definition at line 388 of file page_pregame.cpp.

Referenced by page_pregame().

◆ update_buttons()

void page_pregame::update_buttons ( )
private

Updates observe button in case user started observing manually.

Definition at line 322 of file page_pregame.cpp.

Referenced by update_start_page().

◆ update_start_page()

void page_pregame::update_start_page ( )

Updates start page (start page = client connected to server, but game not started)

Inserts playing players, observing custom players, and AI)

find any custom observers

Insert global observers

Insert detached

Definition at line 80 of file page_pregame.cpp.

◆ update_vote()

void page_pregame::update_vote ( )

Definition at line 75 of file page_pregame.cpp.

Member Data Documentation

◆ king

fc_client* page_pregame::king
private

Definition at line 42 of file page_pregame.h.

Referenced by page_pregame().

◆ ui

Ui::FormPagePregame page_pregame::ui
private