Merge pull request #1934 from opentx/projectkk2glider/issue1909_tab_order_2_for_next

Projectkk2glider/issue1909 tab order 2 for next
This commit is contained in:
Bertrand Songis
2014-12-15 21:27:20 +01:00
17 changed files with 253 additions and 1730 deletions
+5
View File
@@ -434,6 +434,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
voice = NULL; // we will search for a voice checkbox
int index = 0;
QWidget * prevFocus = ui->voiceCombo;
foreach(QList<Option> opts, parent->opts) {
foreach(Option opt, opts) {
if (index >= optionsCheckBoxes.size()) {
@@ -441,6 +442,9 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
ui->optionsLayout->addWidget(checkbox, optionsCheckBoxes.count()/5, optionsCheckBoxes.count()%5, 1, 1);
optionsCheckBoxes.push_back(checkbox);
connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(firmwareOptionChanged(bool)));
if (prevFocus) {
QWidget::setTabOrder(prevFocus, checkbox);
}
}
QCheckBox *cb = optionsCheckBoxes.at(index++);
@@ -452,6 +456,7 @@ void AppPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * fir
if (opt.name == QString("voice")) {
voice = cb;
}
prevFocus = cb;
}
}
}
+17 -6
View File
@@ -1049,10 +1049,26 @@ Mode 4:
</layout>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>profileNameLE</tabstop>
<tabstop>removeProfileButton</tabstop>
<tabstop>downloadVerCB</tabstop>
<tabstop>langCombo</tabstop>
<tabstop>voiceCombo</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>SplashSelect</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>sdPath</tabstop>
<tabstop>sdPathButton</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
<tabstop>ge_lineedit</tabstop>
<tabstop>ge_pathButton</tabstop>
<tabstop>historySize</tabstop>
<tabstop>showSplash</tabstop>
<tabstop>modelWizard_CB</tabstop>
<tabstop>startupCheck_fw</tabstop>
<tabstop>startupCheck_companion9x</tabstop>
<tabstop>backupPath</tabstop>
@@ -1061,7 +1077,6 @@ Mode 4:
<tabstop>splashincludeCB</tabstop>
<tabstop>libraryPath</tabstop>
<tabstop>libraryPathButton</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
@@ -1070,11 +1085,7 @@ Mode 4:
<tabstop>joystickCB</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickcalButton</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
+9 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>531</width>
<height>335</height>
<height>422</height>
</rect>
</property>
<property name="sizePolicy">
@@ -817,6 +817,14 @@ Please only use this if you know what you are doing. There are no error checks
<tabstop>avrdude_port</tabstop>
<tabstop>avrArgs</tabstop>
<tabstop>pushButton_4</tabstop>
<tabstop>samba_location</tabstop>
<tabstop>sb_browse</tabstop>
<tabstop>arm_mcu</tabstop>
<tabstop>samba_port</tabstop>
<tabstop>dfu_location</tabstop>
<tabstop>dfu_browse</tabstop>
<tabstop>dfuArgs</tabstop>
<tabstop>advCtrChkB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
+5 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>416</width>
<height>153</height>
<height>154</height>
</rect>
</property>
<property name="sizePolicy">
@@ -177,6 +177,10 @@ May be different from firmware language</string>
</layout>
</widget>
<tabstops>
<tabstop>checkFWUpdates</tabstop>
<tabstop>fw_dnld</tabstop>
<tabstop>voiceCombo</tabstop>
<tabstop>voice_dnld</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
+20 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>685</width>
<height>418</height>
<height>432</height>
</rect>
</property>
<property name="sizePolicy">
@@ -441,6 +441,25 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>backLightColor</tabstop>
<tabstop>joystickCB</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickcalButton</tabstop>
<tabstop>simuSW</tabstop>
<tabstop>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
<tabstop>libraryPath</tabstop>
<tabstop>libraryPathButton</tabstop>
<tabstop>splashincludeCB</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>SplashSelect</tabstop>
<tabstop>splashLibraryButton</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>InvertPixels</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
+11
View File
@@ -287,6 +287,17 @@
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>FileName_LE</tabstop>
<tabstop>fileOpen_BT</tabstop>
<tabstop>FieldsTW</tabstop>
<tabstop>mapsButton</tabstop>
<tabstop>ZoomX_ChkB</tabstop>
<tabstop>ZoomY_ChkB</tabstop>
<tabstop>Reset_PB</tabstop>
<tabstop>sessions_CB</tabstop>
<tabstop>logTable</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
+14
View File
@@ -339,6 +339,20 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>curvePreview</tabstop>
<tabstop>curvePoints</tabstop>
<tabstop>curveCustom</tabstop>
<tabstop>curveSmooth</tabstop>
<tabstop>curveName</tabstop>
<tabstop>curveType</tabstop>
<tabstop>curveCoeff</tabstop>
<tabstop>yMin</tabstop>
<tabstop>yMid</tabstop>
<tabstop>yMax</tabstop>
<tabstop>curveSide</tabstop>
<tabstop>curveApply</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+5 -2
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>381</width>
<height>414</height>
<width>389</width>
<height>488</height>
</rect>
</property>
<property name="sizePolicy">
@@ -481,6 +481,9 @@ If blank then the input is considered to be &quot;ON&quot; all the time.</string
<tabstop>weightGV</tabstop>
<tabstop>weightSB</tabstop>
<tabstop>weightCB</tabstop>
<tabstop>offsetGV</tabstop>
<tabstop>offsetSB</tabstop>
<tabstop>offsetCB</tabstop>
<tabstop>curveTypeCB</tabstop>
<tabstop>curveGVarCB</tabstop>
<tabstop>curveValueCB</tabstop>
+18
View File
@@ -457,6 +457,24 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>name</tabstop>
<tabstop>fadeIn</tabstop>
<tabstop>swtch</tabstop>
<tabstop>fadeOut</tabstop>
<tabstop>trim2Slider</tabstop>
<tabstop>trim2Use</tabstop>
<tabstop>trim2Value</tabstop>
<tabstop>trim1Use</tabstop>
<tabstop>trim1Value</tabstop>
<tabstop>trim1Slider</tabstop>
<tabstop>trim3Use</tabstop>
<tabstop>trim3Value</tabstop>
<tabstop>trim4Use</tabstop>
<tabstop>trim4Value</tabstop>
<tabstop>trim4Slider</tabstop>
<tabstop>trim3Slider</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+35 -2
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>364</width>
<height>434</height>
<width>412</width>
<height>541</height>
</rect>
</property>
<property name="sizePolicy">
@@ -611,6 +611,39 @@ If blank then the mix is considered to be &quot;ON&quot; all the time.</string>
</item>
</layout>
</widget>
<tabstops>
<tabstop>mixerName</tabstop>
<tabstop>sourceCB</tabstop>
<tabstop>weightGV</tabstop>
<tabstop>weightCB</tabstop>
<tabstop>weightSB</tabstop>
<tabstop>offsetGV</tabstop>
<tabstop>offsetCB</tabstop>
<tabstop>offsetSB</tabstop>
<tabstop>curveTypeCB</tabstop>
<tabstop>curveGVarCB</tabstop>
<tabstop>curveValueCB</tabstop>
<tabstop>curveValueSB</tabstop>
<tabstop>trimCB</tabstop>
<tabstop>MixDR_CB</tabstop>
<tabstop>cb_FP0</tabstop>
<tabstop>cb_FP1</tabstop>
<tabstop>cb_FP2</tabstop>
<tabstop>cb_FP3</tabstop>
<tabstop>cb_FP4</tabstop>
<tabstop>cb_FP5</tabstop>
<tabstop>cb_FP6</tabstop>
<tabstop>cb_FP7</tabstop>
<tabstop>cb_FP8</tabstop>
<tabstop>switchesCB</tabstop>
<tabstop>warningCB</tabstop>
<tabstop>mltpxCB</tabstop>
<tabstop>delayUpSB</tabstop>
<tabstop>delayDownSB</tabstop>
<tabstop>slowUpSB</tabstop>
<tabstop>slowDownSB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="../companion.qrc"/>
</resources>
+46 -25
View File
@@ -5,7 +5,7 @@
#include "helpers.h"
#include "appdata.h"
TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware):
TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware, QWidget *prevFocus):
ModelPanel(parent, model, generalSettings, firmware),
timer(timer),
ui(new Ui::Timer)
@@ -47,6 +47,12 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
ui->persistent->addItem(tr("Persistent (manual reset)"), 2);
disableMouseScrolling();
QWidget::setTabOrder(prevFocus, ui->name);
QWidget::setTabOrder(ui->name, ui->value);
QWidget::setTabOrder(ui->value, ui->mode);
QWidget::setTabOrder(ui->mode, ui->countdownBeep);
QWidget::setTabOrder(ui->countdownBeep, ui->minuteBeep);
QWidget::setTabOrder(ui->minuteBeep, ui->persistent);
lock = false;
}
@@ -79,6 +85,11 @@ void TimerPanel::update()
ui->minuteBeep->setChecked(timer.minuteBeep);
}
QWidget * TimerPanel::getLastFocus()
{
return ui->persistent;
}
void TimerPanel::on_value_editingFinished()
{
timer.val = ui->value->time().minute()*60 + ui->value->time().second();
@@ -368,30 +379,6 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->name->setMaxLength(IS_TARANIS(board) ? 12 : 10);
for (int i=0; i<C9X_MAX_TIMERS; i++) {
if (i<firmware->getCapability(Timers)) {
timers[i] = new TimerPanel(this, model, model.timers[i], generalSettings, firmware);
ui->gridLayout->addWidget(timers[i], 1+i, 1);
connect(timers[i], SIGNAL(modified()), this, SLOT(onChildModified()));
}
else {
foreach(QLabel *label, findChildren<QLabel *>(QRegExp(QString("label_timer%1").arg(i+1)))) {
label->hide();
}
}
}
for (int i=0; i<firmware->getCapability(NumModules); i++) {
modules[i] = new ModulePanel(this, model, model.moduleData[i], generalSettings, firmware, i);
ui->modulesLayout->addWidget(modules[i]);
connect(modules[i], SIGNAL(modified()), this, SLOT(onChildModified()));
}
if (firmware->getCapability(ModelTrainerEnable)) {
modules[C9X_NUM_MODULES] = new ModulePanel(this, model, model.moduleData[C9X_NUM_MODULES], generalSettings, firmware, -1);
ui->modulesLayout->addWidget(modules[C9X_NUM_MODULES]);
}
if (firmware->getCapability(ModelImage)) {
QStringList items;
items.append("");
@@ -438,12 +425,28 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->modelImage_label->hide();
ui->imagePreview->hide();
}
QWidget *prevFocus = ui->image;
for (int i=0; i<C9X_MAX_TIMERS; i++) {
if (i<firmware->getCapability(Timers)) {
timers[i] = new TimerPanel(this, model, model.timers[i], generalSettings, firmware, prevFocus);
ui->gridLayout->addWidget(timers[i], 1+i, 1);
connect(timers[i], SIGNAL(modified()), this, SLOT(onChildModified()));
prevFocus = timers[i]->getLastFocus();
}
else {
foreach(QLabel *label, findChildren<QLabel *>(QRegExp(QString("label_timer%1").arg(i+1)))) {
label->hide();
}
}
}
if (!firmware->getCapability(HasDisplayText)) {
ui->displayText->hide();
}
// Beep Center checkboxes
prevFocus = ui->trimsDisplay;
int analogs = 4 + firmware->getCapability(Pots);
for (int i=0; i<analogs+firmware->getCapability(RotaryEncoders); i++) {
QCheckBox * checkbox = new QCheckBox(this);
@@ -455,6 +458,8 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
if (!IS_TARANIS_PLUS(board) && i==6) {
checkbox->hide();
}
QWidget::setTabOrder(prevFocus, checkbox);
prevFocus = checkbox;
}
// Startup switches warnings
@@ -498,10 +503,14 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
connect(cb, SIGNAL(toggled(bool)), this, SLOT(startupSwitchToggled(bool)));
startupSwitchesSliders << slider;
startupSwitchesCheckboxes << cb;
QWidget::setTabOrder(prevFocus, slider);
QWidget::setTabOrder(slider, cb);
prevFocus = cb;
}
ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, firmware->getCapability(Switches));
// Pot warnings
prevFocus = ui->potWarningMode;
if (IS_TARANIS(board)) {
for (int i=0; i<firmware->getCapability(Pots); i++) {
QCheckBox * cb = new QCheckBox(this);
@@ -513,6 +522,8 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
if (!IS_TARANIS_PLUS(board) && i==2) {
cb->hide();
}
QWidget::setTabOrder(prevFocus, cb);
prevFocus = cb;
}
}
else {
@@ -528,6 +539,16 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->trimsDisplay->hide();
}
for (int i=0; i<firmware->getCapability(NumModules); i++) {
modules[i] = new ModulePanel(this, model, model.moduleData[i], generalSettings, firmware, i);
ui->modulesLayout->addWidget(modules[i]);
connect(modules[i], SIGNAL(modified()), this, SLOT(onChildModified()));
}
if (firmware->getCapability(ModelTrainerEnable)) {
modules[C9X_NUM_MODULES] = new ModulePanel(this, model, model.moduleData[C9X_NUM_MODULES], generalSettings, firmware, -1);
ui->modulesLayout->addWidget(modules[C9X_NUM_MODULES]);
}
disableMouseScrolling();
+2 -1
View File
@@ -21,10 +21,11 @@ class TimerPanel : public ModelPanel
Q_OBJECT
public:
TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware);
TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, GeneralSettings & generalSettings, FirmwareInterface * firmware, QWidget *prevFocus);
virtual ~TimerPanel();
virtual void update();
QWidget * getLastFocus();
private slots:
void on_mode_currentIndexChanged(int index);
+14
View File
@@ -596,6 +596,20 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
<header>autocombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>name</tabstop>
<tabstop>image</tabstop>
<tabstop>throttleSource</tabstop>
<tabstop>throttleTrim</tabstop>
<tabstop>throttleWarning</tabstop>
<tabstop>throttleReverse</tabstop>
<tabstop>trimIncrement</tabstop>
<tabstop>extendedLimits</tabstop>
<tabstop>extendedTrims</tabstop>
<tabstop>displayText</tabstop>
<tabstop>trimsDisplay</tabstop>
<tabstop>potWarningMode</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+15 -4
View File
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>628</width>
<width>692</width>
<height>300</height>
</rect>
</property>
@@ -67,12 +67,12 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout_69" rowstretch="0,0,0,0,0,0,0,0,0" columnstretch="0,0,0,0,0,0,0">
<property name="verticalSpacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="2" column="3" alignment="Qt::AlignLeft">
<widget class="QSpinBox" name="channelsStart">
<property name="maximumSize">
@@ -550,6 +550,17 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>trainerMode</tabstop>
<tabstop>protocol</tabstop>
<tabstop>channelsStart</tabstop>
<tabstop>channelsCount</tabstop>
<tabstop>ppmFrameLength</tabstop>
<tabstop>ppmPolarity</tabstop>
<tabstop>ppmDelay</tabstop>
<tabstop>failsafeMode</tabstop>
<tabstop>rxNumber</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+25 -3
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>861</width>
<height>562</height>
<height>737</height>
</rect>
</property>
<property name="windowTitle">
@@ -326,7 +326,7 @@
<number>4</number>
</property>
<property name="spacing">
<number>-1</number>
<number>6</number>
</property>
<item row="2" column="1">
<layout class="QGridLayout" name="gridLayout_66" columnstretch="1,0,0,0">
@@ -549,7 +549,7 @@
<number>4</number>
</property>
<property name="spacing">
<number>-1</number>
<number>6</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="altitudeSource_label">
@@ -921,6 +921,28 @@
<header>autocombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>telemetryProtocol</tabstop>
<tabstop>rssiAlarm1CB</tabstop>
<tabstop>rssiAlarm1SB</tabstop>
<tabstop>rssiAlarm2CB</tabstop>
<tabstop>rssiAlarm2SB</tabstop>
<tabstop>varioSourceCB</tabstop>
<tabstop>varioLimitMin_DSB</tabstop>
<tabstop>varioLimitCenterMin_DSB</tabstop>
<tabstop>varioLimitCenterMax_DSB</tabstop>
<tabstop>varioLimitMax_DSB</tabstop>
<tabstop>voltsSource</tabstop>
<tabstop>altitudeSource</tabstop>
<tabstop>frskyProtoCB</tabstop>
<tabstop>fasOffset_DSB</tabstop>
<tabstop>mahCount_SB</tabstop>
<tabstop>mahCount_ChkB</tabstop>
<tabstop>frskyVoltCB</tabstop>
<tabstop>frskyCurrentCB</tabstop>
<tabstop>bladesCount</tabstop>
<tabstop>customScreens</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
+12 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>276</width>
<height>118</height>
<height>138</height>
</rect>
</property>
<property name="windowTitle">
@@ -325,6 +325,17 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>UnitCB</tabstop>
<tabstop>RatioSB</tabstop>
<tabstop>CalibSB</tabstop>
<tabstop>alarm1LevelCB</tabstop>
<tabstop>alarm1GreaterCB</tabstop>
<tabstop>alarm1ValueSB</tabstop>
<tabstop>alarm2LevelCB</tabstop>
<tabstop>alarm2GreaterCB</tabstop>
<tabstop>alarm2ValueSB</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
File diff suppressed because it is too large Load Diff