Emergency 20 Dokumentation  4.2.0
VehicleSelectionWindow.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 #include <qsf/gui/GuiDocument.h>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Namespace ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25 
26 
27  //[-------------------------------------------------------]
28  //[ Classes ]
29  //[-------------------------------------------------------]
42  {
43 
44 
45  //[-------------------------------------------------------]
46  //[ Public methods ]
47  //[-------------------------------------------------------]
48  public:
49  explicit VehicleSelectionWindow(qsf::GuiContext& guiContext);
50  virtual ~VehicleSelectionWindow();
51 
61  void enableItem(uint32 itemId, bool state);
62 
67  void enableCloseButton(bool enable);
68 
78  void blinkItem(uint32 itemId, bool blink);
79 
84  units::Department getCurrentDepartment() const;
85 
90  void resetCurrentDepartment();
91 
96  void setupWindow(units::Department department, float scrollTo = 0.0f);
97 
98  void selectUnitByIndex(int i);
99 
100 
101  //[-------------------------------------------------------]
102  //[ Public virtual qsf::GuiDocument methods ]
103  //[-------------------------------------------------------]
104  public:
105  virtual void processEvent(const std::string& eventKey, Rocket::Core::Event& event) override;
106 
107 
108  //[-------------------------------------------------------]
109  //[ Private virtual qsf::GuiDocument methods ]
110  //[-------------------------------------------------------]
111  private:
112  virtual bool onPreShow() override;
113  virtual void onPreHide() override;
114 
115 
116  //[-------------------------------------------------------]
117  //[ Private methods ]
118  //[-------------------------------------------------------]
119  private:
120  void updateOrderSelection(const qsf::MessageParameters& parameters);
121  void pressedElement(Rocket::Core::Element& pressedElement);
122 
123 
124  //[-------------------------------------------------------]
125  //[ Private data ]
126  //[-------------------------------------------------------]
127  private:
128  BlinkButton mBlinkButton;
129  units::Department mCurrentDepartment;
130  size_t mCurrentEntryCount;
131  qsf::MessageProxy mUpdateSelectionProxy;
132 
133 
134  };
135 
136 
137 //[-------------------------------------------------------]
138 //[ Namespace ]
139 //[-------------------------------------------------------]
140 } // em5
Definition: ActionPriority.h:13
Message parameters class.
Definition: MessageParameters.h:34
unsigned int uint32
Definition: PlatformTypes.h:181
Department
Definition: Department.h:19
Graphical User Interface (GUI) document base class.
Definition: GuiDocument.h:51
#define EM5_API_EXPORT
Definition: Export.h:28
Message listener proxy class.
Definition: MessageProxy.h:47
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
Vehicle selection window.
Definition: VehicleSelectionWindow.h:41