Flair
Framework Libre Air
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties
BatteryMonitor.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef BATTERYMONITOR_H
14 #define BATTERYMONITOR_H
15 
16 #include <GroupBox.h>
17 
18 namespace flair {
19 namespace gui {
20 class LayoutPosition;
21 class Label;
22 class DoubleSpinBox;
23 }
24 }
25 
26 namespace flair {
27 namespace sensor {
28 
34 class BatteryMonitor : public gui::GroupBox {
35 public:
44  BatteryMonitor(const gui::LayoutPosition *position, std::string name);
45 
51 
58  bool IsBatteryLow(void) const;
59 
66  void SetBatteryValue(float value);
67 
74  float GetVoltage(void) const;
75 
76 private:
77  float batteryvalue;
78  gui::DoubleSpinBox *battery_thresh;
79  gui::Label *battery;
80 };
81 } // end namespace sensor
82 } // end namespace flair
83 
84 #endif // BATTERYMONITOR_H
Class displaying a QGroupBox on the ground station.
Definition: GroupBox.h:27
bool IsBatteryLow(void) const
Is batteru low?
BatteryMonitor(const gui::LayoutPosition *position, std::string name)
Constructor.
Class displaying a QLabel on the ground station.
Definition: Label.h:28
Base class for battery monitor.
Definition: BatteryMonitor.h:34
Class displaying a QDoubleSpinBox on the ground station.
Definition: DoubleSpinBox.h:28
Class displaying a QGroupBox on the ground station.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
void SetBatteryValue(float value)
Set battery value.
float GetVoltage(void) const
Get battery voltage.