Freeciv21
Develop your civilization from humble roots to a global empire
page_pregame.h
Go to the documentation of this file.
1 /**************************************************************************
2  ____ Copyright (c) 1996-2020 Freeciv21 and Freeciv
3  / \__ contributors. This file is part of Freeciv21.
4 |\ / @ \ Freeciv21 is free software: you can redistribute it
5 \ \_______| \ .:|> and/or modify it under the terms of the GNU
6  \ ##| | \__/ General Public License as published by the Free
7  | ####\__/ \ Software Foundation, either version 3 of the License,
8  / / ## \| or (at your option) any later version.
9  / /__________\ \ You should have received a copy of the
10  L_JJ \__JJ GNU General Public License along with Freeciv21.
11  If not, see https://www.gnu.org/licenses/.
12 **************************************************************************/
13 #pragma once
14 
15 #include <QWidget>
16 
17 class fc_client;
18 class pregame_options;
19 class pregamevote;
20 #include "pregameoptions.h" // before ui
21 #include "ui_page_pregame.h"
22 
23 class page_pregame : public QWidget, private chat_listener {
24  Q_OBJECT
25 public:
26  page_pregame(QWidget *, fc_client *);
27  ~page_pregame() override;
28  void update_start_page();
29  void set_rulesets(int num_rulesets, QStringList rulesets);
30  void update_vote();
31 private slots:
32  void start_page_menu(QPoint pos);
33  void send_fake_chat_message(const QString &message);
34 
35 private:
36  void update_buttons();
37  void chat_message_received(const QString &message,
38  const struct text_tag_list *tags) override;
39  void slot_pregame_observe();
40  void slot_pregame_start();
41  Ui::FormPagePregame ui;
42  fc_client *king; // serve the King
43 };
Ui::FormPagePregame ui
Definition: page_pregame.h:41
void update_buttons()
Updates observe button in case user started observing manually.
void send_fake_chat_message(const QString &message)
Slot to send fake chat messages.
void slot_pregame_start()
User clicked Start in START_PAGE.
fc_client * king
Definition: page_pregame.h:42
void start_page_menu(QPoint pos)
Context menu on some player, arg Qpoint specifies some pixel on screen.
void set_rulesets(int num_rulesets, QStringList rulesets)
void update_vote()
void slot_pregame_observe()
User clicked Observe button in START_PAGE.
~page_pregame() override
void chat_message_received(const QString &message, const struct text_tag_list *tags) override
Appends text to chat window.
page_pregame(QWidget *, fc_client *)
void update_start_page()
Updates start page (start page = client connected to server, but game not started)