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 RADIOOUTPUTSWIDGET_H
22 #define RADIOOUTPUTSWIDGET_H
24 #include "simulator.h"
25 #include "simulatorinterface.h"
31 class RadioOutputsWidget
;
35 //class SimulatorInterface;
41 using namespace Simulator
;
43 class RadioOutputsWidget
: public QWidget
48 explicit RadioOutputsWidget(SimulatorInterface
* simulator
, Firmware
* firmware
, QWidget
* parent
= 0);
49 ~RadioOutputsWidget();
59 void onChannelOutValueChange(quint8 index
, qint32 value
, qint32 limit
);
60 void onChannelMixValueChange(quint8 index
, qint32 value
, qint32 limit
);
61 void onVirtSwValueChange(quint8 index
, qint32 value
);
62 void onGVarValueChange(quint8 index
, qint32 value
);
63 void onPhaseChanged(qint32 phase
, const QString
&);
66 void changeEvent(QEvent
*e
);
67 void setupChannelsDisplay(bool mixes
= false);
68 void setupLsDisplay();
69 void setupGVarsDisplay();
70 QWidget
* createLogicalSwitch(QWidget
* parent
, int switchNo
);
72 SimulatorInterface
* m_simulator
;
73 Firmware
* m_firmware
;
75 QHash
<int, QPair
<QLabel
*, QSlider
*> > m_channelsMap
; // m_channelsMap[chanIndex] = {QLabel*, QSlider*}
76 QHash
<int, QPair
<QLabel
*, QSlider
*> > m_mixesMap
; // m_mixesMap[chanIndex] = {QLabel*, QSlider*}
77 QHash
<int, QLabel
*> m_logicSwitchMap
; // m_logicSwitchMap[lsIndex] = QLabel*
78 QHash
<int, QHash
<int, QLabel
*> > m_globalVarsMap
; // m_globalVarsMap[gvarIndex][fmodeIndex] = QLabel*
83 const static quint16 m_savedViewStateVersion
;
86 Ui::RadioOutputsWidget
* ui
;
89 #endif // RADIOOUTPUTSWIDGET_H