1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

A few bug fixes and an updated Swedish translation.

This commit is contained in:
Kjell Kernen 2014-02-11 14:03:03 +01:00
parent 2c60b84258
commit 18a2af7291
6 changed files with 767 additions and 976 deletions

View file

@ -61,10 +61,12 @@ void appPreferencesDialog::writeValues()
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
settings.setValue("profileId", ui->profileIndexLE->text());
settings.setValue("Name", ui->profileNameLE->text());
settings.setValue("sdPath", ui->sdPath->text());
settings.setValue("SplashFileName", ui->SplashFileName->text());
if (!ui->SplashFileName->text().isEmpty())
settings.setValue("SplashImage", "");
settings.setValue("firmware", ui->firmwareLE->text());
saveProfile();
}
@ -161,6 +163,7 @@ void appPreferencesDialog::initSettings()
ui->sdPath->setText(Path);
}
ui->profileIndexLE->setText(settings.value("profileId", "").toString());
ui->profileNameLE->setText(settings.value("Name", "").toString());
QString fileName=settings.value("SplashFileName","").toString();
if (!fileName.isEmpty()) {
@ -170,6 +173,7 @@ void appPreferencesDialog::initSettings()
displayImage( fileName );
}
}
ui->firmwareLE->setText(settings.value("firmware","").toString());
}
void appPreferencesDialog::on_libraryPathButton_clicked()
@ -266,10 +270,10 @@ void appPreferencesDialog::saveProfile()
QSettings settings;
QString profile=QString("profile") + settings.value("profileId").toString();
QString name=ui->ProfName_LE->text();
QString name=ui->profileNameLE->text();
if (name.isEmpty()) {
name = profile;
ui->ProfName_LE->setText(name);
ui->profileNameLE->setText(name);
}
settings.beginGroup("Profiles");
settings.beginGroup(profile);
@ -280,6 +284,7 @@ void appPreferencesDialog::saveProfile()
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("sdPath", ui->sdPath->text());
settings.setValue("SplashFileName", ui->SplashFileName->text());
settings.setValue("firmware", ui->firmwareLE->text());
settings.endGroup();
settings.endGroup();
}
@ -310,6 +315,7 @@ void appPreferencesDialog::loadProfile()
loadProfileString( profile, "rename_firmware_files" );
loadProfileString( profile, "sdPath" );
loadProfileString( profile, "SplashFileName" );
loadProfileString( profile, "firmware" );
}
void appPreferencesDialog::on_removeProfileButton_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">
@ -888,7 +888,7 @@ This is used by the templated to determine which channel goes to what number out
</widget>
</item>
<item row="0" column="2">
<widget class="QLineEdit" name="ProfName_LE">
<widget class="QLineEdit" name="profileNameLE">
<property name="minimumSize">
<size>
<width>0</width>
@ -933,6 +933,20 @@ This is used by the templated to determine which channel goes to what number out
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Firmware</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="firmwareLE">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>

View file

@ -746,8 +746,6 @@ void MainWindow::loadProfile()
{
QSettings settings;
QAction *action = qobject_cast<QAction *>(sender());
int chord,defmod, burnfw;
bool renfw;
if (action) {
int profnum=action->data().toInt();
@ -756,12 +754,12 @@ void MainWindow::loadProfile()
settings.beginGroup("Profiles");
QString profile=QString("profile%1").arg(profnum);
settings.beginGroup(profile);
ActiveProfileName=settings.value("Name", "").toString();
chord=settings.value("default_channel_order", 0).toInt();
defmod=settings.value("default_mode", 0).toInt();
burnfw=settings.value("burnFirmware", 0).toInt();
QString profileName=settings.value("Name", "").toString();
int chord=settings.value("default_channel_order", 0).toInt();
int defmod=settings.value("default_mode", 0).toInt();
bool burnfw=settings.value("burnFirmware", false).toBool();
QString sdPath=settings.value("sdPath", ".").toString();
renfw=settings.value("rename_firmware_files", false).toBool();
bool renfw=settings.value("rename_firmware_files", false).toBool();
QString SplashFileName=settings.value("SplashFileName","").toString();
QString SplashImage=settings.value("SplashImage", "").toString();
QString firmware_id=settings.value("firmware", default_firmware_variant.id).toString();
@ -770,6 +768,7 @@ void MainWindow::loadProfile()
settings.setValue("firmware", firmware_id);
settings.endGroup();
settings.endGroup();
settings.setValue("Name", profileName );
settings.setValue("default_channel_order", chord);
settings.setValue("default_mode", defmod);
settings.setValue("burnFirmware", burnfw);
@ -2066,13 +2065,6 @@ void MainWindow::readSettings()
createProfile();
settings.setValue("profileId", "1");
}
int activeProfile=settings.value("profileId",0).toInt();
settings.beginGroup("Profiles");
QString profile=QString("profile%1").arg(activeProfile);
settings.beginGroup(profile);
ActiveProfileName=settings.value("Name","").toString();
settings.endGroup();
settings.endGroup();
}
MdiChild *MainWindow::activeMdiChild()

View file

@ -189,7 +189,6 @@ private:
QString installer_fileName;
QString downloadedFW;
QString downloadedFWFilename;
QString ActiveProfileName;
downloadDialog * downloadDialog_forWait;
bool checkCompanion9x;

View file

@ -1,505 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>appPreferencesDialog</class>
<widget class="QDialog" name="appPreferencesDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>685</width>
<height>456</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>685</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Application Preferences</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>2</number>
</property>
<property name="margin">
<number>6</number>
</property>
<item row="20" column="8">
<widget class="QPushButton" name="libraryPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="22" column="1" colspan="8">
<widget class="Line" name="line_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="1" colspan="8">
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="label_11">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Joystick</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Simulator capture folder</string>
</property>
</widget>
</item>
<item row="15" column="1" colspan="7">
<widget class="QCheckBox" name="simuSW">
<property name="text">
<string>Remember simulator switch values</string>
</property>
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="label_9">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>User Splash Screens</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Files to keep</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="7">
<widget class="QCheckBox" name="wizardEnable_ChkB">
<property name="text">
<string>Offer to use wizard for new models</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="18" column="1" colspan="8">
<widget class="Line" name="line_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="16" column="1">
<widget class="QComboBox" name="backLightColor">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<item>
<property name="text">
<string>Blue</string>
</property>
</item>
<item>
<property name="text">
<string>Green</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
</widget>
</item>
<item row="7" column="1" colspan="7">
<widget class="QCheckBox" name="startupCheck_companion9x">
<property name="text">
<string>Automatic check for Companion updates</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="1" colspan="8">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="13" column="1" colspan="7">
<widget class="QLineEdit" name="snapshotPath">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="14" column="1" colspan="7">
<widget class="QCheckBox" name="snapshotClipboardCKB">
<property name="text">
<string>Only capture to clipboard</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="historySize">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>40</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>16777215</height>
</size>
</property>
<property name="maximum">
<number>15</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="12" column="1" colspan="8">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="1" colspan="8">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="1" colspan="7">
<widget class="QLineEdit" name="ge_lineedit">
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="17" column="8">
<widget class="QPushButton" name="joystickcalButton">
<property name="text">
<string>Calibrate</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Automatic Backup Folder</string>
</property>
</widget>
</item>
<item row="23" column="7" colspan="2">
<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="13" column="8">
<widget class="QPushButton" name="snapshotPathButton">
<property name="text">
<string>Open Folder</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="10" column="1" colspan="7">
<widget class="QLineEdit" name="backupPath">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QComboBox" name="joystickCB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Simulator BackLight</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="11" column="1" colspan="7">
<widget class="QCheckBox" name="backupEnable">
<property name="text">
<string>Enable automatic backup before writing firmware</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="7">
<widget class="QCheckBox" name="showSplash">
<property name="text">
<string>Show splash screen when Companion starts</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="8">
<widget class="QPushButton" name="ge_pathButton">
<property name="text">
<string>Find Executable</string>
</property>
</widget>
</item>
<item row="10" column="8">
<widget class="QPushButton" name="backupPathButton">
<property name="text">
<string>Open Folder</string>
</property>
</widget>
</item>
<item row="17" column="4" colspan="4">
<widget class="QCheckBox" name="joystickChkB">
<property name="text">
<string>Enable</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="ge_label">
<property name="text">
<string>Google Earth Executable</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="7">
<widget class="QCheckBox" name="startupCheck_fw">
<property name="text">
<string>Automatic check for OpenTX firmware updates</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QComboBox" name="splashincludeCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Include companion splashes</string>
</property>
</item>
<item>
<property name="text">
<string>Only user defined splashes</string>
</property>
</item>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Splash Screen Library</string>
</property>
</widget>
</item>
<item row="20" column="1" colspan="7">
<widget class="QLineEdit" name="libraryPath">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
<zorder>startupCheck_companion9x</zorder>
<zorder>backupEnable</zorder>
<zorder>line</zorder>
<zorder>backupPath</zorder>
<zorder>line_2</zorder>
<zorder>startupCheck_fw</zorder>
<zorder>wizardEnable_ChkB</zorder>
<zorder>ge_label</zorder>
<zorder>label_5</zorder>
<zorder>showSplash</zorder>
<zorder>line_3</zorder>
<zorder>ge_pathButton</zorder>
<zorder>line_4</zorder>
<zorder>backupPathButton</zorder>
<zorder>label_3</zorder>
<zorder>backLightColor</zorder>
<zorder>snapshotPath</zorder>
<zorder>snapshotPathButton</zorder>
<zorder>snapshotClipboardCKB</zorder>
<zorder>label_11</zorder>
<zorder>joystickCB</zorder>
<zorder>joystickcalButton</zorder>
<zorder>ge_lineedit</zorder>
<zorder>simuSW</zorder>
<zorder>buttonBox</zorder>
<zorder>line_5</zorder>
<zorder>joystickChkB</zorder>
<zorder>label_17</zorder>
<zorder>label_19</zorder>
<zorder>historySize</zorder>
<zorder>label_9</zorder>
<zorder>libraryPath</zorder>
<zorder>libraryPathButton</zorder>
<zorder>line_6</zorder>
<zorder>splashincludeCB</zorder>
<zorder>label_10</zorder>
</widget>
<tabstops>
<tabstop>buttonBox</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>snapshotPath</tabstop>
<tabstop>snapshotPathButton</tabstop>
<tabstop>snapshotClipboardCKB</tabstop>
<tabstop>simuSW</tabstop>
<tabstop>backLightColor</tabstop>
<tabstop>joystickCB</tabstop>
<tabstop>joystickChkB</tabstop>
<tabstop>joystickcalButton</tabstop>
</tabstops>
<resources>
<include location="companion.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>appPreferencesDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>376</x>
<y>596</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>appPreferencesDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>396</x>
<y>596</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

File diff suppressed because it is too large Load diff