Emergency 20 Dokumentation  4.2.0
MaterialCacheHeatingDialog.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/job/JobProxy.h>
14 #include <qsf/gui/GuiDocument.h>
16 #include <qsf/time/Stopwatch.h>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  class PipelineStateCompiler;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public definitions ]
48  //[-------------------------------------------------------]
49  public:
51  {
59  };
60 
61 
62  //[-------------------------------------------------------]
63  //[ Public methods ]
64  //[-------------------------------------------------------]
65  public:
70  explicit MaterialCacheHeatingDialog(qsf::GuiContext& guiContext);
71 
77 
78 
79  //[-------------------------------------------------------]
80  //[ Public virtual qsf::GuiDocument methods ]
81  //[-------------------------------------------------------]
82  public:
83  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
84 
85 
86  //[-------------------------------------------------------]
87  //[ Public virtual qsf::InputListener methods ]
88  //[-------------------------------------------------------]
89  public:
90  virtual void eventReceived(const qsf::InputEvent& inputEvent, Response& response) override;
91 
92 
93  //[-------------------------------------------------------]
94  //[ Private virtual qsf::GuiDocument methods ]
95  //[-------------------------------------------------------]
96  private:
97  virtual bool onPreShow() override;
98  virtual void onPreHide() override;
99 
100 
101  //[-------------------------------------------------------]
102  //[ Private methods ]
103  //[-------------------------------------------------------]
104  private:
105  void setAnimationState(AnimationState animationState);
106  void setCompletePercentage(float percentage);
107  float updatePercentage();
108  void onUpdateAnimation(const qsf::JobArguments& jobArguments);
109  void cancelMaterialCacheHeating();
110  void showStartMenu();
111 
112 
113  //[-------------------------------------------------------]
114  //[ Private data ]
115  //[-------------------------------------------------------]
116  private:
117  qsf::PipelineStateCompiler& mPipelineStateCompiler;
118  qsf::JobProxy mAnimationJobProxy;
119  AnimationState mAnimationState;
120  uint32 mTotalNumberOfCompilerRequests;
121  qsf::Stopwatch mStopwatch;
122 
123 
124  };
125 
126 
127 //[-------------------------------------------------------]
128 //[ Namespace ]
129 //[-------------------------------------------------------]
130 } // em5
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
Simple and easy to use low resolution stopwatch class.
Definition: Stopwatch.h:51
Abstract pipeline state compiler class.
Definition: PipelineStateCompiler.h:44
unsigned int uint32
Definition: PlatformTypes.h:181
Definition: MaterialCacheHeatingDialog.h:53
Input listener class.
Definition: InputListener.h:43
Input event base class.
Definition: InputEvent.h:40
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
Definition: MaterialCacheHeatingDialog.h:57
Definition: MaterialCacheHeatingDialog.h:52
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
Definition: PickupPersonByParamedicAction.h:21
virtual void eventReceived(const qsf::InputEvent &inputEvent, Response &response) override
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
Definition: MaterialCacheHeatingDialog.h:55
Definition: MaterialCacheHeatingDialog.h:56
virtual ~MaterialCacheHeatingDialog()
Destructor.
virtual void processEvent(const std::string &eventKey, Rocket::Core::Event &event) override
AnimationState
Definition: MaterialCacheHeatingDialog.h:50
EMERGENCY 5 material cache heating dialog window GUI.
Definition: MaterialCacheHeatingDialog.h:42
AnimationState
Definition: IngameMainEventSuccessWindow.h:26
MaterialCacheHeatingDialog(qsf::GuiContext &guiContext)
Constructor.
Definition: MaterialCacheHeatingDialog.h:58
Definition: MaterialCacheHeatingDialog.h:54