Cosmetics

This commit is contained in:
Bertrand Songis
2015-08-11 06:56:02 +02:00
parent 2d9c130839
commit a5bb41a31b
21 changed files with 49 additions and 41 deletions
+3 -3
View File
@@ -176,7 +176,7 @@ set(companion_SRCS
fusesdialog.cpp fusesdialog.cpp
logsdialog.cpp logsdialog.cpp
downloaddialog.cpp downloaddialog.cpp
splashlibrary.cpp splashlibrarydialog.cpp
mainwindow.cpp mainwindow.cpp
companion.cpp companion.cpp
radionotfound.cpp radionotfound.cpp
@@ -196,7 +196,7 @@ set(companion_MOC_HDRS
releasenotesdialog.h releasenotesdialog.h
releasenotesfirmwaredialog.h releasenotesfirmwaredialog.h
customizesplashdialog.h customizesplashdialog.h
splashlibrary.h splashlibrarydialog.h
splashlabel.h splashlabel.h
progresswidget.h progresswidget.h
progressdialog.h progressdialog.h
@@ -226,7 +226,7 @@ set(companion_UIS
printdialog.ui printdialog.ui
htmldialog.ui htmldialog.ui
customizesplashdialog.ui customizesplashdialog.ui
splashlibrary.ui splashlibrarydialog.ui
progresswidget.ui progresswidget.ui
progressdialog.ui progressdialog.ui
flashfirmwaredialog.ui flashfirmwaredialog.ui
+2 -2
View File
@@ -3,8 +3,8 @@
#include "flashfirmwaredialog.h" #include "flashfirmwaredialog.h"
#include "appdata.h" #include "appdata.h"
#include "helpers.h" #include "helpers.h"
#include "splashlibrary.h"
#include "firmwareinterface.h" #include "firmwareinterface.h"
#include "splashlibrarydialog.h"
//*** Side Class *** //*** Side Class ***
@@ -233,7 +233,7 @@ void customizeSplashDialog::on_rightLibraryButton_clicked(){libraryButton_clicke
void customizeSplashDialog::libraryButton_clicked( Side side ) void customizeSplashDialog::libraryButton_clicked( Side side )
{ {
QString fileName; QString fileName;
splashLibrary *ld = new splashLibrary(this,&fileName); SplashLibraryDialog *ld = new SplashLibraryDialog(this,&fileName);
ld->exec(); ld->exec();
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
if (!side.displayImage( fileName, UNDEFINED )) if (!side.displayImage( fileName, UNDEFINED ))
+1 -1
View File
@@ -2,13 +2,13 @@
#include "ui_flasheepromdialog.h" #include "ui_flasheepromdialog.h"
#include "eeprominterface.h" #include "eeprominterface.h"
#include "helpers.h" #include "helpers.h"
#include "splashlibrary.h"
#include "firmwareinterface.h" #include "firmwareinterface.h"
#include "hexinterface.h" #include "hexinterface.h"
#include "appdata.h" #include "appdata.h"
#include "progressdialog.h" #include "progressdialog.h"
#include "radiointerface.h" #include "radiointerface.h"
#include "converteeprom.h" #include "converteeprom.h"
#include "splashlibrarydialog.h"
FlashEEpromDialog::FlashEEpromDialog(QWidget *parent, const QString &filename): FlashEEpromDialog::FlashEEpromDialog(QWidget *parent, const QString &filename):
QDialog(parent), QDialog(parent),
+2 -2
View File
@@ -9,8 +9,8 @@
#include "hexinterface.h" #include "hexinterface.h"
#include "progressdialog.h" #include "progressdialog.h"
#include "radiointerface.h" #include "radiointerface.h"
#include "splashlibrary.h"
#include "progresswidget.h" #include "progresswidget.h"
#include "splashlibrarydialog.h"
#if defined WIN32 || !defined __GNUC__ #if defined WIN32 || !defined __GNUC__
#include <windows.h> #include <windows.h>
@@ -185,7 +185,7 @@ void FlashFirmwareDialog::on_useExternalSplash_clicked()
void FlashFirmwareDialog::on_useLibrarySplash_clicked() void FlashFirmwareDialog::on_useLibrarySplash_clicked()
{ {
QString fileName; QString fileName;
splashLibrary *ld = new splashLibrary(this, &fileName); SplashLibraryDialog *ld = new SplashLibraryDialog(this, &fileName);
ld->exec(); ld->exec();
if (!fileName.isEmpty()) { if (!fileName.isEmpty()) {
QImage image(fileName); QImage image(fileName);
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

+2 -2
View File
@@ -344,7 +344,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QToolButton" name="splashLibraryButton"> <widget class="QToolButton" name="SplashLibraryDialogButton">
<property name="text"> <property name="text">
<string>...</string> <string>...</string>
</property> </property>
@@ -455,7 +455,7 @@
<tabstop>splashincludeCB</tabstop> <tabstop>splashincludeCB</tabstop>
<tabstop>SplashFileName</tabstop> <tabstop>SplashFileName</tabstop>
<tabstop>SplashSelect</tabstop> <tabstop>SplashSelect</tabstop>
<tabstop>splashLibraryButton</tabstop> <tabstop>SplashLibraryDialogButton</tabstop>
<tabstop>clearImageButton</tabstop> <tabstop>clearImageButton</tabstop>
<tabstop>InvertPixels</tabstop> <tabstop>InvertPixels</tabstop>
<tabstop>buttonBox</tabstop> <tabstop>buttonBox</tabstop>
@@ -1,15 +1,18 @@
#include "splashlibrary.h" #include "splashlibrarydialog.h"
#include "ui_splashlibrary.h" #include "ui_splashlibrarydialog.h"
#include "appdata.h" #include "appdata.h"
#include <QtGui> #include <QtGui>
#include "helpers.h" #include "helpers.h"
#include "firmwareinterface.h" #include "firmwareinterface.h"
#include "helpers.h" #include "helpers.h"
splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(parent), ui(new Ui::splashLibrary) { SplashLibraryDialog::SplashLibraryDialog(QWidget *parent, QString * filename):
splashFileName = fileName; QDialog(parent),
ui(new Ui::SplashLibraryDialog),
splashFileName(filename)
{
ui->setupUi(this); ui->setupUi(this);
this->setWindowIcon(CompanionIcon("library.png")); setWindowIcon(CompanionIcon("library.png"));
ui->nextPage->setIcon(CompanionIcon("arrow-right.png")); ui->nextPage->setIcon(CompanionIcon("arrow-right.png"));
ui->prevPage->setIcon(CompanionIcon("arrow-left.png")); ui->prevPage->setIcon(CompanionIcon("arrow-left.png"));
page = 0; page = 0;
@@ -24,11 +27,13 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(pare
} }
} }
splashLibrary::~splashLibrary() { SplashLibraryDialog::~SplashLibraryDialog()
{
delete ui; delete ui;
} }
void splashLibrary::setupPage(int page) { void SplashLibraryDialog::setupPage(int page)
{
splashLabel * sl[] = { ui->FwImage_01, ui->FwImage_02, ui->FwImage_03, ui->FwImage_04 , splashLabel * sl[] = { ui->FwImage_01, ui->FwImage_02, ui->FwImage_03, ui->FwImage_04 ,
ui->FwImage_05, ui->FwImage_06, ui->FwImage_07, ui->FwImage_08 , ui->FwImage_05, ui->FwImage_06, ui->FwImage_07, ui->FwImage_08 ,
ui->FwImage_09, ui->FwImage_10, ui->FwImage_11, ui->FwImage_12 , ui->FwImage_09, ui->FwImage_10, ui->FwImage_11, ui->FwImage_12 ,
@@ -60,7 +65,8 @@ void splashLibrary::setupPage(int page) {
setWindowTitle(tr("Splash Library - page %1 of %2").arg(page + 1).arg(ceil((float) imageList.size() / 20.0))); setWindowTitle(tr("Splash Library - page %1 of %2").arg(page + 1).arg(ceil((float) imageList.size() / 20.0)));
} }
void splashLibrary::getFileList() { void SplashLibraryDialog::getFileList()
{
imageList.clear(); imageList.clear();
if (g.embedSplashes()) { if (g.embedSplashes()) {
QDir myRes(":/images/library"); QDir myRes(":/images/library");
@@ -102,11 +108,13 @@ void splashLibrary::getFileList() {
} }
} }
void splashLibrary::dclose() { void SplashLibraryDialog::dclose()
{
close(); close();
} }
void splashLibrary::onButtonPressed(int button) { void SplashLibraryDialog::onButtonPressed(int button)
{
splashLabel * myLabel = qobject_cast<splashLabel *>(sender()); splashLabel * myLabel = qobject_cast<splashLabel *>(sender());
foreach(splashLabel *sl, findChildren<splashLabel *>()) { foreach(splashLabel *sl, findChildren<splashLabel *>()) {
@@ -123,7 +131,7 @@ void splashLibrary::onButtonPressed(int button) {
myLabel->setStyleSheet("border:1px solid; border-color:#00ffff"); myLabel->setStyleSheet("border:1px solid; border-color:#00ffff");
} }
void splashLibrary::on_nextPage_clicked() { void SplashLibraryDialog::on_nextPage_clicked() {
page++; page++;
if (page >= (imageList.size() / 20)) { if (page >= (imageList.size() / 20)) {
ui->nextPage->setDisabled(true); ui->nextPage->setDisabled(true);
@@ -132,7 +140,7 @@ void splashLibrary::on_nextPage_clicked() {
setupPage(page); setupPage(page);
} }
void splashLibrary::on_prevPage_clicked() { void SplashLibraryDialog::on_prevPage_clicked() {
page--; page--;
if (page == 0) { if (page == 0) {
ui->prevPage->setDisabled(true); ui->prevPage->setDisabled(true);
@@ -5,16 +5,16 @@
#include <QDialog> #include <QDialog>
namespace Ui { namespace Ui {
class splashLibrary; class SplashLibraryDialog;
} }
class splashLibrary : public QDialog class SplashLibraryDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit splashLibrary(QWidget *parent = 0, QString * fileName=NULL); explicit SplashLibraryDialog(QWidget *parent = 0, QString * fileName=NULL);
~splashLibrary(); ~SplashLibraryDialog();
private slots: private slots:
void dclose(); void dclose();
@@ -25,7 +25,7 @@ private slots:
private: private:
void getFileList(); void getFileList();
void setupPage(int page); void setupPage(int page);
Ui::splashLibrary *ui; Ui::SplashLibraryDialog *ui;
QString * splashFileName; QString * splashFileName;
QString libraryPath; QString libraryPath;
QStringList imageList; QStringList imageList;
@@ -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>splashLibrary</class> <class>SplashLibraryDialog</class>
<widget class="QDialog" name="splashLibrary"> <widget class="QDialog" name="SplashLibraryDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
+1 -1
View File
@@ -14766,7 +14766,7 @@ Mode 4:
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -15537,7 +15537,7 @@ Die kann auch unterschiedlch zur Firmwaresprache sein</translation>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -13214,7 +13214,7 @@ Puede ser diferente del lenguaje del firmware</translation>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -17161,7 +17161,7 @@ Voi olla eri kun firmwaren kieli</translation>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -14015,7 +14015,7 @@ Indique l&apos;affectation voie / numéro de voie par défaut utilisée lors de
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -11554,7 +11554,7 @@ Press cancel to abort joystick calibration</source>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -12155,7 +12155,7 @@ Premere annulla per cancellare l&apos;operazione</translation>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -11546,7 +11546,7 @@ Press cancel to abort joystick calibration</source>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -11952,7 +11952,7 @@ Anuluj w celu przerwania kalibracji joysticka</translation>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -12159,7 +12159,7 @@ Press cancel to abort joystick calibration</source>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -12164,7 +12164,7 @@ This is used by the templated to determine which channel goes to what number out
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<location filename="../splashlibrary.ui" line="47"/> <location filename="../splashlibrary.ui" line="47"/>
<location filename="../splashlibrary.ui" line="879"/> <location filename="../splashlibrary.ui" line="879"/>
+1 -1
View File
@@ -10325,7 +10325,7 @@ Får skilja från språket för mjukvaran</translation>
</message> </message>
</context> </context>
<context> <context>
<name>splashLibrary</name> <name>SplashLibraryDialog</name>
<message> <message>
<source>...</source> <source>...</source>
<translation>...</translation> <translation>...</translation>