From ccfa25d58e8b16bc2f543dfb5c1dc6faa3968ad2 Mon Sep 17 00:00:00 2001 From: Kjell Kernen Date: Sat, 22 Feb 2014 00:41:27 +0100 Subject: [PATCH] Souce buttons checked in edit splash dialog. Corrected faulty theme icon. --- companion/src/apppreferencesdialog.cpp | 4 -- companion/src/apppreferencesdialog.ui | 67 +++++++++++------- companion/src/customizesplashdialog.cpp | 22 ++++++ companion/src/customizesplashdialog.h | 4 ++ companion/src/customizesplashdialog.ui | 18 +++++ .../src/themes/monowhite/16/fwpreferences.png | Bin 435 -> 245 bytes 6 files changed, 86 insertions(+), 29 deletions(-) diff --git a/companion/src/apppreferencesdialog.cpp b/companion/src/apppreferencesdialog.cpp index 1504051ee..5215fda5e 100644 --- a/companion/src/apppreferencesdialog.cpp +++ b/companion/src/apppreferencesdialog.cpp @@ -56,9 +56,6 @@ void appPreferencesDialog::writeValues() g.jsSupport(false); g.jsCtrl(0); } - - g.id(ui->profileIndexLE->text().toInt()); - g.profile[g.id()].channelOrder(ui->channelorderCB->currentIndex()); g.profile[g.id()].defaultMode(ui->stickmodeCB->currentIndex()); g.profile[g.id()].renameFwFiles(ui->renameFirmware->isChecked()); @@ -147,7 +144,6 @@ void appPreferencesDialog::initSettings() ui->stickmodeCB->setCurrentIndex(g.profile[g.id()].defaultMode()); ui->renameFirmware->setChecked(g.profile[g.id()].renameFwFiles()); ui->sdPath->setText(g.profile[g.id()].sdPath()); - ui->profileIndexLE->setText(QString("%1").arg(g.id())); ui->profileNameLE->setText(g.profile[g.id()].name()); ui->firmwareLE->setText(g.profile[g.id()].firmware()); ui->SplashFileName->setText(g.profile[g.id()].splashFile()); diff --git a/companion/src/apppreferencesdialog.ui b/companion/src/apppreferencesdialog.ui index 952881a7e..98824f3b5 100644 --- a/companion/src/apppreferencesdialog.ui +++ b/companion/src/apppreferencesdialog.ui @@ -7,7 +7,7 @@ 0 0 685 - 446 + 442 @@ -133,12 +133,12 @@ - Include companion splashes + Only show user splash images - Only user defined splashes + Show user and companion splash images @@ -706,13 +706,6 @@ This is used by the templated to determine which channel goes to what number out - - - - Qt::Horizontal - - - @@ -809,6 +802,12 @@ This is used by the templated to determine which channel goes to what number out 0 + + + 350 + 16777215 + + true @@ -862,10 +861,16 @@ This is used by the templated to determine which channel goes to what number out - 0 + 350 0 + + + 350 + 16777215 + + true @@ -883,6 +888,18 @@ This is used by the templated to determine which channel goes to what number out false + + + 350 + 0 + + + + + 350 + 16777215 + + @@ -899,27 +916,20 @@ This is used by the templated to determine which channel goes to what number out - - - - false - - - - 30 - 16777215 - - - - - 0 + 350 0 + + + 350 + 16777215 + + @@ -956,6 +966,13 @@ This is used by the templated to determine which channel goes to what number out + + + + Qt::Horizontal + + + diff --git a/companion/src/customizesplashdialog.cpp b/companion/src/customizesplashdialog.cpp index 748c48b69..1be93d4a5 100644 --- a/companion/src/customizesplashdialog.cpp +++ b/companion/src/customizesplashdialog.cpp @@ -14,11 +14,21 @@ Side::Side(){ imageLabel = 0; fileNameEdit = 0; saveButton = 0; + loadFwButton=0; + loadPictButton = 0; + loadProfileButton = 0; saveToFileName = new QString(""); source = new Source(UNDEFINED); format = new LCDFormat(LCDTARANIS); } +void Side::markSourceButton() +{ + loadFwButton->setChecked(*source == FW ? true : false ); + loadPictButton->setChecked(*source == PICT ? true : false ); + loadProfileButton->setChecked(*source == PROFILE ? true : false ); +} + void Side::copyImage( Side side ) { if ((*source!=UNDEFINED) && (*side.source!=UNDEFINED)) @@ -160,8 +170,17 @@ customizeSplashDialog::customizeSplashDialog(QWidget *parent) : right.libraryButton = ui->rightLibraryButton; left.invertButton = ui->leftInvertButton; right.invertButton = ui->rightInvertButton; + + left.loadFwButton = ui->leftLoadFwButton; + right.loadFwButton = ui->rightLoadFwButton; + left.loadPictButton = ui->leftLoadPictButton; + right.loadPictButton = ui->rightLoadPictButton; + left.loadProfileButton = ui->leftLoadProfileButton; + right.loadProfileButton = ui->rightLoadProfileButton; loadProfile(left); + left.markSourceButton(); + resize(0,0); } @@ -189,6 +208,7 @@ void customizeSplashDialog::loadFirmware(Side side) else g.flashDir( QFileInfo(fileName).dir().absolutePath() ); } + side.markSourceButton(); } void customizeSplashDialog::on_leftLoadPictButton_clicked() {loadPicture(left);} @@ -208,6 +228,7 @@ void customizeSplashDialog::loadPicture(Side side) else g.imagesDir( QFileInfo(fileName).dir().absolutePath() ); } + side.markSourceButton(); } void customizeSplashDialog::on_leftLoadProfileButton_clicked() {loadProfile(left);} @@ -220,6 +241,7 @@ void customizeSplashDialog::loadProfile(Side side) if (!side.displayImage( fileName, PROFILE )) QMessageBox::critical(this, tr("Error"), tr("Cannot load the profile image %1.").arg(fileName)); } + side.markSourceButton(); } void customizeSplashDialog::on_leftLibraryButton_clicked(){libraryButton_clicked(left);} diff --git a/companion/src/customizesplashdialog.h b/companion/src/customizesplashdialog.h index 21155dede..c931005b2 100644 --- a/companion/src/customizesplashdialog.h +++ b/companion/src/customizesplashdialog.h @@ -22,6 +22,7 @@ class Side { public: Side(); + void markSourceButton(); void copyImage( Side ); bool displayImage( QString fileName, Source source ); bool saveImage(); @@ -32,6 +33,9 @@ public: QPushButton *saveButton; QPushButton *invertButton; QToolButton *libraryButton; + QPushButton *loadFwButton; + QPushButton *loadPictButton; + QPushButton *loadProfileButton; QString *saveToFileName; diff --git a/companion/src/customizesplashdialog.ui b/companion/src/customizesplashdialog.ui index de4d68f24..72b241276 100644 --- a/companion/src/customizesplashdialog.ui +++ b/companion/src/customizesplashdialog.ui @@ -258,6 +258,9 @@ Load Profile + + true + @@ -265,6 +268,9 @@ Load FW + + true + @@ -272,6 +278,9 @@ Load Pict + + true + @@ -554,6 +563,9 @@ Load Profile + + true + @@ -564,6 +576,9 @@ Load FW + + true + @@ -571,6 +586,9 @@ Load Pict + + true + diff --git a/companion/src/themes/monowhite/16/fwpreferences.png b/companion/src/themes/monowhite/16/fwpreferences.png index b8e5ad449a5bf4027f3b556bfb972f6538ce096b..63fb581eb75f941f0cfa6c4cfd5362e34289d09f 100644 GIT binary patch delta 228 zcmdnY{FQNnWIY=L1B3kM|A|0~Ey>&6h2cL4F4((#GEjuGz$3Dlfr0NZ2s0kfUy%Y7 zWH0gbb!ETD#Ktek$5J*a6DZW=>Eak-aXL9+f#Q$z2M&A?^?Jz~TEjF(}!+qp|TJXUJz^Ha51zqD3>9SIwL}?WC-7=RfsOe&NFo%nUa& WH096TbT0=whr!d;&t;ucLK6V#K~R+d literal 435 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6SkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?skwBzpw;GB8xBF)%c=FfjZA3N^f7U???UV0e|lz+g3lfkC`r&aOZkpafHr zx4R3&|Mvbf`++>p0*}aI1_r*vAk26?e?hYSQ<>y!K@%sbfn zT+n9OgSagkD`GPjG`p3ck-XJ5Gb<}=o?jR_m> z&H3RQm%ypK-0a5Pm;>eQe+8Huu7<}?+;>UUNG18|j_;N;a0n!C8<`)MX5lF!N|bSMAyJb*T5{q(9Fun#LB=x+rSV= jUe$TL9z{cLeoAIqC2kE%3ZsRA8W=oX{an^LB{Ts5y!4i?