Classes names capitalization

This commit is contained in:
bsongis
2014-04-18 18:11:22 +02:00
parent 5de6f4dc94
commit 146c421c84
8 changed files with 57 additions and 56 deletions
+22 -21
View File
@@ -11,9 +11,9 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QtGui> #include <QtGui>
appPreferencesDialog::appPreferencesDialog(QWidget *parent) : AppPreferencesDialog::AppPreferencesDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::appPreferencesDialog) ui(new Ui::AppPreferencesDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowIcon(CompanionIcon("apppreferences.png")); setWindowIcon(CompanionIcon("apppreferences.png"));
@@ -29,12 +29,12 @@ appPreferencesDialog::appPreferencesDialog(QWidget *parent) :
resize(0,0); resize(0,0);
} }
appPreferencesDialog::~appPreferencesDialog() AppPreferencesDialog::~AppPreferencesDialog()
{ {
delete ui; delete ui;
} }
void appPreferencesDialog::writeValues() void AppPreferencesDialog::writeValues()
{ {
g.autoCheckApp(ui->startupCheck_companion9x->isChecked()); g.autoCheckApp(ui->startupCheck_companion9x->isChecked());
g.autoCheckFw(ui->startupCheck_fw->isChecked()); g.autoCheckFw(ui->startupCheck_fw->isChecked());
@@ -79,7 +79,7 @@ void appPreferencesDialog::writeValues()
} }
} }
void appPreferencesDialog::on_snapshotPathButton_clicked() void AppPreferencesDialog::on_snapshotPathButton_clicked()
{ {
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your snapshot folder"), g.snapshotDir()); QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your snapshot folder"), g.snapshotDir());
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
@@ -89,7 +89,7 @@ void appPreferencesDialog::on_snapshotPathButton_clicked()
} }
} }
void appPreferencesDialog::initSettings() void AppPreferencesDialog::initSettings()
{ {
ui->snapshotClipboardCKB->setChecked(g.snapToClpbrd()); ui->snapshotClipboardCKB->setChecked(g.snapToClpbrd());
ui->burnFirmware->setChecked(g.profile[g.id()].burnFirmware()); ui->burnFirmware->setChecked(g.profile[g.id()].burnFirmware());
@@ -178,7 +178,7 @@ void appPreferencesDialog::initSettings()
} }
void appPreferencesDialog::on_libraryPathButton_clicked() void AppPreferencesDialog::on_libraryPathButton_clicked()
{ {
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your library folder"), g.libDir()); QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your library folder"), g.libDir());
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
@@ -187,13 +187,14 @@ void appPreferencesDialog::on_libraryPathButton_clicked()
} }
} }
void appPreferencesDialog::on_snapshotClipboardCKB_clicked() void AppPreferencesDialog::on_snapshotClipboardCKB_clicked()
{ {
if (ui->snapshotClipboardCKB->isChecked()) { if (ui->snapshotClipboardCKB->isChecked()) {
ui->snapshotPath->setDisabled(true); ui->snapshotPath->setDisabled(true);
ui->snapshotPathButton->setDisabled(true); ui->snapshotPathButton->setDisabled(true);
g.snapToClpbrd(true); g.snapToClpbrd(true);
} else { }
else {
ui->snapshotPath->setEnabled(true); ui->snapshotPath->setEnabled(true);
ui->snapshotPath->setReadOnly(true); ui->snapshotPath->setReadOnly(true);
ui->snapshotPathButton->setEnabled(true); ui->snapshotPathButton->setEnabled(true);
@@ -201,7 +202,7 @@ void appPreferencesDialog::on_snapshotClipboardCKB_clicked()
} }
} }
void appPreferencesDialog::on_backupPathButton_clicked() void AppPreferencesDialog::on_backupPathButton_clicked()
{ {
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your Models and Settings backup folder"), g.backupDir()); QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your Models and Settings backup folder"), g.backupDir());
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
@@ -211,7 +212,7 @@ void appPreferencesDialog::on_backupPathButton_clicked()
ui->backupEnable->setEnabled(true); ui->backupEnable->setEnabled(true);
} }
void appPreferencesDialog::on_ge_pathButton_clicked() void AppPreferencesDialog::on_ge_pathButton_clicked()
{ {
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Google Earth executable"),ui->ge_lineedit->text()); QString fileName = QFileDialog::getOpenFileName(this, tr("Select Google Earth executable"),ui->ge_lineedit->text());
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
@@ -220,7 +221,7 @@ void appPreferencesDialog::on_ge_pathButton_clicked()
} }
#ifdef JOYSTICKS #ifdef JOYSTICKS
void appPreferencesDialog::on_joystickChkB_clicked() { void AppPreferencesDialog::on_joystickChkB_clicked() {
if (ui->joystickChkB->isChecked()) { if (ui->joystickChkB->isChecked()) {
QStringList joystickNames; QStringList joystickNames;
joystickNames << tr("No joysticks found"); joystickNames << tr("No joysticks found");
@@ -246,7 +247,7 @@ void appPreferencesDialog::on_joystickChkB_clicked() {
} }
} }
void appPreferencesDialog::on_joystickcalButton_clicked() { void AppPreferencesDialog::on_joystickcalButton_clicked() {
joystickDialog * jd=new joystickDialog(this, ui->joystickCB->currentIndex()); joystickDialog * jd=new joystickDialog(this, ui->joystickCB->currentIndex());
jd->exec(); jd->exec();
} }
@@ -254,7 +255,7 @@ void appPreferencesDialog::on_joystickcalButton_clicked() {
// ******** Profile tab functions // ******** Profile tab functions
void appPreferencesDialog::on_sdPathButton_clicked() void AppPreferencesDialog::on_sdPathButton_clicked()
{ {
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), g.profile[g.id()].sdPath()); QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), g.profile[g.id()].sdPath());
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
@@ -262,12 +263,12 @@ void appPreferencesDialog::on_sdPathButton_clicked()
} }
} }
void appPreferencesDialog::on_removeProfileButton_clicked() void AppPreferencesDialog::on_removeProfileButton_clicked()
{ {
if ( g.id() == 0 ) if ( g.id() == 0 ) {
QMessageBox::information(this, tr("Not possible to remove profile"), tr("The default profile can not be removed.")); QMessageBox::information(this, tr("Not possible to remove profile"), tr("The default profile can not be removed."));
else }
{ else {
g.profile[g.id()].remove(); g.profile[g.id()].remove();
g.id( 0 ); g.id( 0 );
initSettings(); initSettings();
@@ -275,7 +276,7 @@ void appPreferencesDialog::on_removeProfileButton_clicked()
} }
bool appPreferencesDialog::displayImage( QString fileName ) bool AppPreferencesDialog::displayImage( QString fileName )
{ {
// Start by clearing the pixmap // Start by clearing the pixmap
ui->imageLabel->setPixmap(QPixmap()); ui->imageLabel->setPixmap(QPixmap());
@@ -294,7 +295,7 @@ bool appPreferencesDialog::displayImage( QString fileName )
return true; return true;
} }
void appPreferencesDialog::on_SplashSelect_clicked() void AppPreferencesDialog::on_SplashSelect_clicked()
{ {
QString supportedImageFormats; QString supportedImageFormats;
for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) { for (int formatIndex = 0; formatIndex < QImageReader::supportedImageFormats().count(); formatIndex++) {
@@ -312,7 +313,7 @@ void appPreferencesDialog::on_SplashSelect_clicked()
} }
} }
void appPreferencesDialog::on_clearImageButton_clicked() { void AppPreferencesDialog::on_clearImageButton_clicked() {
ui->imageLabel->clear(); ui->imageLabel->clear();
ui->SplashFileName->clear(); ui->SplashFileName->clear();
} }
+5 -5
View File
@@ -6,23 +6,23 @@
#include "eeprominterface.h" #include "eeprominterface.h"
namespace Ui { namespace Ui {
class appPreferencesDialog; class AppPreferencesDialog;
} }
class Joystick; class Joystick;
class appPreferencesDialog : public QDialog class AppPreferencesDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit appPreferencesDialog(QWidget *parent = 0); explicit AppPreferencesDialog(QWidget *parent = 0);
~appPreferencesDialog(); ~AppPreferencesDialog();
Joystick *joystick; Joystick *joystick;
private: private:
int initialRadioType; int initialRadioType;
Ui::appPreferencesDialog *ui; Ui::AppPreferencesDialog *ui;
void initSettings(); void initSettings();
bool displayImage( QString fileName ); bool displayImage( QString fileName );
void loadProfileString(QString profile, QString label); void loadProfileString(QString profile, QString label);
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>appPreferencesDialog</class> <class>AppPreferencesDialog</class>
<widget class="QDialog" name="appPreferencesDialog"> <widget class="QDialog" name="AppPreferencesDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
+18 -18
View File
@@ -7,9 +7,9 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QtGui> #include <QtGui>
fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) : FirmwarePreferencesDialog::FirmwarePreferencesDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::fwPreferencesDialog), ui(new Ui::FirmwarePreferencesDialog),
updateLock(false) updateLock(false)
{ {
ui->setupUi(this); ui->setupUi(this);
@@ -43,12 +43,12 @@ fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) :
} }
fwPreferencesDialog::~fwPreferencesDialog() FirmwarePreferencesDialog::~FirmwarePreferencesDialog()
{ {
delete ui; delete ui;
} }
void fwPreferencesDialog::showVoice(bool show) void FirmwarePreferencesDialog::showVoice(bool show)
{ {
if (show) if (show)
showVoice(); showVoice();
@@ -56,7 +56,7 @@ void fwPreferencesDialog::showVoice(bool show)
hideVoice(); hideVoice();
} }
void fwPreferencesDialog::showVoice() void FirmwarePreferencesDialog::showVoice()
{ {
ui->voiceLine->show(); ui->voiceLine->show();
ui->voiceLabel->show(); ui->voiceLabel->show();
@@ -64,7 +64,7 @@ void fwPreferencesDialog::showVoice()
ui->voice_dnld->show(); ui->voice_dnld->show();
} }
void fwPreferencesDialog::hideVoice() void FirmwarePreferencesDialog::hideVoice()
{ {
ui->voiceLine->hide(); ui->voiceLine->hide();
ui->voiceLabel->hide(); ui->voiceLabel->hide();
@@ -73,12 +73,12 @@ void fwPreferencesDialog::hideVoice()
QTimer::singleShot(0, this, SLOT(shrink())); QTimer::singleShot(0, this, SLOT(shrink()));
} }
void fwPreferencesDialog::shrink() void FirmwarePreferencesDialog::shrink()
{ {
resize(0,0); resize(0,0);
} }
void fwPreferencesDialog::baseFirmwareChanged() void FirmwarePreferencesDialog::baseFirmwareChanged()
{ {
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
voice=NULL; voice=NULL;
@@ -92,7 +92,7 @@ void fwPreferencesDialog::baseFirmwareChanged()
firmwareChanged(); firmwareChanged();
} }
FirmwareVariant fwPreferencesDialog::getFirmwareVariant() FirmwareVariant FirmwarePreferencesDialog::getFirmwareVariant()
{ {
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex()); QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
bool voice=false; bool voice=false;
@@ -121,7 +121,7 @@ FirmwareVariant fwPreferencesDialog::getFirmwareVariant()
return default_firmware_variant; return default_firmware_variant;
} }
void fwPreferencesDialog::firmwareOptionChanged(bool state) void FirmwarePreferencesDialog::firmwareOptionChanged(bool state)
{ {
QCheckBox *cb = qobject_cast<QCheckBox*>(sender()); QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
FirmwareInterface * firmware=NULL; FirmwareInterface * firmware=NULL;
@@ -165,12 +165,12 @@ void fwPreferencesDialog::firmwareOptionChanged(bool state)
return firmwareChanged(); return firmwareChanged();
} }
void fwPreferencesDialog::firmwareLangChanged() void FirmwarePreferencesDialog::firmwareLangChanged()
{ {
firmwareChanged(); firmwareChanged();
} }
void fwPreferencesDialog::firmwareChanged() void FirmwarePreferencesDialog::firmwareChanged()
{ {
if (updateLock) if (updateLock)
return; return;
@@ -210,14 +210,14 @@ void fwPreferencesDialog::firmwareChanged()
} }
} }
void fwPreferencesDialog::writeValues() void FirmwarePreferencesDialog::writeValues()
{ {
g.cpuId( ui->CPU_ID_LE->text() ); g.cpuId( ui->CPU_ID_LE->text() );
current_firmware_variant = getFirmwareVariant(); current_firmware_variant = getFirmwareVariant();
g.profile[g.id()].fwType( current_firmware_variant.id ); g.profile[g.id()].fwType( current_firmware_variant.id );
} }
void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * firmware) void FirmwarePreferencesDialog::populateFirmwareOptions(const FirmwareInterface * firmware)
{ {
const FirmwareInterface * parent = /*firmware->parent ? firmware->parent : */firmware; const FirmwareInterface * parent = /*firmware->parent ? firmware->parent : */firmware;
@@ -270,7 +270,7 @@ void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * firm
QTimer::singleShot(0, this, SLOT(shrink())); QTimer::singleShot(0, this, SLOT(shrink()));
} }
void fwPreferencesDialog::initSettings() void FirmwarePreferencesDialog::initSettings()
{ {
ui->CPU_ID_LE->setText(g.cpuId()); ui->CPU_ID_LE->setText(g.cpuId());
FirmwareInterface * current_firmware = GetCurrentFirmware(); FirmwareInterface * current_firmware = GetCurrentFirmware();
@@ -286,7 +286,7 @@ void fwPreferencesDialog::initSettings()
firmwareChanged(); firmwareChanged();
} }
void fwPreferencesDialog::on_checkFWUpdates_clicked() void FirmwarePreferencesDialog::on_checkFWUpdates_clicked()
{ {
FirmwareVariant variant = getFirmwareVariant(); FirmwareVariant variant = getFirmwareVariant();
if (g.profile[g.id()].burnFirmware()) { if (g.profile[g.id()].burnFirmware()) {
@@ -298,7 +298,7 @@ void fwPreferencesDialog::on_checkFWUpdates_clicked()
firmwareChanged(); firmwareChanged();
} }
void fwPreferencesDialog::on_fw_dnld_clicked() void FirmwarePreferencesDialog::on_fw_dnld_clicked()
{ {
MainWindow * mw = (MainWindow *)this->parent(); MainWindow * mw = (MainWindow *)this->parent();
FirmwareVariant variant = getFirmwareVariant(); FirmwareVariant variant = getFirmwareVariant();
@@ -313,7 +313,7 @@ void fwPreferencesDialog::on_fw_dnld_clicked()
firmwareChanged(); firmwareChanged();
} }
void fwPreferencesDialog::on_voice_dnld_clicked() void FirmwarePreferencesDialog::on_voice_dnld_clicked()
{ {
QString url="http://fw.opentx.it/voices/"; QString url="http://fw.opentx.it/voices/";
FirmwareVariant variant = getFirmwareVariant(); FirmwareVariant variant = getFirmwareVariant();
+5 -5
View File
@@ -6,21 +6,21 @@
#include "eeprominterface.h" #include "eeprominterface.h"
namespace Ui { namespace Ui {
class fwPreferencesDialog; class FirmwarePreferencesDialog;
} }
class Joystick; class Joystick;
class fwPreferencesDialog : public QDialog class FirmwarePreferencesDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit fwPreferencesDialog(QWidget *parent = 0); explicit FirmwarePreferencesDialog(QWidget *parent = 0);
~fwPreferencesDialog(); ~FirmwarePreferencesDialog();
private: private:
Ui::fwPreferencesDialog *ui; Ui::FirmwarePreferencesDialog *ui;
QList<QCheckBox *> optionsCheckBoxes; QList<QCheckBox *> optionsCheckBoxes;
bool updateLock; bool updateLock;
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>fwPreferencesDialog</class> <class>FirmwarePreferencesDialog</class>
<widget class="QDialog" name="fwPreferencesDialog"> <widget class="QDialog" name="FirmwarePreferencesDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
+2 -2
View File
@@ -717,14 +717,14 @@ void MainWindow::loadProfile() //TODO Load all variables - Also HW!
void MainWindow::appPrefs() void MainWindow::appPrefs()
{ {
appPreferencesDialog *pd = new appPreferencesDialog(this); AppPreferencesDialog *pd = new AppPreferencesDialog(this);
pd->exec(); pd->exec();
updateMenus(); updateMenus();
} }
void MainWindow::fwPrefs() void MainWindow::fwPrefs()
{ {
fwPreferencesDialog *pd = new fwPreferencesDialog(this); FirmwarePreferencesDialog *pd = new FirmwarePreferencesDialog(this);
pd->exec(); pd->exec();
foreach (QMdiSubWindow *window, mdiArea->subWindowList()) { foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget()); MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
+1 -1
View File
@@ -63,7 +63,7 @@ QT_END_NAMESPACE
class MainWindow : public QMainWindow class MainWindow : public QMainWindow
{ {
friend class fwPreferencesDialog; friend class FirmwarePreferencesDialog;
friend class MdiChild; // TODO GetAvrdudeArgs could be external to this class friend class MdiChild; // TODO GetAvrdudeArgs could be external to this class
Q_OBJECT Q_OBJECT