QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
BatteryIndicatorSettings.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtQmlIntegration/QtQmlIntegration>
4
5#include "SettingsGroup.h"
6
8{
9 Q_OBJECT
10 QML_ELEMENT
11 QML_UNCREATABLE("")
12public:
13 BatteryIndicatorSettings(QObject* parent = nullptr);
14
16
17 DEFINE_SETTINGFACT(valueDisplay) // Battery value display mode
18 DEFINE_SETTINGFACT(threshold1) // First threshold for battery level
19 DEFINE_SETTINGFACT(threshold2) // Second threshold for battery level
20 DEFINE_SETTINGFACT(consolidateMultipleBatteries)
21
22 Q_INVOKABLE void setThreshold1(int value); // Set threshold1 with validation
23 Q_INVOKABLE void setThreshold2(int value); // Set threshold2 with validation
24
25private:
26 void validateThreshold1();
27 void validateThreshold2();
28 void _threshold1Changed();
29 void _threshold2Changed();
30};
#define DEFINE_SETTING_NAME_GROUP()
#define DEFINE_SETTINGFACT(NAME)
BatteryIndicatorSettings(QObject *parent=nullptr)
Q_INVOKABLE void setThreshold2(int value)
Q_INVOKABLE void setThreshold1(int value)
Provides access to group of settings.