diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 58980c721..8e877489c 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -176,7 +176,7 @@ set(companion_SRCS fusesdialog.cpp logsdialog.cpp downloaddialog.cpp - splashlibrary.cpp + splashlibrarydialog.cpp mainwindow.cpp companion.cpp radionotfound.cpp @@ -196,7 +196,7 @@ set(companion_MOC_HDRS releasenotesdialog.h releasenotesfirmwaredialog.h customizesplashdialog.h - splashlibrary.h + splashlibrarydialog.h splashlabel.h progresswidget.h progressdialog.h @@ -226,7 +226,7 @@ set(companion_UIS printdialog.ui htmldialog.ui customizesplashdialog.ui - splashlibrary.ui + splashlibrarydialog.ui progresswidget.ui progressdialog.ui flashfirmwaredialog.ui diff --git a/companion/src/customizesplashdialog.cpp b/companion/src/customizesplashdialog.cpp index f1208227e..7db15312a 100644 --- a/companion/src/customizesplashdialog.cpp +++ b/companion/src/customizesplashdialog.cpp @@ -3,8 +3,8 @@ #include "flashfirmwaredialog.h" #include "appdata.h" #include "helpers.h" -#include "splashlibrary.h" #include "firmwareinterface.h" +#include "splashlibrarydialog.h" //*** Side Class *** @@ -233,7 +233,7 @@ void customizeSplashDialog::on_rightLibraryButton_clicked(){libraryButton_clicke void customizeSplashDialog::libraryButton_clicked( Side side ) { QString fileName; - splashLibrary *ld = new splashLibrary(this,&fileName); + SplashLibraryDialog *ld = new SplashLibraryDialog(this,&fileName); ld->exec(); if (!fileName.isEmpty()) { if (!side.displayImage( fileName, UNDEFINED )) diff --git a/companion/src/flasheepromdialog.cpp b/companion/src/flasheepromdialog.cpp index 001bb2bc3..67b7d8c1e 100755 --- a/companion/src/flasheepromdialog.cpp +++ b/companion/src/flasheepromdialog.cpp @@ -2,13 +2,13 @@ #include "ui_flasheepromdialog.h" #include "eeprominterface.h" #include "helpers.h" -#include "splashlibrary.h" #include "firmwareinterface.h" #include "hexinterface.h" #include "appdata.h" #include "progressdialog.h" #include "radiointerface.h" #include "converteeprom.h" +#include "splashlibrarydialog.h" FlashEEpromDialog::FlashEEpromDialog(QWidget *parent, const QString &filename): QDialog(parent), diff --git a/companion/src/flashfirmwaredialog.cpp b/companion/src/flashfirmwaredialog.cpp index 98a885a59..c8460180e 100755 --- a/companion/src/flashfirmwaredialog.cpp +++ b/companion/src/flashfirmwaredialog.cpp @@ -9,8 +9,8 @@ #include "hexinterface.h" #include "progressdialog.h" #include "radiointerface.h" -#include "splashlibrary.h" #include "progresswidget.h" +#include "splashlibrarydialog.h" #if defined WIN32 || !defined __GNUC__ #include @@ -185,7 +185,7 @@ void FlashFirmwareDialog::on_useExternalSplash_clicked() void FlashFirmwareDialog::on_useLibrarySplash_clicked() { QString fileName; - splashLibrary *ld = new splashLibrary(this, &fileName); + SplashLibraryDialog *ld = new SplashLibraryDialog(this, &fileName); ld->exec(); if (!fileName.isEmpty()) { QImage image(fileName); diff --git a/companion/src/images/library/00021.png b/companion/src/images/library/00021.png new file mode 100644 index 000000000..d1c867df1 Binary files /dev/null and b/companion/src/images/library/00021.png differ diff --git a/companion/src/imgpreferences.ui b/companion/src/imgpreferences.ui index fc92aeb1e..1ba680d4d 100644 --- a/companion/src/imgpreferences.ui +++ b/companion/src/imgpreferences.ui @@ -344,7 +344,7 @@ - + ... @@ -455,7 +455,7 @@ splashincludeCB SplashFileName SplashSelect - splashLibraryButton + SplashLibraryDialogButton clearImageButton InvertPixels buttonBox diff --git a/companion/src/splashlibrary.cpp b/companion/src/splashlibrarydialog.cpp similarity index 86% rename from companion/src/splashlibrary.cpp rename to companion/src/splashlibrarydialog.cpp index 0becf5a27..0e737d261 100644 --- a/companion/src/splashlibrary.cpp +++ b/companion/src/splashlibrarydialog.cpp @@ -1,15 +1,18 @@ -#include "splashlibrary.h" -#include "ui_splashlibrary.h" +#include "splashlibrarydialog.h" +#include "ui_splashlibrarydialog.h" #include "appdata.h" #include #include "helpers.h" #include "firmwareinterface.h" #include "helpers.h" -splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(parent), ui(new Ui::splashLibrary) { - splashFileName = fileName; +SplashLibraryDialog::SplashLibraryDialog(QWidget *parent, QString * filename): + QDialog(parent), + ui(new Ui::SplashLibraryDialog), + splashFileName(filename) +{ ui->setupUi(this); - this->setWindowIcon(CompanionIcon("library.png")); + setWindowIcon(CompanionIcon("library.png")); ui->nextPage->setIcon(CompanionIcon("arrow-right.png")); ui->prevPage->setIcon(CompanionIcon("arrow-left.png")); page = 0; @@ -24,11 +27,13 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(pare } } -splashLibrary::~splashLibrary() { +SplashLibraryDialog::~SplashLibraryDialog() +{ 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 , ui->FwImage_05, ui->FwImage_06, ui->FwImage_07, ui->FwImage_08 , 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))); } -void splashLibrary::getFileList() { +void SplashLibraryDialog::getFileList() +{ imageList.clear(); if (g.embedSplashes()) { QDir myRes(":/images/library"); @@ -102,11 +108,13 @@ void splashLibrary::getFileList() { } } -void splashLibrary::dclose() { +void SplashLibraryDialog::dclose() +{ close(); } -void splashLibrary::onButtonPressed(int button) { +void SplashLibraryDialog::onButtonPressed(int button) +{ splashLabel * myLabel = qobject_cast(sender()); foreach(splashLabel *sl, findChildren()) { @@ -123,7 +131,7 @@ void splashLibrary::onButtonPressed(int button) { myLabel->setStyleSheet("border:1px solid; border-color:#00ffff"); } -void splashLibrary::on_nextPage_clicked() { +void SplashLibraryDialog::on_nextPage_clicked() { page++; if (page >= (imageList.size() / 20)) { ui->nextPage->setDisabled(true); @@ -132,7 +140,7 @@ void splashLibrary::on_nextPage_clicked() { setupPage(page); } -void splashLibrary::on_prevPage_clicked() { +void SplashLibraryDialog::on_prevPage_clicked() { page--; if (page == 0) { ui->prevPage->setDisabled(true); diff --git a/companion/src/splashlibrary.h b/companion/src/splashlibrarydialog.h similarity index 67% rename from companion/src/splashlibrary.h rename to companion/src/splashlibrarydialog.h index 0d9123a74..b703e6a23 100644 --- a/companion/src/splashlibrary.h +++ b/companion/src/splashlibrarydialog.h @@ -5,16 +5,16 @@ #include namespace Ui { - class splashLibrary; + class SplashLibraryDialog; } -class splashLibrary : public QDialog +class SplashLibraryDialog : public QDialog { Q_OBJECT public: - explicit splashLibrary(QWidget *parent = 0, QString * fileName=NULL); - ~splashLibrary(); + explicit SplashLibraryDialog(QWidget *parent = 0, QString * fileName=NULL); + ~SplashLibraryDialog(); private slots: void dclose(); @@ -25,7 +25,7 @@ private slots: private: void getFileList(); void setupPage(int page); - Ui::splashLibrary *ui; + Ui::SplashLibraryDialog *ui; QString * splashFileName; QString libraryPath; QStringList imageList; diff --git a/companion/src/splashlibrary.ui b/companion/src/splashlibrarydialog.ui similarity index 99% rename from companion/src/splashlibrary.ui rename to companion/src/splashlibrarydialog.ui index 5ce1e2502..3ecda7d51 100644 --- a/companion/src/splashlibrary.ui +++ b/companion/src/splashlibrarydialog.ui @@ -1,7 +1,7 @@ - splashLibrary - + SplashLibraryDialog + 0 diff --git a/companion/src/translations/companion_cs.ts b/companion/src/translations/companion_cs.ts index 4be9b2150..a5b85e350 100644 --- a/companion/src/translations/companion_cs.ts +++ b/companion/src/translations/companion_cs.ts @@ -14766,7 +14766,7 @@ Mode 4: - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_de.ts b/companion/src/translations/companion_de.ts index cb39e4915..dbb6241ed 100644 --- a/companion/src/translations/companion_de.ts +++ b/companion/src/translations/companion_de.ts @@ -15537,7 +15537,7 @@ Die kann auch unterschiedlch zur Firmwaresprache sein - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_es.ts b/companion/src/translations/companion_es.ts index a790b6902..092d19dc0 100755 --- a/companion/src/translations/companion_es.ts +++ b/companion/src/translations/companion_es.ts @@ -13214,7 +13214,7 @@ Puede ser diferente del lenguaje del firmware - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_fi.ts b/companion/src/translations/companion_fi.ts index 7c0558ad1..3d06ecad7 100644 --- a/companion/src/translations/companion_fi.ts +++ b/companion/src/translations/companion_fi.ts @@ -17161,7 +17161,7 @@ Voi olla eri kun firmwaren kieli - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_fr.ts b/companion/src/translations/companion_fr.ts index cb1362db8..deef09041 100644 --- a/companion/src/translations/companion_fr.ts +++ b/companion/src/translations/companion_fr.ts @@ -14015,7 +14015,7 @@ Indique l'affectation voie / numéro de voie par défaut utilisée lors de - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_he.ts b/companion/src/translations/companion_he.ts index ae525812f..08f897059 100644 --- a/companion/src/translations/companion_he.ts +++ b/companion/src/translations/companion_he.ts @@ -11554,7 +11554,7 @@ Press cancel to abort joystick calibration - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_it.ts b/companion/src/translations/companion_it.ts index 5d9400fe2..6d3f6ffa2 100644 --- a/companion/src/translations/companion_it.ts +++ b/companion/src/translations/companion_it.ts @@ -12155,7 +12155,7 @@ Premere annulla per cancellare l'operazione - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_nl.ts b/companion/src/translations/companion_nl.ts index 656d8ab85..456c30eb7 100644 --- a/companion/src/translations/companion_nl.ts +++ b/companion/src/translations/companion_nl.ts @@ -11546,7 +11546,7 @@ Press cancel to abort joystick calibration - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_pl.ts b/companion/src/translations/companion_pl.ts index cc090fbe9..2f36a5270 100644 --- a/companion/src/translations/companion_pl.ts +++ b/companion/src/translations/companion_pl.ts @@ -11952,7 +11952,7 @@ Anuluj w celu przerwania kalibracji joysticka - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_pt.ts b/companion/src/translations/companion_pt.ts index 8e631ddbd..d7d50fa1e 100644 --- a/companion/src/translations/companion_pt.ts +++ b/companion/src/translations/companion_pt.ts @@ -12159,7 +12159,7 @@ Press cancel to abort joystick calibration - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_ru.ts b/companion/src/translations/companion_ru.ts index 3826a4a74..a73d8ab0e 100644 --- a/companion/src/translations/companion_ru.ts +++ b/companion/src/translations/companion_ru.ts @@ -12164,7 +12164,7 @@ This is used by the templated to determine which channel goes to what number out - splashLibrary + SplashLibraryDialog diff --git a/companion/src/translations/companion_sv.ts b/companion/src/translations/companion_sv.ts index e997fcc89..6de88b9a8 100644 --- a/companion/src/translations/companion_sv.ts +++ b/companion/src/translations/companion_sv.ts @@ -10325,7 +10325,7 @@ Får skilja från språket för mjukvaran - splashLibrary + SplashLibraryDialog ... ...