Emergency 20 Dokumentation  4.2.0
MultiplayerWindow.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
15 
16 
17 //[-------------------------------------------------------]
18 //[ Forward declarations ]
19 //[-------------------------------------------------------]
20 namespace em5
21 {
22  namespace multiplayer
23  {
24  struct HostEntry;
25  }
26 }
27 
28 
29 //[-------------------------------------------------------]
30 //[ Namespace ]
31 //[-------------------------------------------------------]
32 namespace em5
33 {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Classes ]
38  //[-------------------------------------------------------]
44  {
45 
46 
47  //[-------------------------------------------------------]
48  //[ Public methods ]
49  //[-------------------------------------------------------]
50  public:
51  explicit MultiplayerWindow(qsf::GuiContext& guiContext);
52  virtual ~MultiplayerWindow();
53  void updateDataGrid();
54 
55 
56  //[-------------------------------------------------------]
57  //[ Public virtual qsf::GuiDocument methods ]
58  //[-------------------------------------------------------]
59  public:
60  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
61 
62 
63  //[-------------------------------------------------------]
64  //[ Protected virtual em5::MainMenuWindowBase methods ]
65  //[-------------------------------------------------------]
66  protected:
67  virtual void onGoingBack() override;
68 
69 
70  //[-------------------------------------------------------]
71  //[ Protected virtual em5::GuiHotReloadSupport methods ]
72  //[-------------------------------------------------------]
73  protected:
74  virtual void onReloadGui() override;
75  virtual bool onDocumentPreShow() override;
76  virtual void onDocumentPreHide() override;
77 
78 
79  //[-------------------------------------------------------]
80  //[ Private methods ]
81  //[-------------------------------------------------------]
82  private:
83  void setupGui();
84  void onCurrentStateChanged(multiplayer::SessionBase::State prevState, multiplayer::SessionBase::State newState);
85  void onAutoUpdateServerList();
86 
87 
88  //[-------------------------------------------------------]
89  //[ Private data ]
90  //[-------------------------------------------------------]
91  private:
92  const multiplayer::HostEntry* mSelectedServer;
93  multiplayer::client::Client* mMultiplayerClient;
94  qsf::JobProxy mRefreshUpdater;
95 
96 
97  };
98 
99 
100 //[-------------------------------------------------------]
101 //[ Namespace ]
102 //[-------------------------------------------------------]
103 } // em5
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
virtual void onReloadGui() override
Gets called when the GUI should be reloaded.
Multiplayer window.
Definition: MultiplayerWindow.h:43
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
virtual bool onDocumentPreShow() override
State
Definition: SessionBase.h:93
Base window for main menu windows.
Definition: MainMenuWindowBase.h:40
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual void onDocumentPreHide() override
virtual ~MultiplayerWindow()
MultiplayerWindow(qsf::GuiContext &guiContext)
virtual void onGoingBack() override
EMERGENCY 5 multiplayer client class.
Definition: Client.h:69
Definition: MatchmakingTypes.h:47