Merge branch 'origin/next'

Conflicts:
	companion/src/CMakeLists.txt
	companion/src/apppreferencesdialog.ui
	companion/src/companion.qrc
	companion/src/mdichild.cpp
This commit is contained in:
Kjell Kernen
2014-03-31 10:22:23 +02:00
236 changed files with 25514 additions and 16461 deletions
+8 -7
View File
@@ -1,13 +1,13 @@
#include "expodialog.h"
#include "ui_expodialog.h"
#include "eeprominterface.h"
#include "helpers.h"
ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, int stickMode) :
ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, int stickMode, char * inputName) :
QDialog(parent),
ui(new Ui::ExpoDialog),
model(model),
ed(expoData)
ed(expoData),
inputName(inputName)
{
ui->setupUi(this);
QLabel * lb_fp[] = {ui->lb_FP0,ui->lb_FP1,ui->lb_FP2,ui->lb_FP3,ui->lb_FP4,ui->lb_FP5,ui->lb_FP6,ui->lb_FP7,ui->lb_FP8 };
@@ -45,8 +45,6 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
}
if (GetEepromInterface()->getCapability(VirtualInputs)) {
ui->sideLabel->hide();
ui->sideCB->hide();
ui->inputName->setMaxLength(4);
populateSourceCB(ui->sourceCB, ed->srcRaw, model, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS | POPULATE_TELEMETRY);
ui->sourceCB->removeItem(0);
@@ -76,7 +74,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
}
ui->inputName->setValidator(new QRegExpValidator(rx, this));
ui->inputName->setText(model.inputNames[ed->chn]);
ui->inputName->setText(inputName);
ui->lineName->setValidator(new QRegExpValidator(rx, this));
ui->lineName->setText(ed->name);
@@ -93,6 +91,9 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
for (int i=0; i<9; i++) {
connect(cb_fp[i], SIGNAL(toggled(bool)), this, SLOT(valuesChanged()));
}
if (GetEepromInterface()->getCapability(VirtualInputs))
connect(ui->inputName, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
QTimer::singleShot(0, this, SLOT(shrink()));
}
@@ -137,7 +138,7 @@ void ExpoDialog::valuesChanged()
ed->mode = ui->sideCB->currentIndex() + 1;
strcpy(ed->name, ui->lineName->text().toAscii().data());
strcpy(model.inputNames[ed->chn], ui->inputName->text().toAscii().data());
strcpy(inputName, ui->inputName->text().toAscii().data());
ed->phases=0;
for (int i=8; i>=0 ; i--) {