Cosmetics

This commit is contained in:
bsongis
2014-06-04 16:36:29 +02:00
parent 016eafefab
commit e9084e4d59
3 changed files with 16 additions and 15 deletions
+3 -3
View File
@@ -174,14 +174,14 @@ void AppPreferencesDialog::initSettings()
QString hwSettings; QString hwSettings;
if (g.profile[g.id()].stickPotCalib() == "" ) { if (g.profile[g.id()].stickPotCalib() == "" ) {
hwSettings = QString(tr("EMPTY: No radio settings stored in profile")); hwSettings = tr("EMPTY: No radio settings stored in profile");
} }
else { else {
QString str = g.profile[g.id()].timeStamp(); QString str = g.profile[g.id()].timeStamp();
if (str.isEmpty()) if (str.isEmpty())
hwSettings = QString(tr("AVAILABLE: Radio settings of unknown age")); hwSettings = tr("AVAILABLE: Radio settings of unknown age");
else else
hwSettings = QString(tr("AVAILABLE: Radio settings stored %1").arg(str)); hwSettings = tr("AVAILABLE: Radio settings stored %1").arg(str);
} }
ui->lblGeneralSettings->setText(hwSettings); ui->lblGeneralSettings->setText(hwSettings);
+3 -2
View File
@@ -1939,7 +1939,8 @@ void MainWindow::updateProfilesActions()
} }
void MainWindow::createProfile() void MainWindow::createProfile()
{ int i; {
int i;
for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++) for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++)
; ;
if (i==MAX_PROFILES) //Failed to find free slot if (i==MAX_PROFILES) //Failed to find free slot
@@ -1947,7 +1948,7 @@ for (i=0; i<MAX_PROFILES && g.profile[i].existsOnDisk(); i++)
// Copy current profile to new and give it a new name // Copy current profile to new and give it a new name
g.profile[i] = g.profile[g.id()]; g.profile[i] = g.profile[g.id()];
g.profile[i].name( QString(tr("New Radio"))); g.profile[i].name(tr("New Radio"));
g.id(i); g.id(i);
updateMenus(); updateMenus();
+6 -6
View File
@@ -18,8 +18,8 @@
#include "helpers.h" #include "helpers.h"
#include "googleanalytics.h" #include "googleanalytics.h"
WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelId, QWidget *parent) WizardDialog::WizardDialog(const GeneralSettings & settings, unsigned int modelId, QWidget *parent):
: QWizard(parent), QWizard(parent),
mix(settings, modelId), mix(settings, modelId),
settings(settings) settings(settings)
{ {
@@ -1012,10 +1012,10 @@ WizardPrinter::WizardPrinter(WizMix *wizMix)
QString WizardPrinter::print() QString WizardPrinter::print()
{ {
QString str = QString(tr("Model Name: ")) + mix->name + "\n"; QString str = tr("Model Name: ") + mix->name + "\n";
str += QString(tr("Model Type: ")) + vehicleName(mix->vehicle) + "\n"; str += tr("Model Type: ") + vehicleName(mix->vehicle) + "\n";
str += QString(tr("Options: ")) + "["; str += tr("Options: ") + "[";
for (int i=0; i<WIZ_MAX_OPTIONS; i++) { for (int i=0; i<WIZ_MAX_OPTIONS; i++) {
if (mix->options[i]) if (mix->options[i])
str += "X"; str += "X";
@@ -1027,7 +1027,7 @@ QString WizardPrinter::print()
for (int i=0; i<WIZ_MAX_CHANNELS; i++) { for (int i=0; i<WIZ_MAX_CHANNELS; i++) {
if (mix->channel[i].page != Page_None) { if (mix->channel[i].page != Page_None) {
Channel ch = mix->channel[i]; Channel ch = mix->channel[i];
str += QString(tr("Channel %1: ").arg(i+1)); str += tr("Channel %1: ").arg(i+1);
str += printChannel(ch.input1, ch.weight1, ch.input2, ch.weight2 ); str += printChannel(ch.input1, ch.weight1, ch.input2, ch.weight2 );
str += QString("\n"); str += QString("\n");
} }