[companion] Adjust GVAR not possible in global functions (fix #5425)
[opentx.git] / companion / src / generaledit / hardware.h
blob7d53a6d1405b511cbb38336c9ef0601092628e00
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #ifndef _HARDWARE_H_
22 #define _HARDWARE_H_
24 #include "generaledit.h"
26 namespace Ui {
27 class Hardware;
30 class QLabel;
31 class AutoLineEdit;
32 class AutoComboBox;
34 class HardwarePanel : public GeneralPanel
36 Q_OBJECT
38 public:
39 HardwarePanel(QWidget * parent, GeneralSettings & generalSettings, Firmware * firmware);
40 virtual ~HardwarePanel();
42 private slots:
43 void on_PPM1_editingFinished();
44 void on_PPM2_editingFinished();
45 void on_PPM3_editingFinished();
46 void on_PPM4_editingFinished();
47 void on_PPM_MultiplierDSB_editingFinished();
49 void on_txCurrentCalibration_editingFinished();
50 void on_txVoltageCalibration_editingFinished();
51 void on_bluetoothEnable_stateChanged(int);
52 void on_filterEnable_stateChanged();
54 void on_serialPortMode_currentIndexChanged(int index);
56 protected:
57 void setupPotType(int index, QLabel * label, AutoLineEdit * name, AutoComboBox * type);
58 void setupSliderType(int index, QLabel * label, AutoLineEdit * name, AutoComboBox * type);
59 void setupSwitchType(int index, QLabel * label, AutoLineEdit * name, AutoComboBox * type, bool threePos = true);
61 private:
62 Ui::Hardware *ui;
64 void setValues();
67 #endif // _HARDWARE_H_