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
);
60 void onVirtSwValueChange(quint8 index
, qint32 value
);
61 void onGVarValueChange(quint8 index
, qint32 value
);
62 void onPhaseChanged(qint32 phase
, const QString
&);
65 void changeEvent(QEvent
*e
);
66 void setupChannelsDisplay();
67 void setupLsDisplay();
68 void setupGVarsDisplay();
69 QWidget
* createLogicalSwitch(QWidget
* parent
, int switchNo
);
71 SimulatorInterface
* m_simulator
;
72 Firmware
* m_firmware
;
74 QHash
<int, QPair
<QLabel
*, QSlider
*> > m_channelsMap
; // m_channelsMap[chanIndex] = {QLabel*, QSlider*}
75 QHash
<int, QLabel
*> m_logicSwitchMap
; // m_logicSwitchMap[lsIndex] = QLabel*
76 QHash
<int, QHash
<int, QLabel
*> > m_globalVarsMap
; // m_globalVarsMap[gvarIndex][fmodeIndex] = QLabel*
81 const static quint16 m_savedViewStateVersion
;
84 Ui::RadioOutputsWidget
* ui
;
87 #endif // RADIOOUTPUTSWIDGET_H