Vivoe Lite 0.5.0
Lightweight GVA like HMI for military displays.
Loading...
Searching...
No Matches
speedometer.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#ifndef HMICORE_WIDGETS_DRIVER_SPEEDOMETER_H_
13#define HMICORE_WIDGETS_DRIVER_SPEEDOMETER_H_
14
15#include <cstdint>
16#include <string>
17
20
21namespace gva {
22
25 public:
31 explicit WidgetDriverSpeedometer(const RendererGva& renderer);
32
38 std::string GetWidgetName() const final { return "WidgetDriverSpeedometer"; };
39
44 void Draw() final;
45
51 void SetValue(int16_t value) { value_ = value; }
52
58 int16_t GetValue() const { return value_; }
59
65 void SetMode(widget::DialType mode) { mode_ = mode; }
66
67 private:
68 const double scale_ = 0.5;
69 int16_t value_ = 0;
70 bool indicator_left_ = false;
71 bool indicator_right_ = false;
72 widget::DialType mode_ = widget::DialType::kDialSpeedKph;
73};
74
75} // namespace gva
76
77#endif // HMICORE_WIDGETS_DRIVER_SPEEDOMETER_H_
Class definition of the GVA renderer.
Definition renderer_gva.h:29
Class defining the mode widget.
Definition speedometer.h:24
int16_t GetValue() const
Get the Value.
Definition speedometer.h:58
void SetValue(int16_t value)
Set the ValueS.
Definition speedometer.h:51
void SetMode(widget::DialType mode)
Set the Mode object.
Definition speedometer.h:65
void Draw() final
The base overloaded Draw fuctions to draw this widget type.
Definition speedometer.cc:29
std::string GetWidgetName() const final
Get the Widget Name attribute.
Definition speedometer.h:38
Class defining the base widget.
Definition widget.h:27
DialType
The different dial types.
Definition widget_types.h:77