[Companion] Compilation fix
This commit is contained in:
@@ -84,7 +84,7 @@ class SimulatedUIWidget : public QWidget
|
||||
RadioUiAction * m_scrollDnAction;
|
||||
RadioUiAction * m_rotEncClickAction;
|
||||
RadioUiAction * m_screenshotAction;
|
||||
BoardEnum m_board;
|
||||
Board::Type m_board;
|
||||
unsigned int m_backLight;
|
||||
bool m_lightOn;
|
||||
int m_beepShow;
|
||||
|
||||
@@ -204,15 +204,15 @@ void SimulatorDialog::setupUi()
|
||||
setWindowTitle(windowName);
|
||||
|
||||
switch(m_board) {
|
||||
case BOARD_TARANIS_X7 :
|
||||
case Board::BOARD_TARANIS_X7 :
|
||||
radioUiWidget = new SimulatedUIWidgetX7(simulator, this);
|
||||
break;
|
||||
case BOARD_TARANIS_X9D :
|
||||
case BOARD_TARANIS_X9DP :
|
||||
case BOARD_TARANIS_X9E :
|
||||
case Board::BOARD_TARANIS_X9D :
|
||||
case Board::BOARD_TARANIS_X9DP :
|
||||
case Board::BOARD_TARANIS_X9E :
|
||||
radioUiWidget = new SimulatedUIWidgetX9(simulator, this);
|
||||
break;
|
||||
case BOARD_HORUS :
|
||||
case Board::BOARD_HORUS :
|
||||
radioUiWidget = new SimulatedUIWidgetX12(simulator, this);
|
||||
break;
|
||||
default:
|
||||
@@ -312,7 +312,7 @@ void SimulatorDialog::setupRadioWidgets()
|
||||
{
|
||||
int i, midpos, aIdx;
|
||||
QString wname;
|
||||
BoardEnum board = firmware->getBoard();
|
||||
Board::Type board = firmware->getBoard();
|
||||
|
||||
// First clear out any existing widgets.
|
||||
if (switches.size()) {
|
||||
@@ -334,17 +334,17 @@ void SimulatorDialog::setupRadioWidgets()
|
||||
// Now set up new widgets.
|
||||
|
||||
// switches
|
||||
SwitchInfo switchInfo;
|
||||
Board::SwitchInfo switchInfo;
|
||||
// FIXME : CPN_MAX_SWITCHES == 32 but GeneralSettings::switchConfig[18] !!
|
||||
for (i = 0; i < firmware->getCapability(Capability(Switches)) && i < 18 /*CPN_MAX_SWITCHES*/; ++i) {
|
||||
if (radioSettings.switchConfig[i] == SWITCH_NONE)
|
||||
if (radioSettings.switchConfig[i] == Board::SWITCH_NOT_AVAILABLE)
|
||||
continue;
|
||||
|
||||
if ((wname = QString(radioSettings.switchName[i])).isEmpty()) {
|
||||
switchInfo = getSwitchInfo(board, i);
|
||||
wname = QString(switchInfo.name);
|
||||
}
|
||||
RadioSwitchWidget * sw = new RadioSwitchWidget(SwitchConfig(radioSettings.switchConfig[i]), wname, 0, ui->radioWidgetsHT);
|
||||
RadioSwitchWidget * sw = new RadioSwitchWidget(Board::SwitchType(radioSettings.switchConfig[i]), wname, 0, ui->radioWidgetsHT);
|
||||
sw->setIndex(i);
|
||||
ui->radioWidgetsHTLayout->addWidget(sw);
|
||||
switches.append(sw);
|
||||
@@ -361,7 +361,7 @@ void SimulatorDialog::setupRadioWidgets()
|
||||
if ((wname = QString(radioSettings.potName[i])).isEmpty())
|
||||
wname = firmware->getAnalogInputName(4 + aIdx + i);
|
||||
|
||||
RadioKnobWidget * pot = new RadioKnobWidget(PotConfig(radioSettings.potConfig[i]), wname, 0, ui->radioWidgetsHT);
|
||||
RadioKnobWidget * pot = new RadioKnobWidget(Board::PotType(radioSettings.potConfig[i]), wname, 0, ui->radioWidgetsHT);
|
||||
pot->setIndex(aIdx + i);
|
||||
// FIXME : total hack here -- this needs to follow the exception in radio/src/mixer.cpp:evalInputs()
|
||||
if (i == 0 && IS_TARANIS(board) && !IS_TARANIS_X7(board))
|
||||
|
||||
@@ -126,7 +126,7 @@ class SimulatorDialog : public QDialog
|
||||
QString sdCardPath;
|
||||
QString radioDataPath;
|
||||
QByteArray eepromData;
|
||||
BoardEnum m_board;
|
||||
Board::Type m_board;
|
||||
quint8 flags;
|
||||
int radioProfileId;
|
||||
int lastPhase;
|
||||
|
||||
@@ -115,7 +115,7 @@ class SimulatorFactory {
|
||||
|
||||
virtual QString name() = 0;
|
||||
|
||||
virtual BoardEnum type() = 0;
|
||||
virtual Board::Type type() = 0;
|
||||
|
||||
virtual SimulatorInterface *create() = 0;
|
||||
};
|
||||
|
||||
@@ -35,13 +35,13 @@ class RadioKnobWidget : public RadioWidget
|
||||
|
||||
public:
|
||||
|
||||
explicit RadioKnobWidget(PotConfig type = POT_WITH_DETENT, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
explicit RadioKnobWidget(Board::PotType type = Board::POT_WITH_DETENT, QWidget * parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
RadioWidget(parent, f),
|
||||
m_potType(type)
|
||||
{
|
||||
init();
|
||||
}
|
||||
explicit RadioKnobWidget(PotConfig type, const QString &labelText, int value = 0, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
explicit RadioKnobWidget(Board::PotType type, const QString & labelText, int value = 0, QWidget * parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
RadioWidget(labelText, value, parent, f),
|
||||
m_potType(type)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class RadioKnobWidget : public RadioWidget
|
||||
|
||||
private:
|
||||
|
||||
PotConfig m_potType;
|
||||
Board::PotType m_potType;
|
||||
|
||||
|
||||
class KnobWidget : public QDial
|
||||
@@ -72,10 +72,10 @@ class RadioKnobWidget : public RadioWidget
|
||||
|
||||
public:
|
||||
|
||||
explicit KnobWidget(PotConfig type, QWidget * parent = 0):
|
||||
explicit KnobWidget(Board::PotType type, QWidget * parent = 0):
|
||||
QDial(parent),
|
||||
m_type(type),
|
||||
m_positions(type == POT_MULTIPOS_SWITCH ? 5 : 0)
|
||||
m_positions(type == Board::POT_MULTIPOS_SWITCH ? 5 : 0)
|
||||
{
|
||||
setToolTip(tr("Right-double-click to reset to center."));
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
@@ -114,7 +114,7 @@ class RadioKnobWidget : public RadioWidget
|
||||
QDial::mousePressEvent(event);
|
||||
}
|
||||
|
||||
PotConfig m_type;
|
||||
Board::PotType m_type;
|
||||
quint8 m_positions;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,13 +33,13 @@ class RadioSwitchWidget : public RadioWidget
|
||||
|
||||
public:
|
||||
|
||||
explicit RadioSwitchWidget(SwitchConfig type = SWITCH_3POS, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
explicit RadioSwitchWidget(Board::SwitchType type = Board::SWITCH_3POS, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
RadioWidget(parent, f),
|
||||
switchConfig(type)
|
||||
{
|
||||
init();
|
||||
}
|
||||
explicit RadioSwitchWidget(SwitchConfig type, const QString &labelText, int value = 0, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
explicit RadioSwitchWidget(Board::SwitchType type, const QString &labelText, int value = 0, QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()) :
|
||||
RadioWidget(labelText, value, parent, f),
|
||||
switchConfig(type)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ class RadioSwitchWidget : public RadioWidget
|
||||
sl->setInvertedControls(true);
|
||||
sl->setTickPosition(QSlider::TicksBothSides);
|
||||
sl->setPageStep(1);
|
||||
sl->setMinimum((switchConfig == SWITCH_3POS ? -1 : 0));
|
||||
sl->setMinimum((switchConfig == Board::SWITCH_3POS ? -1 : 0));
|
||||
sl->setMaximum(1);
|
||||
sl->setTickInterval(1);
|
||||
sl->setValue(m_value);
|
||||
@@ -70,7 +70,7 @@ class RadioSwitchWidget : public RadioWidget
|
||||
}
|
||||
|
||||
private:
|
||||
SwitchConfig switchConfig;
|
||||
Board::SwitchType switchConfig;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user