1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 09:45:21 +03:00

The profile tab is now functional

This commit is contained in:
Kjell Kernen 2014-02-10 07:54:42 +01:00
parent 07a6fd8ee7
commit c48e1781fd
13 changed files with 521 additions and 855 deletions

View file

@ -14,7 +14,7 @@ appPreferencesDialog::appPreferencesDialog(QWidget *parent) :
ui(new Ui::appPreferencesDialog)
{
ui->setupUi(this);
setWindowIcon(CompanionIcon("preferences.png"));
setWindowIcon(CompanionIcon("apppreferences.png"));
initSettings();
connect(this, SIGNAL(accepted()), this, SLOT(writeValues()));
#ifndef JOYSTICKS
@ -56,6 +56,18 @@ void appPreferencesDialog::writeValues()
settings.remove("js_ctrl");
}
settings.setValue("default_channel_order", ui->channelorderCB->currentIndex());
settings.setValue("default_mode", ui->stickmodeCB->currentIndex());
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
settings.setValue("profileId", ui->ProfSlot_SB->value());
settings.setValue("sdPath", ui->sdPath->text());
settings.setValue("SplashFileName", ui->SplashFileName->text());
if (!ui->SplashFileName->text().isEmpty())
settings.setValue("SplashImage", "");
saveProfile();
MainWindow * mw = (MainWindow *)this->parent();
mw->unloadProfile();
}
@ -75,6 +87,7 @@ void appPreferencesDialog::initSettings()
{
QSettings settings;
ui->snapshotClipboardCKB->setChecked(settings.value("snapshot_to_clipboard", false).toBool());
ui->burnFirmware->setChecked(settings.value("burnFirmware", true).toBool());
QString Path=settings.value("snapshotPath", "").toString();
if (QDir(Path).exists()) {
@ -142,6 +155,24 @@ void appPreferencesDialog::initSettings()
ui->joystickcalButton->setDisabled(true);
}
#endif
// Profile Tab Inits
ui->channelorderCB->setCurrentIndex(settings.value("default_channel_order", 0).toInt());
ui->stickmodeCB->setCurrentIndex(settings.value("default_mode", 1).toInt());
ui->renameFirmware->setChecked(settings.value("rename_firmware_files", false).toBool());
Path=settings.value("sdPath", "").toString();
if (QDir(Path).exists()) {
ui->sdPath->setText(Path);
}
ui->ProfSlot_SB->setValue(settings.value("profileId", 1).toInt());
on_ProfSlot_SB_valueChanged();
QString fileName=settings.value("SplashFileName","").toString();
if (!fileName.isEmpty()) {
QFile file(fileName);
if (file.exists()){
ui->SplashFileName->setText(fileName);
displayImage( fileName );
}
}
}
void appPreferencesDialog::on_libraryPathButton_clicked()
@ -222,3 +253,129 @@ void appPreferencesDialog::on_joystickcalButton_clicked() {
}
#endif
// ******** Profile tab functions
void appPreferencesDialog::on_sdPathButton_clicked()
{
QSettings settings;
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), settings.value("sdPath").toString());
if (!fileName.isEmpty()) {
ui->sdPath->setText(fileName);
}
}
void appPreferencesDialog::on_ProfSlot_SB_valueChanged()
{
QSettings settings;
settings.beginGroup("Profiles");
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
settings.beginGroup(profile);
QString name=settings.value("Name","").toString();
ui->ProfName_LE->setText(name);
/* if (!(name.isEmpty())) {
QString firmwarename=settings.value("firmware", default_firmware_id).toString();
FirmwareInfo * fw = getFirmware(firmwarename);
int i=0;
foreach(FirmwareInfo * firmware, firmwares) {
if (fw == firmware) {
qDebug() << fw->id;
qDebug() << firmware->id;
qDebug() << i;
ui->downloadVerCB->setCurrentIndex(i);
break;
}
i++;
}
baseFirmwareChanged();
populateFirmwareOptions(fw);
}*/
settings.endGroup();
settings.endGroup();
}
void appPreferencesDialog::saveProfile()
{
QSettings settings;
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
QString name=ui->ProfName_LE->text();
if (name.isEmpty()) {
name = profile;
ui->ProfName_LE->setText(name);
}
settings.beginGroup("Profiles");
settings.beginGroup(profile);
settings.setValue("Name",name);
settings.setValue("default_channel_order", ui->channelorderCB->currentIndex());
settings.setValue("default_mode", ui->stickmodeCB->currentIndex());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("sdPath", ui->sdPath->text());
settings.setValue("SplashFileName", ui->SplashFileName->text());
settings.endGroup();
settings.endGroup();
}
void appPreferencesDialog::on_removeProfileButton_clicked()
{
QSettings settings;
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
settings.remove(profile);
}
bool appPreferencesDialog::displayImage( QString fileName )
{
QImage image(fileName);
if (image.isNull())
{
QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName));
return false;
}
int width=ui->imageLabel->width();
ui->imageLabel->setPixmap(QPixmap::fromImage(image.scaled(width, 64)));
if (width==212) {
image=image.convertToFormat(QImage::Format_RGB32);
QRgb col;
int gray, height = image.height();
for (int i = 0; i < width; ++i) {
for (int j = 0; j < height; ++j) {
col = image.pixel(i, j);
gray = qGray(col);
image.setPixel(i, j, qRgb(gray, gray, gray));
}
}
ui->imageLabel->setPixmap(QPixmap::fromImage(image));
}
else {
ui->imageLabel->setPixmap(QPixmap::fromImage(image.convertToFormat(QImage::Format_Mono)));
}
return true;
}
void appPreferencesDialog::on_SplashSelect_clicked()
{
QString supportedImageFormats;
for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) {
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
}
QSettings settings;
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats));
if (!fileName.isEmpty()) {
settings.setValue("lastImagesDir", QFileInfo(fileName).dir().absolutePath());
if (displayImage(fileName))
ui->SplashFileName->setText(fileName);
}
}
void appPreferencesDialog::on_clearImageButton_clicked() {
ui->imageLabel->clear();
ui->SplashFileName->clear();
}

View file

@ -23,6 +23,8 @@ public:
private:
Ui::appPreferencesDialog *ui;
void initSettings();
bool displayImage( QString fileName );
void saveProfile();
private slots:
void writeValues();
@ -31,6 +33,13 @@ private slots:
void on_snapshotClipboardCKB_clicked();
void on_backupPathButton_clicked();
void on_ge_pathButton_clicked();
void on_sdPathButton_clicked();
void on_ProfSlot_SB_valueChanged();
void on_removeProfileButton_clicked();
void on_SplashSelect_clicked();
void on_clearImageButton_clicked();
#ifdef JOYSTICKS
void on_joystickChkB_clicked();
void on_joystickcalButton_clicked();

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>685</width>
<height>431</height>
<height>462</height>
</rect>
</property>
<property name="sizePolicy">
@ -493,14 +493,14 @@
<string>Radio Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="7" column="1" colspan="5">
<item row="8" column="1" colspan="5">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="5">
<item row="4" column="5">
<widget class="QLabel" name="imageLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@ -534,7 +534,7 @@
</property>
</widget>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@ -550,7 +550,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QLineEdit" name="SplashFileName">
<property name="enabled">
<bool>true</bool>
@ -566,7 +566,7 @@
</property>
</widget>
</item>
<item row="1" column="1" colspan="3">
<item row="2" column="1" colspan="3">
<widget class="QLineEdit" name="sdPath">
<property name="enabled">
<bool>true</bool>
@ -582,7 +582,7 @@
</property>
</widget>
</item>
<item row="12" column="1" colspan="3">
<item row="13" column="1" colspan="3">
<widget class="QCheckBox" name="burnFirmware">
<property name="text">
<string>Offer to write FW to Tx after download</string>
@ -599,35 +599,35 @@
</property>
</widget>
</item>
<item row="12" column="5">
<widget class="QPushButton" name="ProfSave_PB">
<item row="13" column="5">
<widget class="QPushButton" name="removeProfileButton">
<property name="text">
<string>Save Profile</string>
<string>Remove Profile</string>
</property>
</widget>
</item>
<item row="1" column="5">
<item row="2" column="5">
<widget class="QPushButton" name="sdPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="6" column="5">
<item row="7" column="5">
<widget class="QPushButton" name="clearImageButton">
<property name="text">
<string>Clear Image</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="5">
<item row="3" column="1" colspan="5">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="10" column="1" colspan="2">
<item row="11" column="1" colspan="2">
<widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@ -777,7 +777,7 @@ This is used by the templated to determine which channel goes to what number out
</item>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="sdPathLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@ -793,7 +793,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="1" column="4">
<item row="2" column="4">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -806,7 +806,7 @@ This is used by the templated to determine which channel goes to what number out
</property>
</spacer>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QComboBox" name="stickmodeCB">
<property name="maximumSize">
<size>
@ -860,7 +860,7 @@ Mode 4:
</item>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_14">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@ -873,7 +873,14 @@ Mode 4:
</property>
</widget>
</item>
<item row="3" column="0">
<item row="6" column="5">
<widget class="QPushButton" name="SplashSelect">
<property name="text">
<string>Select Image</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@ -886,20 +893,13 @@ Mode 4:
</property>
</widget>
</item>
<item row="11" column="1" colspan="3">
<item row="12" column="1" colspan="3">
<widget class="QCheckBox" name="renameFirmware">
<property name="text">
<string>Append version number to FW file name</string>
</property>
</widget>
</item>
<item row="5" column="5">
<widget class="QPushButton" name="SplashSelect">
<property name="text">
<string>Edit Image</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
@ -907,7 +907,7 @@ Mode 4:
</property>
</widget>
</item>
<item row="13" column="1">
<item row="14" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -920,6 +920,29 @@ Mode 4:
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="ProfSlot_SB">
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Profile Index</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
@ -927,7 +950,41 @@ Mode 4:
</layout>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
<tabstop>ge_lineedit</tabstop>
<tabstop>ge_pathButton</tabstop>
<tabstop>historySize</tabstop>
<tabstop>showSplash</tabstop>
<tabstop>startupCheck_fw</tabstop>
<tabstop>startupCheck_companion9x</tabstop>
<tabstop>wizardEnable_ChkB</tabstop>
<tabstop>backupPath</tabstop>
<tabstop>backupPathButton</tabstop>
<tabstop>backupEnable</tabstop>
<tabstop>splashincludeCB</tabstop>
<tabstop>libraryPath</tabstop>
<tabstop>libraryPathButton</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
<tabstop>simuSW</tabstop>
<tabstop>backLightColor</tabstop>
<tabstop>joystickCB</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickcalButton</tabstop>
<tabstop>ProfName_LE</tabstop>
<tabstop>ProfSlot_SB</tabstop>
<tabstop>sdPath</tabstop>
<tabstop>sdPathButton</tabstop>
<tabstop>SplashFileName</tabstop>
<tabstop>SplashSelect</tabstop>
<tabstop>clearImageButton</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
<tabstop>removeProfileButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
@ -940,8 +997,8 @@ Mode 4:
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>376</x>
<y>596</y>
<x>382</x>
<y>455</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
@ -956,8 +1013,8 @@ Mode 4:
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>396</x>
<y>596</y>
<x>402</x>
<y>455</y>
</hint>
<hint type="destinationlabel">
<x>286</x>

View file

@ -12,7 +12,7 @@ fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) :
updateLock(false)
{
ui->setupUi(this);
setWindowIcon(CompanionIcon("preferences.png"));
setWindowIcon(CompanionIcon("fwpreferences.png"));
QCheckBox * OptionCheckBox[]= {
ui->optionCheckBox_1, ui->optionCheckBox_2, ui->optionCheckBox_3, ui->optionCheckBox_4, ui->optionCheckBox_5, ui->optionCheckBox_6, ui->optionCheckBox_7,
@ -38,7 +38,7 @@ fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) :
connect(ui->downloadVerCB, SIGNAL(currentIndexChanged(int)), this, SLOT(baseFirmwareChanged()));
connect(this, SIGNAL(accepted()), this, SLOT(writeValues()));
resize(0,0);
shrink();
}
@ -47,32 +47,43 @@ fwPreferencesDialog::~fwPreferencesDialog()
delete ui;
}
void fwPreferencesDialog::showVoice(bool show)
{
if (show)
showVoice();
else
hideVoice();
}
void fwPreferencesDialog::showVoice()
{
ui->voiceLine->show();
ui->voiceLabel->show();
ui->voiceCombo->show();
ui->voice_dnld->show();
}
void fwPreferencesDialog::hideVoice()
{
ui->voiceLine->hide();
ui->voiceLabel->hide();
ui->voiceCombo->hide();
ui->voice_dnld->hide();
QTimer::singleShot(0, this, SLOT(shrink()));
}
void fwPreferencesDialog::shrink()
{
resize(0,0);
}
void fwPreferencesDialog::baseFirmwareChanged()
{
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
voice=NULL;
foreach(FirmwareInfo * firmware, firmwares) {
if (firmware->id == selected_firmware) {
if (firmware->voice) {
ui->voiceLabel->show();
ui->voiceCombo->show();
ui->voice_dnld->show();
ui->sdPathButton->show();
ui->sdPath->show();
ui->sdPathLabel->show();
ui->voiceLabel->setEnabled(true);
ui->voiceCombo->setEnabled(true);
ui->voice_dnld->setEnabled(true);
ui->sdPathButton->setEnabled(true);
ui->sdPath->setEnabled(true);
} else {
ui->voiceLabel->hide();
ui->voiceCombo->hide();
ui->voice_dnld->hide();
ui->sdPathButton->hide();
ui->sdPath->hide();
ui->sdPathLabel->hide();
}
showVoice(firmware->voice);
populateFirmwareOptions(firmware);
break;
}
@ -109,11 +120,6 @@ FirmwareVariant fwPreferencesDialog::getFirmwareVariant()
return default_firmware_variant;
}
void fwPreferencesDialog::firmwareLangChanged()
{
firmwareChanged();
}
void fwPreferencesDialog::firmwareOptionChanged(bool state)
{
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
@ -134,19 +140,7 @@ void fwPreferencesDialog::firmwareOptionChanged(bool state)
}
}
if (voice) {
if (voice->isChecked()) {
ui->voiceLabel->setEnabled(true);
ui->voiceCombo->setEnabled(true);
ui->voice_dnld->setEnabled(true);
ui->sdPathButton->setEnabled(true);
ui->sdPath->setEnabled(true);
} else {
ui->voiceLabel->setDisabled(true);
ui->voiceCombo->setDisabled(true);
ui->voice_dnld->setDisabled(true);
ui->sdPathButton->setDisabled(true);
ui->sdPath->setDisabled(true);
}
showVoice(voice->isChecked());
}
return firmwareChanged();
@ -157,37 +151,24 @@ void fwPreferencesDialog::firmwareOptionChanged(bool state)
}
} else if (cb && !state) {
if (cb->text()=="voice") {
ui->voiceLabel->setDisabled(true);
ui->voiceCombo->setDisabled(true);
ui->voice_dnld->setDisabled(true);
ui->sdPathButton->setEnabled(true);
ui->sdPath->setEnabled(true);
hideVoice();
}
}
if (voice ) {
if (voice->isChecked()) {
ui->voiceLabel->setEnabled(true);
ui->voiceCombo->setEnabled(true);
ui->voice_dnld->setEnabled(true);
} else {
ui->voiceLabel->setDisabled(true);
ui->voiceCombo->setDisabled(true);
ui->voice_dnld->setDisabled(true);
ui->sdPathButton->setDisabled(true);
ui->sdPath->setDisabled(true);
}
if (voice) {
showVoice(voice->isChecked());
} else if (firmware) {
if (firmware->voice) {
ui->voiceLabel->setEnabled(true);
ui->voiceCombo->setEnabled(true);
ui->voice_dnld->setEnabled(true);
ui->sdPathButton->setEnabled(true);
ui->sdPath->setEnabled(true);
showVoice();
}
}
return firmwareChanged();
}
void fwPreferencesDialog::firmwareLangChanged()
{
firmwareChanged();
}
void fwPreferencesDialog::firmwareChanged()
{
if (updateLock)
@ -233,18 +214,10 @@ void fwPreferencesDialog::firmwareChanged()
void fwPreferencesDialog::writeValues()
{
QSettings settings;
settings.setValue("default_channel_order", ui->channelorderCB->currentIndex());
settings.setValue("default_mode", ui->stickmodeCB->currentIndex());
settings.setValue("cpu_id", ui->CPU_ID_LE->text());
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
current_firmware_variant = getFirmwareVariant();
settings.setValue("firmware", current_firmware_variant.id);
settings.setValue("profileId", ui->ProfSlot_SB->value());
settings.setValue("sdPath", ui->sdPath->text());
settings.setValue("SplashFileName", ui->SplashFileName->text());
if (!ui->SplashFileName->text().isEmpty())
settings.setValue("SplashImage", "");
MainWindow * mw = (MainWindow *)this->parent();
mw->unloadProfile();
@ -269,14 +242,7 @@ void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware)
ui->voiceCombo->setCurrentIndex(ui->voiceCombo->count() - 1);
}
if (ui->langCombo->count()) {
ui->langCombo->show();
ui->langLabel->show();
}
else {
ui->langCombo->hide();
ui->langLabel->hide();
}
showVoice(ui->langCombo->count()!=0);
int index = 0;
foreach(QList<Option> opts, parent->opts) {
@ -294,25 +260,7 @@ void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware)
if (opt.name==QString("voice")) {
voice=cb;
ui->voiceLabel->show();
ui->voiceCombo->show();
ui->voice_dnld->show();
ui->sdPathButton->show();
ui->sdPath->show();
ui->sdPathLabel->show();
if (current_firmware_variant.id.contains(opt.name) ||firmware->voice) {
ui->voiceLabel->setEnabled(true);
ui->voiceCombo->setEnabled(true);
ui->voice_dnld->setEnabled(true);
ui->sdPathButton->setEnabled(true);
ui->sdPath->setEnabled(true);
} else {
ui->voiceLabel->setDisabled(true);
ui->voiceCombo->setDisabled(true);
ui->voice_dnld->setDisabled(true);
ui->sdPathButton->setDisabled(true);
ui->sdPath->setDisabled(true);
}
showVoice(current_firmware_variant.id.contains(opt.name) ||firmware->voice);
}
}
}
@ -331,16 +279,8 @@ void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware)
void fwPreferencesDialog::initSettings()
{
QSettings settings;
ui->channelorderCB->setCurrentIndex(settings.value("default_channel_order", 0).toInt());
ui->stickmodeCB->setCurrentIndex(settings.value("default_mode", 1).toInt());
ui->renameFirmware->setChecked(settings.value("rename_firmware_files", false).toBool());
ui->burnFirmware->setChecked(settings.value("burnFirmware", true).toBool());
ui->CPU_ID_LE->setText(settings.value("cpu_id", "").toString());
QString Path=settings.value("sdPath", "").toString();
if (QDir(Path).exists()) {
ui->sdPath->setText(Path);
}
ui->CPU_ID_LE->setText(settings.value("cpu_id", "").toString());
FirmwareInfo * current_firmware = GetCurrentFirmware();
foreach(FirmwareInfo * firmware, firmwares) {
@ -351,27 +291,31 @@ void fwPreferencesDialog::initSettings()
}
baseFirmwareChanged();
ui->ProfSlot_SB->setValue(settings.value("profileId", 1).toInt());
on_ProfSlot_SB_valueChanged();
QString fileName=settings.value("SplashFileName","").toString();
if (!fileName.isEmpty()) {
QFile file(fileName);
if (file.exists()){
ui->SplashFileName->setText(fileName);
}
}
firmwareChanged();
}
void fwPreferencesDialog::on_checkFWUpdates_clicked()
{
QSettings settings;
FirmwareVariant variant = getFirmwareVariant();
if (settings.value("burnFirmware", true).toBool()) {
current_firmware_variant = variant;
settings.setValue("firmware", variant.id);
}
MainWindow * mw = (MainWindow *)this->parent();
mw->checkForUpdates(true, variant.id);
firmwareChanged();
}
void fwPreferencesDialog::on_fw_dnld_clicked()
{
QSettings settings;
MainWindow * mw = (MainWindow *)this->parent();
FirmwareVariant variant = getFirmwareVariant();
writeValues();
if (!variant.firmware->getUrl(variant.id).isNull()) {
if (ui->burnFirmware->isChecked()) {
QSettings settings;
if (settings.value("burnFirmware", true).toBool()) {
current_firmware_variant = getFirmwareVariant();
settings.setValue("firmware", current_firmware_variant.id);
}
@ -382,126 +326,10 @@ void fwPreferencesDialog::on_fw_dnld_clicked()
void fwPreferencesDialog::on_voice_dnld_clicked()
{
ui->ProfSave_PB->setEnabled(true);
QString url="http://fw.opentx.it/voices/";
FirmwareVariant variant = getFirmwareVariant();
url.append(QString("%1/%2/").arg(variant.firmware->id).arg(ui->voiceCombo->currentText()));
QDesktopServices::openUrl(url);
}
void fwPreferencesDialog::on_sdPathButton_clicked()
{
QSettings settings;
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), settings.value("sdPath").toString());
if (!fileName.isEmpty()) {
ui->sdPath->setText(fileName);
}
ui->ProfSave_PB->setEnabled(true);
}
void fwPreferencesDialog::on_ProfSlot_SB_valueChanged()
{
QSettings settings;
settings.beginGroup("Profiles");
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
settings.beginGroup(profile);
QString name=settings.value("Name","").toString();
ui->ProfName_LE->setText(name);
/* if (!(name.isEmpty())) {
QString firmwarename=settings.value("firmware", default_firmware_id).toString();
FirmwareInfo * fw = getFirmware(firmwarename);
int i=0;
foreach(FirmwareInfo * firmware, firmwares) {
if (fw == firmware) {
qDebug() << fw->id;
qDebug() << firmware->id;
qDebug() << i;
ui->downloadVerCB->setCurrentIndex(i);
break;
}
i++;
}
baseFirmwareChanged();
populateFirmwareOptions(fw);
}*/
settings.endGroup();
settings.endGroup();
}
void fwPreferencesDialog::on_ProfSave_PB_clicked()
{
QSettings settings;
settings.beginGroup("Profiles");
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
QString name=ui->ProfName_LE->text();
if (name.isEmpty()) {
int ret = QMessageBox::question(this, "Companion",
tr("Profile name is empty, profile slot %1 will be deleted.<br>Are you sure ?").arg(ui->ProfSlot_SB->value()) ,
QMessageBox::Yes | QMessageBox::No);
if (ret==QMessageBox::Yes) {
settings.remove(profile);
} else {
settings.beginGroup(profile);
ui->ProfName_LE->setText(settings.value("Name","").toString());
}
} else {
settings.beginGroup(profile);
settings.setValue("Name",name);
settings.setValue("default_channel_order", ui->channelorderCB->currentIndex());
settings.setValue("default_mode", ui->stickmodeCB->currentIndex());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("sdPath", ui->sdPath->text());
settings.setValue("SplashFileName", ui->SplashFileName->text());
current_firmware_variant = getFirmwareVariant();
settings.setValue("firmware", current_firmware_variant.id);
settings.endGroup();
settings.endGroup();
}
}
void fwPreferencesDialog::on_SplashSelect_clicked()
{
QString supportedImageFormats;
for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) {
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
}
QSettings settings;
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats));
if (!fileName.isEmpty()) {
settings.setValue("lastImagesDir", QFileInfo(fileName).dir().absolutePath());
QImage image(fileName);
if (image.isNull()) {
QMessageBox::critical(this, tr("Error"), tr("Cannot load %1.").arg(fileName));
return;
}
ui->SplashFileName->setText(fileName);
}
}
void fwPreferencesDialog::on_clearImageButton_clicked() {
ui->SplashFileName->clear();
}
void fwPreferencesDialog::on_checkFWUpdates_clicked()
{
FirmwareVariant variant = getFirmwareVariant();
if (ui->burnFirmware->isChecked()) {
QSettings settings;
current_firmware_variant = variant;
settings.setValue("firmware", variant.id);
}
MainWindow * mw = (MainWindow *)this->parent();
mw->checkForUpdates(true, variant.id);
firmwareChanged();
}
void fwPreferencesDialog::shrink()
{
resize(0,0);
}

View file

@ -24,6 +24,9 @@ private:
QList<QCheckBox *> optionsCheckBoxes;
bool updateLock;
void showVoice(bool);
void showVoice();
void hideVoice();
void populateLocale();
void populateFirmwareOptions(const FirmwareInfo *);
FirmwareVariant getFirmwareVariant();
@ -39,12 +42,7 @@ private slots:
void firmwareChanged();
void on_fw_dnld_clicked();
void on_voice_dnld_clicked();
void on_sdPathButton_clicked();
void on_checkFWUpdates_clicked();
void on_ProfSlot_SB_valueChanged();
void on_ProfSave_PB_clicked();
void on_SplashSelect_clicked();
void on_clearImageButton_clicked();
};
#endif // FWPREFERENCESDIALOG_H

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>620</width>
<height>658</height>
<height>437</height>
</rect>
</property>
<property name="sizePolicy">
@ -32,181 +32,13 @@
<property name="margin">
<number>6</number>
</property>
<item row="21" column="5">
<widget class="QPushButton" name="voice_dnld">
<property name="text">
<string>Download Voice</string>
<item row="38" column="5">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="35" column="2" colspan="3">
<widget class="QCheckBox" name="burnFirmware">
<property name="text">
<string>Offer to write FW to Tx after download</string>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QCheckBox" name="optionCheckBox_9">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="10" column="3">
<widget class="QCheckBox" name="optionCheckBox_10">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="18" column="5">
<widget class="QPushButton" name="fw_dnld">
<property name="text">
<string>Download FW</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Options</string>
</property>
</widget>
</item>
<item row="12" column="4">
<widget class="QCheckBox" name="optionCheckBox_19">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="9" column="5">
<widget class="QCheckBox" name="optionCheckBox_8">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="14" column="2">
<widget class="QCheckBox" name="optionCheckBox_25">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="9" column="4">
<widget class="QCheckBox" name="optionCheckBox_7">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="11" column="4">
<widget class="QCheckBox" name="optionCheckBox_15">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="8" column="4">
<widget class="QCheckBox" name="optionCheckBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="CPU_ID_LABEL">
<property name="text">
<string>Processor ID</string>
</property>
</widget>
</item>
<item row="17" column="4">
<widget class="QCheckBox" name="optionCheckBox_39">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="2" colspan="4">
<widget class="QLabel" name="FwInfo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FwInfo</string>
</property>
</widget>
</item>
<item row="17" column="5">
<widget class="QCheckBox" name="optionCheckBox_40">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@ -223,6 +55,19 @@
</property>
</widget>
</item>
<item row="15" column="5">
<widget class="QCheckBox" name="optionCheckBox_32">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="11" column="5">
<widget class="QCheckBox" name="optionCheckBox_16">
<property name="sizePolicy">
@ -246,35 +91,6 @@
</property>
</widget>
</item>
<item row="32" column="0" colspan="2">
<widget class="QLabel" name="label_14">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Default Stick Mode</string>
</property>
</widget>
</item>
<item row="33" column="0" colspan="2">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Channel Order</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QCheckBox" name="optionCheckBox_2">
<property name="sizePolicy">
@ -301,60 +117,6 @@
</property>
</widget>
</item>
<item row="32" column="2" colspan="2">
<widget class="QComboBox" name="stickmodeCB">
<property name="maximumSize">
<size>
<width>190</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>Mode selection:
Mode 1:
Left stick: Elevator, Rudder
Right stick: Throttle, Aileron
Mode 2:
Left stick: Throttle, Rudder
Right stick: Elevator, Aileron
Mode 3:
Left stick: Elevator, Aileron
Right stick: Throttle, Rudder
Mode 4:
Left stick: Throttle, Aileron
Right stick: Elevator, Rudder
</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Mode 1 (RUD ELE THR AIL)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 2 (RUD THR ELE AIL)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 3 (AIL ELE THR RUD)</string>
</property>
</item>
<item>
<property name="text">
<string>Mode 4 (AIL THR ELE RUD)</string>
</property>
</item>
</widget>
</item>
<item row="15" column="2">
<widget class="QCheckBox" name="optionCheckBox_29">
<property name="sizePolicy">
@ -394,6 +156,9 @@ Mode 4:
</property>
</widget>
</item>
<item row="3" column="2" colspan="3">
<widget class="QComboBox" name="downloadVerCB"/>
</item>
<item row="7" column="2">
<widget class="QComboBox" name="langCombo">
<property name="sizePolicy">
@ -410,8 +175,8 @@ Mode 4:
</property>
</widget>
</item>
<item row="3" column="2" colspan="3">
<widget class="QComboBox" name="downloadVerCB"/>
<item row="5" column="2" colspan="3">
<widget class="QLineEdit" name="CPU_ID_LE"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="label_6">
@ -436,159 +201,6 @@ Mode 4:
</property>
</widget>
</item>
<item row="5" column="2" colspan="3">
<widget class="QLineEdit" name="CPU_ID_LE"/>
</item>
<item row="33" column="2" colspan="2">
<widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>Channel order
This is used by the templated to determine which channel goes to what number output.</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string notr="true">R E T A</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">R E A T</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">R T E A</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">R T A E</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">R A E T</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">R A T E</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">E R T A</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">E R A T</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">E T R A</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">E T A R</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">E A R T</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">E A T R</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">T R E A</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">T R A E</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">T E R A</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">T E A R</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">T A R E</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">T A E R</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">A R E T</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">A R T E</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">A E R T</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">A E T R</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">A T R E</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">A T E R</string>
</property>
</item>
</widget>
</item>
<item row="8" column="5">
<widget class="QCheckBox" name="optionCheckBox_4">
<property name="sizePolicy">
@ -641,19 +253,6 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="15" column="5">
<widget class="QCheckBox" name="optionCheckBox_32">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QCheckBox" name="optionCheckBox_17">
<property name="sizePolicy">
@ -914,40 +513,6 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="34" column="2" colspan="3">
<widget class="QCheckBox" name="renameFirmware">
<property name="text">
<string>Append version number to FW file name</string>
</property>
</widget>
</item>
<item row="46" column="5">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="23" column="0">
<widget class="QLabel" name="label_16">
<property name="font">
<font>
<family>Sans Serif</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Profile</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QPushButton" name="checkFWUpdates">
<property name="minimumSize">
@ -961,37 +526,6 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="25" column="2" colspan="3">
<widget class="QLineEdit" name="SplashFileName">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="21" column="2">
<widget class="QComboBox" name="voiceCombo">
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Set language of voice.
May be different from firmware language</string>
</property>
</widget>
</item>
<item row="25" column="5">
<widget class="QPushButton" name="SplashSelect">
<property name="text">
<string>Open Image</string>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="voiceLabel">
<property name="font">
@ -1006,109 +540,202 @@ May be different from firmware language</string>
</property>
</widget>
</item>
<item row="25" column="0">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Splash Screen</string>
</property>
</widget>
</item>
<item row="32" column="5">
<widget class="QPushButton" name="clearImageButton">
<property name="text">
<string>Clear Image</string>
</property>
</widget>
</item>
<item row="23" column="3" colspan="2">
<widget class="QLineEdit" name="ProfName_LE"/>
</item>
<item row="23" column="2">
<widget class="QSpinBox" name="ProfSlot_SB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="21" column="2">
<widget class="QComboBox" name="voiceCombo">
<property name="maximumSize">
<size>
<width>16777215</width>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
<property name="toolTip">
<string>Set language of voice.
May be different from firmware language</string>
</property>
</widget>
</item>
<item row="22" column="0" colspan="6">
<widget class="Line" name="line_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="20" column="0" colspan="6">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="45" column="0" colspan="6">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="24" column="5">
<widget class="QPushButton" name="sdPathButton">
<item row="21" column="5">
<widget class="QPushButton" name="voice_dnld">
<property name="text">
<string>Open Folder</string>
<string>Download Voice</string>
</property>
</widget>
</item>
<item row="24" column="2" colspan="3">
<widget class="QLineEdit" name="sdPath">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="24" column="0">
<widget class="QLabel" name="sdPathLabel">
<item row="10" column="2">
<widget class="QCheckBox" name="optionCheckBox_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>SD Structure path</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="35" column="5">
<widget class="QPushButton" name="ProfSave_PB">
<item row="10" column="3">
<widget class="QCheckBox" name="optionCheckBox_10">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Save Profile</string>
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="18" column="5">
<widget class="QPushButton" name="fw_dnld">
<property name="text">
<string>Download FW</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Options</string>
</property>
</widget>
</item>
<item row="12" column="4">
<widget class="QCheckBox" name="optionCheckBox_19">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="9" column="5">
<widget class="QCheckBox" name="optionCheckBox_8">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="14" column="2">
<widget class="QCheckBox" name="optionCheckBox_25">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="9" column="4">
<widget class="QCheckBox" name="optionCheckBox_7">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="11" column="4">
<widget class="QCheckBox" name="optionCheckBox_15">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="8" column="4">
<widget class="QCheckBox" name="optionCheckBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLabel" name="CPU_ID_LABEL">
<property name="text">
<string>Processor ID</string>
</property>
</widget>
</item>
<item row="17" column="4">
<widget class="QCheckBox" name="optionCheckBox_39">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="2" colspan="4">
<widget class="QLabel" name="FwInfo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>FwInfo</string>
</property>
</widget>
</item>
<item row="17" column="5">
<widget class="QCheckBox" name="optionCheckBox_40">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="20" column="1" colspan="5">
<widget class="Line" name="voiceLine">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="37" column="1" colspan="5">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
@ -1161,10 +788,6 @@ May be different from firmware language</string>
<tabstop>optionCheckBox_40</tabstop>
<tabstop>optionCheckBox_41</tabstop>
<tabstop>optionCheckBox_42</tabstop>
<tabstop>stickmodeCB</tabstop>
<tabstop>channelorderCB</tabstop>
<tabstop>renameFirmware</tabstop>
<tabstop>burnFirmware</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

View file

@ -1701,10 +1701,6 @@ void MainWindow::createActions()
logsAct->setStatusTip(tr("Open log file"));
connect(logsAct, SIGNAL(triggered()), this, SLOT(logFile()));
preferencesAct = new QAction(tr("&Old Preferences Dialog..."), this);
preferencesAct->setStatusTip(tr("Used the old Preferences Dialog"));
connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences()));
appPreferencesAct = new QAction(CompanionIcon("apppreferences.png"), tr("&Setting..."), this);
appPreferencesAct->setStatusTip(tr("Edit Settings"));
connect(appPreferencesAct, SIGNAL(triggered()), this, SLOT(appPreferences()));
@ -1977,7 +1973,6 @@ void MainWindow::createMenus()
settingsMenu->addSeparator();
settingsMenu->addAction(appPreferencesAct);
settingsMenu->addAction(customizeSplashAct);
settingsMenu->addAction(preferencesAct);
settingsMenu->addAction(burnConfigAct);
burnMenu = menuBar()->addMenu(tr("&Read/Write"));

View file

@ -224,7 +224,6 @@ private:
QAction *saveAct;
QAction *saveAsAct;
QAction *exitAct;
QAction *preferencesAct;
QAction *appPreferencesAct;
QAction *fwPreferencesAct;
QAction *checkForUpdatesAct;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 876 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After