Emergency 20 Dokumentation  4.2.0
StartMenuInstalled.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 //[-------------------------------------------------------]
13 #include <qsf/gui/GuiDocument.h>
14 
15 #include <boost/signals2.hpp>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Namespace ]
20 //[-------------------------------------------------------]
21 namespace em5
22 {
23 
24 
25  //[-------------------------------------------------------]
26  //[ Classes ]
27  //[-------------------------------------------------------]
33  {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Public Boost signals ]
38  //[-------------------------------------------------------]
39  public:
40  boost::signals2::signal<void ()> Login;
41 
42 
43  //[-------------------------------------------------------]
44  //[ Public methods ]
45  //[-------------------------------------------------------]
46  public:
51  explicit StartMenuInstalled(qsf::GuiContext& guiContext);
52 
57  inline virtual ~StartMenuInstalled();
58 
59  void onUpdateMessageBoxAnswer(bool isInstallUpdate);
60  inline uint32 getNewsId() const;
61 
62 
63  //[-------------------------------------------------------]
64  //[ Public virtual qsf::GuiDocument methods ]
65  //[-------------------------------------------------------]
66  public:
67  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
68 
69 
70  //[-------------------------------------------------------]
71  //[ Private virtual qsf::GuiDocument methods ]
72  //[-------------------------------------------------------]
73  private:
74  virtual bool onPreShow() override;
75  virtual void onPreHide() override;
76 
77 
78  //[-------------------------------------------------------]
79  //[ Private methods ]
80  //[-------------------------------------------------------]
81  private:
82  void setupGui();
83  void onReloadGui();
84  void hideAccountField();
85  void showAccountField();
86  void fillNewsField();
87  void switchLoginFieldToOnlineMessage();
88  void updateLoginButtonState();
89  void startUpdateCheck();
90  void onUpdateCheckFinished();
91  void onUpdateCheckFailed();
92  void onUpdateProgress(uint32 currentFile, uint32 totalFiles, uint64 currentBytes, uint64 totalBytes);
93  void onUpdateFailed();
94  void onShowPatchScreen(bool yes);
95  void doLogin();
96  void updateRatingReminder();
97  void ratingReminderResponse(bool state);
98 
99 
100  //[-------------------------------------------------------]
101  //[ Private data ]
102  //[-------------------------------------------------------]
103  private:
104  bool mIsUpdateCheckPending;
105  bool mAutoLogin;
106  bool mUpdateCheckAlreadyDone;
107  bool mTryToLogin;
108  uint32 mNewsId;
109 
110 
111  };
112 
113 
114 //[-------------------------------------------------------]
115 //[ Namespace ]
116 //[-------------------------------------------------------]
117 } // em5
118 
119 
120 //[-------------------------------------------------------]
121 //[ Implementation ]
122 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
void onUpdateMessageBoxAnswer(bool isInstallUpdate)
unsigned int uint32
Definition: PlatformTypes.h:181
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
virtual ~StartMenuInstalled()
Destructor.
Definition: StartMenuInstalled-inl.h:14
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
uint64_t uint64
Definition: PlatformTypes.h:184
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
uint32 getNewsId() const
Definition: StartMenuInstalled-inl.h:19
boost::signals2::signal< void()> Login
This Boost signal is emitted after the login was done.
Definition: StartMenuInstalled.h:40
EMERGENCY 5 start menu installed GUI.
Definition: StartMenuInstalled.h:32
StartMenuInstalled(qsf::GuiContext &guiContext)
Constructor.