[Companion] Sensor switches support added

+ some refactoring to hide irrelevant switches in the combobox

More refactoring to come:
 - have only one SwitchModel per model instead of one per tab
 - only do the update work if something has changed
This commit is contained in:
Bertrand Songis
2017-07-30 12:12:27 +02:00
parent b814f997f8
commit b55070f939
18 changed files with 290 additions and 111 deletions
+4 -2
View File
@@ -22,7 +22,9 @@
#define _LOGICALSWITCHES_H_
#include "modeledit.h"
#include "eeprominterface.h"
#include "radiodata.h"
class RawSwitchFilterItemModel;
class LogicalSwitchesPanel : public ModelPanel
{
@@ -58,7 +60,7 @@ class LogicalSwitchesPanel : public ModelPanel
QDoubleSpinBox * cswitchDelay[CPN_MAX_LOGICAL_SWITCHES];
QComboBox * cswitchSource1[CPN_MAX_LOGICAL_SWITCHES];
QComboBox * cswitchSource2[CPN_MAX_LOGICAL_SWITCHES];
QStandardItemModel * rawSwitchItemModel;
RawSwitchFilterItemModel * rawSwitchItemModel;
QStandardItemModel * rawSourceItemModel;
void setSwitchWidgetVisibility(int i);
int selectedSwitch;