Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
status_bar.h
Go to the documentation of this file.
1//
2// Copyright (c) 2023, DefenceX PTY LTD
3//
4// This file is part of the VivoeX project developed by DefenceX.
5//
6// Licensed under the Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
7// License. See the LICENSE file in the project root for full license details.
8//
12
13#ifndef HMICORE_WIDGETS_TABLE_STATUS_BAR_H_
14#define HMICORE_WIDGETS_TABLE_STATUS_BAR_H_
15
16#include <stdint.h>
17
18#include <string>
19
23
24namespace gva {
25
31 public:
38 explicit WidgetStatusBar(const RendererGva &renderer, TouchGva *touch);
39
44 ~WidgetStatusBar() final = default;
45
51 std::string GetWidgetName() const final { return "WidgetStatusBar"; }
52
57 void Draw() override;
58
64 void UpdateClock(std::string_view clock_string);
65
71 void UpdateLocation(std::string_view location);
72
78 void UpdateLocationFormat(std::string_view location_format);
79
80 private:
82 uint16_t warnings_ = 0;
84 uint16_t cautions_ = 0;
86 uint16_t advisories_ = 0;
88 uint16_t overrides_ = 0;
89
91 LocationType location_;
92
97 struct Labels {
99 LabelStates state;
101 std::string text;
102 };
104 std::array<Labels, 7> labels_;
105};
106
107} // namespace gva
108
109#endif // HMICORE_WIDGETS_TABLE_STATUS_BAR_H_
Class definition of the GVA renderer.
Definition renderer_gva.h:29
Class defining the touch screen events.
Definition touch_gva.h:71
A widget representing a table of elements.
Definition status_bar.h:30
void UpdateLocation(std::string_view location)
Update the location.
Definition status_bar.cc:57
void Draw() override
The base class override to draw the table once setup.
Definition status_bar.cc:33
void UpdateLocationFormat(std::string_view location_format)
Set the location format i.e MGRS or Lat/Long.
Definition status_bar.cc:59
std::string GetWidgetName() const final
Get the Widget Name attribute.
Definition status_bar.h:51
void UpdateClock(std::string_view clock_string)
Update the system clock.
Definition status_bar.cc:55
~WidgetStatusBar() final=default
Destroy the Widget Keyboard object.
A widget representing a table of elements.
Definition table.h:32
LabelStates
Enum for the label states.
Definition gva.h:41
Enum for the location type.
Definition gva.h:543