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 <QtGui>
appPreferencesDialog::appPreferencesDialog(QWidget *parent) :
AppPreferencesDialog::AppPreferencesDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::appPreferencesDialog)
ui(new Ui::AppPreferencesDialog)
{
ui->setupUi(this);
setWindowIcon(CompanionIcon("apppreferences.png"));
@@ -29,12 +29,12 @@ appPreferencesDialog::appPreferencesDialog(QWidget *parent) :
resize(0,0);
}
appPreferencesDialog::~appPreferencesDialog()
AppPreferencesDialog::~AppPreferencesDialog()
{
delete ui;
}
void appPreferencesDialog::writeValues()
void AppPreferencesDialog::writeValues()
{
g.autoCheckApp(ui->startupCheck_companion9x->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());
if (!fileName.isEmpty()) {
@@ -89,7 +89,7 @@ void appPreferencesDialog::on_snapshotPathButton_clicked()
}
}
void appPreferencesDialog::initSettings()
void AppPreferencesDialog::initSettings()
{
ui->snapshotClipboardCKB->setChecked(g.snapToClpbrd());
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());
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()) {
ui->snapshotPath->setDisabled(true);
ui->snapshotPathButton->setDisabled(true);
g.snapToClpbrd(true);
} else {
}
else {
ui->snapshotPath->setEnabled(true);
ui->snapshotPath->setReadOnly(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());
if (!fileName.isEmpty()) {
@@ -211,7 +212,7 @@ void appPreferencesDialog::on_backupPathButton_clicked()
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());
if (!fileName.isEmpty()) {
@@ -220,7 +221,7 @@ void appPreferencesDialog::on_ge_pathButton_clicked()
}
#ifdef JOYSTICKS
void appPreferencesDialog::on_joystickChkB_clicked() {
void AppPreferencesDialog::on_joystickChkB_clicked() {
if (ui->joystickChkB->isChecked()) {
QStringList joystickNames;
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());
jd->exec();
}
@@ -254,7 +255,7 @@ void appPreferencesDialog::on_joystickcalButton_clicked() {
// ******** 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());
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."));
else
{
}
else {
g.profile[g.id()].remove();
g.id( 0 );
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
ui->imageLabel->setPixmap(QPixmap());
@@ -294,7 +295,7 @@ bool appPreferencesDialog::displayImage( QString fileName )
return true;
}
void appPreferencesDialog::on_SplashSelect_clicked()
void AppPreferencesDialog::on_SplashSelect_clicked()
{
QString supportedImageFormats;
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->SplashFileName->clear();
}
+5 -5
View File
@@ -6,23 +6,23 @@
#include "eeprominterface.h"
namespace Ui {
class appPreferencesDialog;
class AppPreferencesDialog;
}
class Joystick;
class appPreferencesDialog : public QDialog
class AppPreferencesDialog : public QDialog
{
Q_OBJECT
public:
explicit appPreferencesDialog(QWidget *parent = 0);
~appPreferencesDialog();
explicit AppPreferencesDialog(QWidget *parent = 0);
~AppPreferencesDialog();
Joystick *joystick;
private:
int initialRadioType;
Ui::appPreferencesDialog *ui;
Ui::AppPreferencesDialog *ui;
void initSettings();
bool displayImage( QString fileName );
void loadProfileString(QString profile, QString label);
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>appPreferencesDialog</class>
<widget class="QDialog" name="appPreferencesDialog">
<class>AppPreferencesDialog</class>
<widget class="QDialog" name="AppPreferencesDialog">
<property name="geometry">
<rect>
<x>0</x>
+18 -18
View File
@@ -7,9 +7,9 @@
#include <QDesktopServices>
#include <QtGui>
fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) :
FirmwarePreferencesDialog::FirmwarePreferencesDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::fwPreferencesDialog),
ui(new Ui::FirmwarePreferencesDialog),
updateLock(false)
{
ui->setupUi(this);
@@ -43,12 +43,12 @@ fwPreferencesDialog::fwPreferencesDialog(QWidget *parent) :
}
fwPreferencesDialog::~fwPreferencesDialog()
FirmwarePreferencesDialog::~FirmwarePreferencesDialog()
{
delete ui;
}
void fwPreferencesDialog::showVoice(bool show)
void FirmwarePreferencesDialog::showVoice(bool show)
{
if (show)
showVoice();
@@ -56,7 +56,7 @@ void fwPreferencesDialog::showVoice(bool show)
hideVoice();
}
void fwPreferencesDialog::showVoice()
void FirmwarePreferencesDialog::showVoice()
{
ui->voiceLine->show();
ui->voiceLabel->show();
@@ -64,7 +64,7 @@ void fwPreferencesDialog::showVoice()
ui->voice_dnld->show();
}
void fwPreferencesDialog::hideVoice()
void FirmwarePreferencesDialog::hideVoice()
{
ui->voiceLine->hide();
ui->voiceLabel->hide();
@@ -73,12 +73,12 @@ void fwPreferencesDialog::hideVoice()
QTimer::singleShot(0, this, SLOT(shrink()));
}
void fwPreferencesDialog::shrink()
void FirmwarePreferencesDialog::shrink()
{
resize(0,0);
}
void fwPreferencesDialog::baseFirmwareChanged()
void FirmwarePreferencesDialog::baseFirmwareChanged()
{
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
voice=NULL;
@@ -92,7 +92,7 @@ void fwPreferencesDialog::baseFirmwareChanged()
firmwareChanged();
}
FirmwareVariant fwPreferencesDialog::getFirmwareVariant()
FirmwareVariant FirmwarePreferencesDialog::getFirmwareVariant()
{
QVariant selected_firmware = ui->downloadVerCB->itemData(ui->downloadVerCB->currentIndex());
bool voice=false;
@@ -121,7 +121,7 @@ FirmwareVariant fwPreferencesDialog::getFirmwareVariant()
return default_firmware_variant;
}
void fwPreferencesDialog::firmwareOptionChanged(bool state)
void FirmwarePreferencesDialog::firmwareOptionChanged(bool state)
{
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
FirmwareInterface * firmware=NULL;
@@ -165,12 +165,12 @@ void fwPreferencesDialog::firmwareOptionChanged(bool state)
return firmwareChanged();
}
void fwPreferencesDialog::firmwareLangChanged()
void FirmwarePreferencesDialog::firmwareLangChanged()
{
firmwareChanged();
}
void fwPreferencesDialog::firmwareChanged()
void FirmwarePreferencesDialog::firmwareChanged()
{
if (updateLock)
return;
@@ -210,14 +210,14 @@ void fwPreferencesDialog::firmwareChanged()
}
}
void fwPreferencesDialog::writeValues()
void FirmwarePreferencesDialog::writeValues()
{
g.cpuId( ui->CPU_ID_LE->text() );
current_firmware_variant = getFirmwareVariant();
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;
@@ -270,7 +270,7 @@ void fwPreferencesDialog::populateFirmwareOptions(const FirmwareInterface * firm
QTimer::singleShot(0, this, SLOT(shrink()));
}
void fwPreferencesDialog::initSettings()
void FirmwarePreferencesDialog::initSettings()
{
ui->CPU_ID_LE->setText(g.cpuId());
FirmwareInterface * current_firmware = GetCurrentFirmware();
@@ -286,7 +286,7 @@ void fwPreferencesDialog::initSettings()
firmwareChanged();
}
void fwPreferencesDialog::on_checkFWUpdates_clicked()
void FirmwarePreferencesDialog::on_checkFWUpdates_clicked()
{
FirmwareVariant variant = getFirmwareVariant();
if (g.profile[g.id()].burnFirmware()) {
@@ -298,7 +298,7 @@ void fwPreferencesDialog::on_checkFWUpdates_clicked()
firmwareChanged();
}
void fwPreferencesDialog::on_fw_dnld_clicked()
void FirmwarePreferencesDialog::on_fw_dnld_clicked()
{
MainWindow * mw = (MainWindow *)this->parent();
FirmwareVariant variant = getFirmwareVariant();
@@ -313,7 +313,7 @@ void fwPreferencesDialog::on_fw_dnld_clicked()
firmwareChanged();
}
void fwPreferencesDialog::on_voice_dnld_clicked()
void FirmwarePreferencesDialog::on_voice_dnld_clicked()
{
QString url="http://fw.opentx.it/voices/";
FirmwareVariant variant = getFirmwareVariant();
+5 -5
View File
@@ -6,21 +6,21 @@
#include "eeprominterface.h"
namespace Ui {
class fwPreferencesDialog;
class FirmwarePreferencesDialog;
}
class Joystick;
class fwPreferencesDialog : public QDialog
class FirmwarePreferencesDialog : public QDialog
{
Q_OBJECT
public:
explicit fwPreferencesDialog(QWidget *parent = 0);
~fwPreferencesDialog();
explicit FirmwarePreferencesDialog(QWidget *parent = 0);
~FirmwarePreferencesDialog();
private:
Ui::fwPreferencesDialog *ui;
Ui::FirmwarePreferencesDialog *ui;
QList<QCheckBox *> optionsCheckBoxes;
bool updateLock;
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>fwPreferencesDialog</class>
<widget class="QDialog" name="fwPreferencesDialog">
<class>FirmwarePreferencesDialog</class>
<widget class="QDialog" name="FirmwarePreferencesDialog">
<property name="geometry">
<rect>
<x>0</x>
+2 -2
View File
@@ -717,14 +717,14 @@ void MainWindow::loadProfile() //TODO Load all variables - Also HW!
void MainWindow::appPrefs()
{
appPreferencesDialog *pd = new appPreferencesDialog(this);
AppPreferencesDialog *pd = new AppPreferencesDialog(this);
pd->exec();
updateMenus();
}
void MainWindow::fwPrefs()
{
fwPreferencesDialog *pd = new fwPreferencesDialog(this);
FirmwarePreferencesDialog *pd = new FirmwarePreferencesDialog(this);
pd->exec();
foreach (QMdiSubWindow *window, mdiArea->subWindowList()) {
MdiChild *mdiChild = qobject_cast<MdiChild *>(window->widget());
+1 -1
View File
@@ -63,7 +63,7 @@ QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
friend class fwPreferencesDialog;
friend class FirmwarePreferencesDialog;
friend class MdiChild; // TODO GetAvrdudeArgs could be external to this class
Q_OBJECT