dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
configmodulewidget.h
Go to the documentation of this file.
1 
11 /*
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20  * for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, see <http://www.gnu.org/licenses/>
24  */
25 #ifndef CONFIGMODULEWIDGET_H
26 #define CONFIGMODULEWIDGET_H
27 
28 #include "ui_modules.h"
29 
33 #include "uavobjects/uavobject.h"
34 
35 namespace Ui {
36 class Modules;
37 }
38 
40 {
41  Q_OBJECT
42 
43 public:
44  ConfigModuleWidget(QWidget *parent = nullptr);
46 
47 private slots:
48  void updateAirspeedGroupbox(UAVObject *);
49  void enableAirspeedTypeGPS(bool);
50  void enableAirspeedTypePitot(bool);
51  void toggleBatteryMonitoringPin();
52  void toggleBatteryMonitoringGb();
53  void updateVoltageRatio();
54  void updateVoltageFactor();
55  void updateVoltageFactorFromUavo(float value);
56 
57  void recheckTabs();
58  void objectUpdated(UAVObject *obj, bool success);
59  void autoCellDetectionToggled(bool checked);
60  void maxCellVoltageChanged(double value);
61  void ledTabUpdate(UAVObject *obj);
62  void ledTabSetColor();
63  void updateAnnunciatorTab();
64 
65 private:
66  void setupLedTab();
67  /* To activate the appropriate tabs */
68  void enableBatteryTab(bool enabled);
69  void enableAirspeedTab(bool enabled);
70  void enableVibrationTab(bool enabled);
71  void enableHoTTTelemetryTab(bool enabled);
72  void enableGeofenceTab(bool enabled);
73  void enableGpsTab(bool enabled);
74  void enableLoggingTab(bool enabled);
75  void tabEnable(QWidget *tab, bool enable);
76 
77  void refreshAdcNames(void);
78 
79  Ui::Modules *ui;
80 
81 protected:
82  void resizeEvent(QResizeEvent *event);
83  virtual void enableControls(bool enable);
84 };
85 
86 #endif // CONFIGMODULEWIDGET_H
ConfigModuleWidget(QWidget *parent=nullptr)
void resizeEvent(QResizeEvent *event)
virtual void enableControls(bool enable)