Numworks Epsilon  1.4.1
Graphing Calculator Operating System
led_test_controller.h
Go to the documentation of this file.
1 #ifndef HARDWARE_TEST_LED_TEST_CONTROLLER_H
2 #define HARDWARE_TEST_LED_TEST_CONTROLLER_H
3 
4 #include <escher.h>
6 #include "arrow_view.h"
7 
8 namespace HardwareTest {
9 
11 public:
13  View * view() override;
14  bool handleEvent(Ion::Events::Event event) override;
15  void viewWillAppear() override;
16 private:
17  class ContentView : public SolidColorView {
18  public:
19  ContentView();
20  SolidColorView * LEDColorIndicatorView();
21  private:
22  void layoutSubviews() override;
23  int numberOfSubviews() const override;
24  View * subviewAtIndex(int index) override;
25  SolidColorView m_ledColorIndicatorView;
26  SolidColorView m_ledColorOutlineView;
27  BufferTextView m_ledView;
28  ArrowView m_arrowView;
29  };
30  void setLEDColor(KDColor color);
31  constexpr static KDCoordinate k_arrowLength = 100;
32  constexpr static KDCoordinate k_arrowMargin = 20;
33  constexpr static KDCoordinate k_indicatorSize = 20;
34  constexpr static KDCoordinate k_indicatorMargin = 8;
35  constexpr static int k_numberOfColors = 5;
36  constexpr static KDColor k_LEDColors[k_numberOfColors] = {KDColorWhite, KDColorRed, KDColorBlue, KDColorGreen, KDColorBlack};
37  static KDColor LEDColorAtIndex(int i);
38  ContentView m_view;
39  int m_LEDColorIndex;
40  BatteryTestController m_batteryTestController;
41 };
42 
43 }
44 
45 #endif
46 
constexpr KDColor KDColorBlue
Definition: color.h:45
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
constexpr KDColor KDColorWhite
Definition: color.h:42
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: color.h:6
constexpr KDColor KDColorRed
Definition: color.h:43
Definition: view.h:23
constexpr KDColor KDColorGreen
Definition: color.h:44
bool handleEvent(Ion::Events::Event event) override
LEDTestController(Responder *parentResponder)