diff --git a/companion/src/burnconfigdialog.cpp b/companion/src/burnconfigdialog.cpp index b09a7318a..d7ce28e6d 100644 --- a/companion/src/burnconfigdialog.cpp +++ b/companion/src/burnconfigdialog.cpp @@ -279,9 +279,8 @@ void burnConfigDialog::listProgrammers() QStringList arguments; arguments << "-c?"; avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "List available programmers", AVR_DIALOG_KEEP_OPEN, TRUE); - QString Theme=getTheme(); QIcon Icon; - populate_icon(&Icon,Theme,"list.png"); + populate_icon(&Icon,"list.png"); ad->setWindowIcon(Icon); ad->show(); } @@ -299,9 +298,8 @@ void burnConfigDialog::on_pushButton_4_clicked() arguments << "-?"; avrOutputDialog *ad = new avrOutputDialog(this, ui->avrdude_location->text(), arguments, "Show help", AVR_DIALOG_KEEP_OPEN,TRUE); - QString Theme=getTheme(); QIcon Icon; - populate_icon(&Icon,Theme,"configure.png"); + populate_icon(&Icon,"configure.png"); ad->setWindowIcon(Icon); ad->show(); } @@ -319,9 +317,8 @@ void burnConfigDialog::readFuses() arguments << "-c" << avrProgrammer << "-p" << avrMCU << args << str; avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Read Fuses",AVR_DIALOG_KEEP_OPEN,TRUE); - QString Theme=getTheme(); QIcon Icon; - populate_icon(&Icon,Theme,"fuses.png"); + populate_icon(&Icon,"fuses.png"); ad->setWindowIcon(Icon); ad->show(); } @@ -334,8 +331,6 @@ void burnConfigDialog::restFuses(bool eeProtect) //avrdude -c usbasp -p m64 -U efuse:w:<0xFF>:m QMessageBox::StandardButton ret = QMessageBox::No; - QString Theme=getTheme(); - ret = QMessageBox::warning(this, tr("Companion"), tr("WARNING!
This will reset the fuses of %1 to the factory settings.
Writing fuses can mess up your radio.
Do this only if you are sure they are wrong!
Are you sure you want to continue?").arg(avrMCU), QMessageBox::Yes | QMessageBox::No); @@ -358,7 +353,7 @@ void burnConfigDialog::restFuses(bool eeProtect) argread << "-c" << avrProgrammer << "-p" << avrMCU << args <<"-U" << "lfuse:r:"+tempFile+":r" ; avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, argread, "Reset Fuses",AVR_DIALOG_CLOSE_IF_SUCCESSFUL,FALSE); QIcon Icon; - populate_icon(&Icon,Theme,"fuses.png"); + populate_icon(&Icon,"fuses.png"); ad->setWindowIcon(Icon); ad->exec(); QFile file(tempFile); @@ -389,7 +384,7 @@ void burnConfigDialog::restFuses(bool eeProtect) } avrOutputDialog *ad = new avrOutputDialog(this, avrLoc, arguments, "Reset Fuses",AVR_DIALOG_KEEP_OPEN,TRUE); QIcon Icon; - populate_icon(&Icon,Theme,"fuses.png"); + populate_icon(&Icon,"fuses.png"); ad->setWindowIcon(Icon); ad->show(); } diff --git a/companion/src/burndialog.cpp b/companion/src/burndialog.cpp index 7da0896ed..167bba702 100644 --- a/companion/src/burndialog.cpp +++ b/companion/src/burndialog.cpp @@ -16,9 +16,8 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac hexType(Type) { ui->setupUi(this); - QString Theme=getTheme(); QIcon LibraryIcon; - populate_icon(&LibraryIcon,Theme,"library.png"); + populate_icon(&LibraryIcon,"library.png"); ui->libraryButton->setIcon(LibraryIcon); ui->SplashFrame->hide(); ui->FramFWInfo->hide(); diff --git a/companion/src/customizesplashdialog.cpp b/companion/src/customizesplashdialog.cpp index 92c3a54e1..5fa478291 100644 --- a/companion/src/customizesplashdialog.cpp +++ b/companion/src/customizesplashdialog.cpp @@ -11,9 +11,8 @@ customizeSplashDialog::customizeSplashDialog(QWidget *parent) : QDialog(parent), ui(new Ui::customizeSplashDialog) { ui->setupUi(this); - QString Theme=getTheme(); QIcon LibraryIcon; - populate_icon(&LibraryIcon,Theme,"library.png"); + populate_icon(&LibraryIcon,"library.png"); ui->libraryButton->setIcon(LibraryIcon); ui->HowToLabel->clear(); ui->HowToLabel->append("
" + tr("Select an original firmware file") + "
"); diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index f5a509359..739353e63 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -1485,8 +1485,9 @@ QString getCenterBeep(ModelData * g_model) return strl.join(", "); } -void populate_icon(QIcon *Icon, QString usedtheme, QString baseimage) +void populate_icon(QIcon *Icon, QString baseimage) { + static QString usedtheme=getTheme(); Icon->addFile(":/themes/"+usedtheme+"/16/"+baseimage,QSize(16,16)); Icon->addFile(":/themes/"+usedtheme+"/24/"+baseimage,QSize(24,24)); Icon->addFile(":/themes/"+usedtheme+"/32/"+baseimage,QSize(32,32)); diff --git a/companion/src/helpers.h b/companion/src/helpers.h index 4e720e629..f2dcbc51e 100644 --- a/companion/src/helpers.h +++ b/companion/src/helpers.h @@ -28,7 +28,7 @@ void populateVoiceLangCB(QComboBox *b, QString language); void populateTTraceCB(QComboBox *b, int value); void populateRotEncCB(QComboBox *b, int value, int renumber); void populateBacklightCB(QComboBox *b, const uint8_t value); -void populate_icon(QIcon *Icon, QString usedtheme, QString baseimage); +void populate_icon(QIcon *Icon, QString baseimage); QString getTheme(); class GVarGroup : public QObject { diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 5d8bdf237..4a5e0aa97 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -96,7 +96,6 @@ downloadDialog_forWait(NULL) this, SLOT(setActiveSubWindow(QWidget*))); MaxRecentFiles=MAX_RECENT; - Theme=getTheme(); QSettings settings("companion", "companion"); int icon_size=settings.value("icon_size", 1).toInt(); switch (icon_size) { @@ -1082,7 +1081,7 @@ void MainWindow::burnFrom() str << path << tempFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); res = ad->exec(); sleep(1); @@ -1091,7 +1090,7 @@ void MainWindow::burnFrom() QStringList str = GetReceiveEEpromCommand(tempFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); res = ad->exec(); } @@ -1143,7 +1142,7 @@ void MainWindow::burnExtenalToEEPROM() str << path << backupFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1152,7 +1151,7 @@ void MainWindow::burnExtenalToEEPROM() QStringList str = GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1164,7 +1163,7 @@ void MainWindow::burnExtenalToEEPROM() QStringList str = GetReceiveFlashCommand(tempFlash); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx"); QIcon icon; - populate_icon(&icon,Theme,"read_flash.png"); + populate_icon(&icon,"read_flash.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1199,7 +1198,7 @@ void MainWindow::burnExtenalToEEPROM() str << path << backupFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1208,7 +1207,7 @@ void MainWindow::burnExtenalToEEPROM() QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1225,7 +1224,7 @@ void MainWindow::burnExtenalToEEPROM() str << fileName << path; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write Models and Settings To Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1234,7 +1233,7 @@ void MainWindow::burnExtenalToEEPROM() QStringList str = GetSendEEpromCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Models and Settings To Tx", AVR_DIALOG_SHOW_DONE); QIcon icon; - populate_icon(&icon,Theme,"write_eeprom.png"); + populate_icon(&icon,"write_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); } @@ -1401,7 +1400,7 @@ void MainWindow::burnToFlash(QString fileToFlash) QStringList str = GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); int res = ad->exec(); if (QFileInfo(backupFile).exists() && res) { @@ -1409,7 +1408,7 @@ void MainWindow::burnToFlash(QString fileToFlash) QStringList str = GetSendFlashCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); QIcon iconw; - populate_icon(&iconw,Theme,"write_eeprom.png"); + populate_icon(&iconw,"write_eeprom.png"); ad->setWindowIcon(iconw); int res = ad->exec(); if (res) { @@ -1447,7 +1446,7 @@ void MainWindow::burnToFlash(QString fileToFlash) QStringList str = GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); sleep(1); @@ -1456,7 +1455,7 @@ void MainWindow::burnToFlash(QString fileToFlash) QStringList str = GetSendFlashCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_SHOW_DONE); QIcon iconw; - populate_icon(&iconw,Theme,"read_eeprom.png"); + populate_icon(&iconw,"write_flash.png"); ad->setWindowIcon(iconw); ad->exec(); } @@ -1479,7 +1478,7 @@ void MainWindow::burnExtenalFromEEPROM() str << path << fileName; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); } @@ -1488,7 +1487,7 @@ void MainWindow::burnExtenalFromEEPROM() QStringList str = GetReceiveEEpromCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); QIcon icon; - populate_icon(&icon,Theme,"read_eeprom.png"); + populate_icon(&icon,"read_eeprom.png"); ad->setWindowIcon(icon); ad->exec(); } @@ -1508,7 +1507,7 @@ void MainWindow::burnFromFlash() QStringList str = GetReceiveFlashCommand(fileName); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx"); QIcon icon; - populate_icon(&icon,Theme,"read_flash.png"); + populate_icon(&icon,"read_flash.png"); ad->setWindowIcon(icon); ad->exec(); } @@ -1650,7 +1649,7 @@ MdiChild *MainWindow::createMdiChild() void MainWindow::createActions() { QIcon newActIcon; - populate_icon(&newActIcon,Theme,"new.png"); + populate_icon(&newActIcon,"new.png"); newAct = new QAction(newActIcon, tr("&New"), this); newAct->setShortcuts(QKeySequence::New); @@ -1658,7 +1657,7 @@ void MainWindow::createActions() connect(newAct, SIGNAL(triggered()), this, SLOT(newFile())); QIcon openActIcon; - populate_icon(&openActIcon,Theme,"open.png"); + populate_icon(&openActIcon,"open.png"); openAct = new QAction(openActIcon, tr("&Open..."), this); openAct->setShortcuts(QKeySequence::Open); openAct->setStatusTip(tr("Open an existing file")); @@ -1669,65 +1668,65 @@ void MainWindow::createActions() connect(loadbackupAct, SIGNAL(triggered()), this, SLOT(loadBackup())); QIcon saveActIcon; - populate_icon(&saveActIcon,Theme,"save.png"); + populate_icon(&saveActIcon,"save.png"); saveAct = new QAction(saveActIcon, tr("&Save"), this); saveAct->setShortcuts(QKeySequence::Save); saveAct->setStatusTip(tr("Save the document to disk")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); QIcon saveAsActIcon; - populate_icon(&saveAsActIcon,Theme,"saveas.png"); + populate_icon(&saveAsActIcon,"saveas.png"); saveAsAct = new QAction(saveAsActIcon, tr("Save &As..."), this); saveAsAct->setShortcuts(QKeySequence::SaveAs); saveAsAct->setStatusTip(tr("Save the document under a new name")); connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs())); QIcon logsActIcon; - populate_icon(&logsActIcon,Theme,"logs.png"); + populate_icon(&logsActIcon,"logs.png"); logsAct = new QAction(logsActIcon, tr("Lo&gs"), this); logsAct->setShortcut(tr("Ctrl+G")); logsAct->setStatusTip(tr("Open log file")); connect(logsAct, SIGNAL(triggered()), this, SLOT(logFile())); QIcon preferencesActIcon; - populate_icon(&preferencesActIcon,Theme,"preferences.png"); + populate_icon(&preferencesActIcon,"preferences.png"); preferencesAct = new QAction(preferencesActIcon, tr("&Preferences..."), this); preferencesAct->setStatusTip(tr("Edit general preferences")); connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences())); QIcon checkForUpdatesActIcon; - populate_icon(&checkForUpdatesActIcon,Theme,"update.png"); + populate_icon(&checkForUpdatesActIcon,"update.png"); checkForUpdatesAct = new QAction(checkForUpdatesActIcon, tr("&Check for updates..."), this); checkForUpdatesAct->setStatusTip(tr("Check for new version of Companion")); connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates())); QIcon contributorsActIcon; - populate_icon(&contributorsActIcon,Theme,"contributors.png"); + populate_icon(&contributorsActIcon,"contributors.png"); contributorsAct = new QAction(contributorsActIcon, tr("Contributors &List..."), this); contributorsAct->setStatusTip(tr("Show Companion contributors list")); connect(contributorsAct, SIGNAL(triggered()), this, SLOT(contributors())); QIcon changelogActIcon; - populate_icon(&changelogActIcon,Theme,"changelog.png"); + populate_icon(&changelogActIcon,"changelog.png"); changelogAct = new QAction(changelogActIcon, tr("ChangeLog..."), this); changelogAct->setStatusTip(tr("Show Companion changelog")); connect(changelogAct, SIGNAL(triggered()), this, SLOT(changelog())); QIcon fwchangelogActIcon; - populate_icon(&fwchangelogActIcon,Theme,"changelog.png"); + populate_icon(&fwchangelogActIcon,"changelog.png"); fwchangelogAct = new QAction(fwchangelogActIcon, tr("Firmware ChangeLog..."), this); fwchangelogAct->setStatusTip(tr("Show firmware changelog")); connect(fwchangelogAct, SIGNAL(triggered()), this, SLOT(fwchangelog())); QIcon compareActIcon; - populate_icon(&compareActIcon,Theme,"compare.png"); + populate_icon(&compareActIcon,"compare.png"); compareAct = new QAction(compareActIcon, tr("Compare..."), this); compareAct->setStatusTip(tr("Compare models")); compareAct->setEnabled(false); connect(compareAct, SIGNAL(triggered()), this, SLOT(compare())); QIcon customizeSplashActIcon; - populate_icon(&customizeSplashActIcon,Theme,"customize.png"); + populate_icon(&customizeSplashActIcon,"customize.png"); customizeSplashAct = new QAction(customizeSplashActIcon, tr("Customize your &TX..."), this); customizeSplashAct->setStatusTip(tr("Customize the splash screen of your TX")); connect(customizeSplashAct, SIGNAL(triggered()), this, SLOT(customizeSplash())); @@ -1735,7 +1734,7 @@ void MainWindow::createActions() //! [0] QIcon exitActIcon; - populate_icon(&exitActIcon,Theme,"exit.png"); + populate_icon(&exitActIcon,"exit.png"); exitAct = new QAction(exitActIcon, tr("E&xit"), this); exitAct->setShortcuts(QKeySequence::Quit); exitAct->setStatusTip(tr("Exit the application")); @@ -1743,7 +1742,7 @@ void MainWindow::createActions() //! [0] QIcon cutActIcon; - populate_icon(&cutActIcon,Theme,"cut.png"); + populate_icon(&cutActIcon,"cut.png"); cutAct = new QAction(cutActIcon, tr("Cu&t"), this); cutAct->setShortcuts(QKeySequence::Cut); cutAct->setStatusTip(tr("Cut the current selection's contents to the " @@ -1751,7 +1750,7 @@ void MainWindow::createActions() connect(cutAct, SIGNAL(triggered()), this, SLOT(cut())); QIcon copyActIcon; - populate_icon(©ActIcon,Theme,"copy.png"); + populate_icon(©ActIcon,"copy.png"); copyAct = new QAction(copyActIcon, tr("&Copy"), this); copyAct->setShortcuts(QKeySequence::Copy); copyAct->setStatusTip(tr("Copy the current selection's contents to the " @@ -1759,7 +1758,7 @@ void MainWindow::createActions() connect(copyAct, SIGNAL(triggered()), this, SLOT(copy())); QIcon pasteActIcon; - populate_icon(&pasteActIcon,Theme,"paste.png"); + populate_icon(&pasteActIcon,"paste.png"); pasteAct = new QAction(pasteActIcon, tr("&Paste"), this); pasteAct->setShortcuts(QKeySequence::Paste); pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current " @@ -1767,64 +1766,64 @@ void MainWindow::createActions() connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste())); QIcon burnToActIcon; - populate_icon(&burnToActIcon,Theme,"write_eeprom.png"); + populate_icon(&burnToActIcon,"write_eeprom.png"); burnToAct = new QAction(burnToActIcon, tr("&Write Models and Settings To Tx"), this); burnToAct->setShortcut(tr("Ctrl+Alt+W")); burnToAct->setStatusTip(tr("Write Models and Settings to transmitter")); connect(burnToAct,SIGNAL(triggered()),this,SLOT(burnTo())); QIcon burnFromActIcon; - populate_icon(&burnFromActIcon,Theme,"read_eeprom.png"); + populate_icon(&burnFromActIcon,"read_eeprom.png"); burnFromAct = new QAction(burnFromActIcon, tr("&Read Models and Settings From Tx"), this); burnFromAct->setShortcut(tr("Ctrl+Alt+R")); burnFromAct->setStatusTip(tr("Read Models and Settings from transmitter")); connect(burnFromAct,SIGNAL(triggered()),this,SLOT(burnFrom())); QIcon burnToFlashActIcon; - populate_icon(&burnToFlashActIcon,Theme,"write_flash.png"); + populate_icon(&burnToFlashActIcon,"write_flash.png"); burnToFlashAct = new QAction(burnToFlashActIcon, tr("Write Firmware"), this); burnToFlashAct->setStatusTip(tr("Write firmware to transmitter")); connect(burnToFlashAct,SIGNAL(triggered()),this,SLOT(burnToFlash())); QIcon burnExtenalToEEPROMActIcon; - populate_icon(&burnExtenalToEEPROMActIcon,Theme,"write_eeprom_file.png"); + populate_icon(&burnExtenalToEEPROMActIcon,"write_eeprom_file.png"); burnExtenalToEEPROMAct = new QAction(burnExtenalToEEPROMActIcon, tr("Write Models and Settings from file to Tx"), this); burnExtenalToEEPROMAct->setStatusTip(tr("Write Models and Settings from file to transmitter")); connect(burnExtenalToEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalToEEPROM())); QIcon burnExtenalFromEEPROMActIcon; - populate_icon(&burnExtenalFromEEPROMActIcon,Theme,"read_eeprom_file.png"); + populate_icon(&burnExtenalFromEEPROMActIcon,"read_eeprom_file.png"); burnExtenalFromEEPROMAct = new QAction(burnExtenalFromEEPROMActIcon, tr("Save transmitter Models and Settings to file"), this); burnExtenalFromEEPROMAct->setStatusTip(tr("Save the Models and Settings from the transmitter to a file")); connect(burnExtenalFromEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalFromEEPROM())); QIcon burnFromFlashActIcon; - populate_icon(&burnFromFlashActIcon,Theme,"read_flash.png"); + populate_icon(&burnFromFlashActIcon,"read_flash.png"); burnFromFlashAct = new QAction(burnFromFlashActIcon, tr("Read Firmware"), this); burnFromFlashAct->setStatusTip(tr("Read firmware from transmitter")); connect(burnFromFlashAct,SIGNAL(triggered()),this,SLOT(burnFromFlash())); QIcon burnConfigActIcon; - populate_icon(&burnConfigActIcon,Theme,"configure.png"); + populate_icon(&burnConfigActIcon,"configure.png"); burnConfigAct = new QAction(burnConfigActIcon, tr("&Configure..."), this); burnConfigAct->setStatusTip(tr("Configure software for reading from and writing to the transmitter")); connect(burnConfigAct,SIGNAL(triggered()),this,SLOT(burnConfig())); EEPROMInterface *eepromInterface = GetEepromInterface(); if (!IS_ARM(eepromInterface->getBoard())) { QIcon burnListActIcon; - populate_icon(&burnListActIcon,Theme,"list.png"); + populate_icon(&burnListActIcon,"list.png"); burnListAct = new QAction(burnListActIcon, tr("&List programmers"), this); burnListAct->setStatusTip(tr("List available programmers")); connect(burnListAct,SIGNAL(triggered()),this,SLOT(burnList())); QIcon burnFusesActIcon; - populate_icon(&burnFusesActIcon,Theme,"fuses.png"); + populate_icon(&burnFusesActIcon,"fuses.png"); burnFusesAct = new QAction(burnFusesActIcon, tr("&Fuses..."), this); burnFusesAct->setStatusTip(tr("Show fuses dialog")); connect(burnFusesAct,SIGNAL(triggered()),this,SLOT(burnFuses())); } QIcon simulateActIcon; - populate_icon(&simulateActIcon,Theme,"simulate.png"); + populate_icon(&simulateActIcon,"simulate.png"); simulateAct = new QAction(simulateActIcon, tr("&Simulate"), this); simulateAct->setShortcut(tr("Alt+S")); simulateAct->setStatusTip(tr("Simulate selected model.")); @@ -1832,7 +1831,7 @@ void MainWindow::createActions() connect(simulateAct,SIGNAL(triggered()),this,SLOT(simulate())); QIcon printActIcon; - populate_icon(&printActIcon,Theme,"print.png"); + populate_icon(&printActIcon,"print.png"); printAct = new QAction(printActIcon, tr("&Print"), this); printAct->setShortcut(tr("Ctrl+P")); printAct->setStatusTip(tr("Print current model.")); @@ -1874,13 +1873,13 @@ void MainWindow::createActions() separatorAct->setSeparator(true); QIcon aboutActIcon; - populate_icon(&aboutActIcon,Theme,"information.png"); + populate_icon(&aboutActIcon,"information.png"); aboutAct = new QAction(aboutActIcon, tr("&About"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); QIcon switchLayoutDirectionActIcon; - populate_icon(&switchLayoutDirectionActIcon,Theme,"switch_dir.png"); + populate_icon(&switchLayoutDirectionActIcon,"switch_dir.png"); switchLayoutDirectionAct = new QAction(switchLayoutDirectionActIcon, tr("Switch layout direction"), this); switchLayoutDirectionAct->setStatusTip(tr("Switch layout Left/Right")); connect(switchLayoutDirectionAct, SIGNAL(triggered()), this, SLOT(switchLayoutDirection())); @@ -1912,7 +1911,7 @@ void MainWindow::createMenus() fileMenu->addAction(saveAsAct); fileMenu->addMenu(recentFileMenu); QIcon recentFileMenuIcon; - populate_icon(&recentFileMenuIcon,Theme,"recentdocument.png"); + populate_icon(&recentFileMenuIcon,"recentdocument.png"); recentFileMenu->setIcon(recentFileMenuIcon); for ( int i = 0; i < MaxRecentFiles; ++i) recentFileMenu->addAction(recentFileActs[i]); @@ -1927,7 +1926,7 @@ void MainWindow::createMenus() fileMenu->addMenu(profilesMenu); QIcon profilesMenuIcon; - populate_icon(&profilesMenuIcon,Theme,"profiles.png"); + populate_icon(&profilesMenuIcon,"profiles.png"); profilesMenu->setIcon(profilesMenuIcon); for ( int i = 0; i < MAX_PROFILES; ++i) profilesMenu->addAction(profileActs[i]); @@ -1994,7 +1993,7 @@ QMenu *MainWindow::createProfilesMenu() void MainWindow::createToolBars() { QSettings settings("companion", "companion"); - int icon_size=settings.value("icon_size",1 ).toInt(); + int icon_size=settings.value("icon_size",2 ).toInt(); QSize size; switch(icon_size) { case 0: @@ -2019,7 +2018,7 @@ void MainWindow::createToolBars() recentToolButton->setPopupMode(QToolButton::InstantPopup); recentToolButton->setMenu(createRecentFileMenu()); QIcon recentToolButtonIcon; - populate_icon(&recentToolButtonIcon,Theme,"recentdocument.png"); + populate_icon(&recentToolButtonIcon,"recentdocument.png"); recentToolButton->setIcon(recentToolButtonIcon); recentToolButton->setToolTip(tr("Recent Files")); fileToolBar->addWidget(recentToolButton); @@ -2031,7 +2030,7 @@ void MainWindow::createToolBars() profileButton->setPopupMode(QToolButton::InstantPopup); profileButton->setMenu(createProfilesMenu()); QIcon profileButtonIcon; - populate_icon(&profileButtonIcon,Theme,"profiles.png"); + populate_icon(&profileButtonIcon,"profiles.png"); profileButton->setIcon(profileButtonIcon); profileButton->setToolTip(tr("Firmware Profiles")); fileToolBar->addWidget(profileButton); diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp index b3ecb4a72..c3b5b2468 100644 --- a/companion/src/mdichild.cpp +++ b/companion/src/mdichild.cpp @@ -68,9 +68,8 @@ MdiChild::MdiChild(): isUntitled(true), fileChanged(false) { - QString Theme=getTheme(); QIcon SimulateIcon; - populate_icon(&SimulateIcon,Theme,"simulate.png"); + populate_icon(&SimulateIcon,"simulate.png"); ui->setupUi(this); ui->SimulateTxButton->setIcon(SimulateIcon); @@ -512,7 +511,6 @@ QString MdiChild::strippedName(const QString &fullFileName) void MdiChild::burnTo() // write to Tx { - QString Theme=getTheme(); QSettings settings("companion", "companion"); bool backupEnable=settings.value("backupEnable", true).toBool(); QString backupPath=settings.value("backupPath", "").toString(); @@ -559,7 +557,7 @@ void MdiChild::burnTo() // write to Tx str << path << backupFile; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup EEPROM From Tx")); //, AVR_DIALOG_KEEP_OPEN); QIcon Icon; - populate_icon(&Icon,Theme,"read_eeprom.png"); + populate_icon(&Icon,"read_eeprom.png"); ad->setWindowIcon(Icon); ad->exec(); sleep(1); @@ -568,7 +566,7 @@ void MdiChild::burnTo() // write to Tx QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup EEPROM From Tx")); QIcon Icon; - populate_icon(&Icon,Theme,"read_eeprom.png"); + populate_icon(&Icon,"read_eeprom.png"); ad->setWindowIcon(Icon); ad->exec(); sleep(1); @@ -579,7 +577,7 @@ void MdiChild::burnTo() // write to Tx QStringList str = ((MainWindow *)this->parent())->GetReceiveFlashCommand(tempFlash); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, "Read Flash From Tx"); QIcon Icon; - populate_icon(&Icon,Theme,"read_flash.png"); + populate_icon(&Icon,"read_flash.png"); ad->setWindowIcon(Icon); ad->exec(); sleep(1); @@ -617,7 +615,7 @@ void MdiChild::burnTo() // write to Tx QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup EEPROM From Tx")); QIcon Icon; - populate_icon(&Icon,Theme,"read_eeprom.png"); + populate_icon(&Icon,"read_eeprom.png"); ad->setWindowIcon(Icon); ad->exec(); sleep(1); @@ -634,7 +632,7 @@ void MdiChild::burnTo() // write to Tx str << tempFile << path; avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write EEPROM To Tx"), AVR_DIALOG_SHOW_DONE); //, AVR_DIALOG_KEEP_OPEN); QIcon Icon; - populate_icon(&Icon,Theme,"read_eeprom.png"); + populate_icon(&Icon,"read_eeprom.png"); ad->setWindowIcon(Icon); ad->show(); sleep(1); @@ -643,7 +641,7 @@ void MdiChild::burnTo() // write to Tx QStringList str = ((MainWindow *)this->parent())->GetSendEEpromCommand(tempFile); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, "Write EEPROM To Tx", AVR_DIALOG_SHOW_DONE); QIcon Icon; - populate_icon(&Icon,Theme,"write_eeprom.png"); + populate_icon(&Icon,"write_eeprom.png"); ad->setWindowIcon(Icon); ad->show(); } diff --git a/companion/src/modeledit/curves.cpp b/companion/src/modeledit/curves.cpp index b997a964c..428435928 100644 --- a/companion/src/modeledit/curves.cpp +++ b/companion/src/modeledit/curves.cpp @@ -84,9 +84,8 @@ Curves::Curves(QWidget * parent, ModelData & model): QGraphicsScene *scene = new QGraphicsScene(ui->curvePreview); scene->setItemIndexMethod(QGraphicsScene::NoIndex); ui->curvePreview->setScene(scene); - QString Theme=getTheme(); QIcon ClearIcon; - populate_icon(&ClearIcon,Theme,"clear.png"); + populate_icon(&ClearIcon,"clear.png"); for (int i=0; igetCapability(NumCurves); i++) { visibleCurves[i] = false; diff --git a/companion/src/modeledit/customfunctions.cpp b/companion/src/modeledit/customfunctions.cpp index ebccf06c8..23e6a1e28 100644 --- a/companion/src/modeledit/customfunctions.cpp +++ b/companion/src/modeledit/customfunctions.cpp @@ -123,9 +123,8 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model, connect(fswtchParamArmT[i], SIGNAL(editTextChanged ( const QString)), this, SLOT(customFunctionEdited())); #ifdef PHONON - QString Theme=getTheme(); QIcon PlayIcon; - populate_icon(&PlayIcon,Theme,"play.png"); + populate_icon(&PlayIcon,"play.png"); playBT[i] = new QPushButton(this); playBT[i]->setObjectName(QString("play_%1").arg(i)); playBT[i]->setIcon(PlayIcon); @@ -163,9 +162,8 @@ void CustomFunctionsPanel::mediaPlayer_state(Phonon::State newState, Phonon::Sta { if (phononLock) return; - QString Theme=getTheme(); QIcon PlayIcon; - populate_icon(&PlayIcon,Theme,"play.png"); + populate_icon(&PlayIcon,"play.png"); phononLock=true; if ((newState==Phonon::StoppedState || newState==Phonon::PausedState) && oldState==Phonon::PlayingState) { @@ -196,12 +194,11 @@ void CustomFunctionsPanel::playMusic() QPushButton *playButton = qobject_cast(sender()); int index=playButton->objectName().mid(5,2).toInt(); QString function=playButton->objectName().left(4); - QString Theme=getTheme(); QSettings settings("companion", "companion"); QIcon PlayIcon; - populate_icon(&PlayIcon,Theme,"play.png"); + populate_icon(&PlayIcon,"play.png"); QIcon StopIcon; - populate_icon(&StopIcon,Theme,"stop.png"); + populate_icon(&StopIcon,"stop.png"); QString path=settings.value("sdPath", ".").toString(); QDir qd(path); @@ -470,15 +467,14 @@ void CustomFunctionsPanel::fsw_customContextMenuRequested(QPoint pos) { QLabel *label = (QLabel *)sender(); selectedFunction = label->property("index").toInt(); - QString Theme=getTheme(); QIcon ClearIcon; - populate_icon(&ClearIcon,Theme,"clear.png"); + populate_icon(&ClearIcon,"clear.png"); QIcon CopyIcon; - populate_icon(&CopyIcon,Theme,"copy.png"); + populate_icon(&CopyIcon,"copy.png"); QIcon CutIcon; - populate_icon(&CutIcon,Theme,"cut.png"); + populate_icon(&CutIcon,"cut.png"); QIcon PasteIcon; - populate_icon(&PasteIcon,Theme,"paste.png"); + populate_icon(&PasteIcon,"paste.png"); QPoint globalPos = label->mapToGlobal(pos); diff --git a/companion/src/modeledit/customswitches.cpp b/companion/src/modeledit/customswitches.cpp index 8c2adf2c5..852ae8410 100644 --- a/companion/src/modeledit/customswitches.cpp +++ b/companion/src/modeledit/customswitches.cpp @@ -382,15 +382,14 @@ void CustomSwitchesPanel::csw_customContextMenuRequested(QPoint pos) { QLabel *label = (QLabel *)sender(); selectedSwitch = label->property("index").toInt(); - QString Theme=getTheme(); QIcon ClearIcon; - populate_icon(&ClearIcon,Theme,"clear.png"); + populate_icon(&ClearIcon,"clear.png"); QIcon CopyIcon; - populate_icon(&CopyIcon,Theme,"copy.png"); + populate_icon(&CopyIcon,"copy.png"); QIcon CutIcon; - populate_icon(&CutIcon,Theme,"cut.png"); + populate_icon(&CutIcon,"cut.png"); QIcon PasteIcon; - populate_icon(&PasteIcon,Theme,"paste.png"); + populate_icon(&PasteIcon,"paste.png"); QPoint globalPos = label->mapToGlobal(pos); diff --git a/companion/src/modeledit/inputs.cpp b/companion/src/modeledit/inputs.cpp index c8ac71c59..efab606b9 100644 --- a/companion/src/modeledit/inputs.cpp +++ b/companion/src/modeledit/inputs.cpp @@ -17,17 +17,17 @@ InputsPanel::InputsPanel(QWidget *parent, ModelData & model, GeneralSettings & g QPushButton * qbDown = new QPushButton(this); QPushButton * qbClear = new QPushButton(this); QIcon qbUpIcon; - populate_icon(&qbUpIcon,Theme,"moveup.png"); + populate_icon(&qbUpIcon,"moveup.png"); qbUp->setText(tr("Move Up")); qbUp->setIcon(qbUpIcon); qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); QIcon qbDownIcon; - populate_icon(&qbDownIcon,Theme,"movedown.png"); + populate_icon(&qbDownIcon,"movedown.png"); qbDown->setText(tr("Move Down")); qbDown->setIcon(qbDownIcon); qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); QIcon qbClearIcon; - populate_icon(&qbClearIcon,Theme,"clear.png"); + populate_icon(&qbClearIcon,"clear.png"); qbClear->setText(tr("Clear Expo Settings")); qbClear->setIcon(qbClearIcon); @@ -348,25 +348,24 @@ void InputsPanel::expoAdd() void InputsPanel::expolistWidget_customContextMenuRequested(QPoint pos) { - QString Theme=getTheme(); QIcon AddIcon; - populate_icon(&AddIcon,Theme,"add.png"); + populate_icon(&AddIcon,"add.png"); QIcon EditIcon; - populate_icon(&EditIcon,Theme,"edit.png"); + populate_icon(&EditIcon,"edit.png"); QIcon ClearIcon; - populate_icon(&ClearIcon,Theme,"clear.png"); + populate_icon(&ClearIcon,"clear.png"); QIcon CopyIcon; - populate_icon(&CopyIcon,Theme,"copy.png"); + populate_icon(&CopyIcon,"copy.png"); QIcon CutIcon; - populate_icon(&CutIcon,Theme,"cut.png"); + populate_icon(&CutIcon,"cut.png"); QIcon PasteIcon; - populate_icon(&PasteIcon,Theme,"paste.png"); + populate_icon(&PasteIcon,"paste.png"); QIcon DuplicateIcon; - populate_icon(&DuplicateIcon,Theme,"duplicate.png"); + populate_icon(&DuplicateIcon,"duplicate.png"); QIcon MoveUpIcon; - populate_icon(&MoveUpIcon,Theme,"moveup.png"); + populate_icon(&MoveUpIcon,"moveup.png"); QIcon MoveDownIcon; - populate_icon(&MoveDownIcon,Theme,"movedown.png"); + populate_icon(&MoveDownIcon,"movedown.png"); QPoint globalPos = ExposlistWidget->mapToGlobal(pos); const QClipboard *clipboard = QApplication::clipboard(); diff --git a/companion/src/modeledit/mixes.cpp b/companion/src/modeledit/mixes.cpp index 5f6cc74a6..4defde10f 100644 --- a/companion/src/modeledit/mixes.cpp +++ b/companion/src/modeledit/mixes.cpp @@ -14,20 +14,18 @@ MixesPanel::MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & gen QPushButton * qbUp = new QPushButton(this); QPushButton * qbDown = new QPushButton(this); QPushButton * qbClear = new QPushButton(this); - - QString Theme=getTheme(); QIcon qbUpIcon; - populate_icon(&qbUpIcon,Theme,"moveup.png"); + populate_icon(&qbUpIcon,"moveup.png"); qbUp->setText(tr("Move Up")); qbUp->setIcon(qbUpIcon); qbUp->setShortcut(QKeySequence(tr("Ctrl+Up"))); QIcon qbDownIcon; - populate_icon(&qbDownIcon,Theme,"movedown.png"); + populate_icon(&qbDownIcon,"movedown.png"); qbDown->setText(tr("Move Down")); qbDown->setIcon(qbDownIcon); qbDown->setShortcut(QKeySequence(tr("Ctrl+Down"))); QIcon qbClearIcon; - populate_icon(&qbClearIcon,Theme,"clear.png"); + populate_icon(&qbClearIcon,"clear.png"); qbClear->setText(tr("Clear Mixes")); qbClear->setIcon(qbClearIcon); @@ -413,25 +411,24 @@ void MixesPanel::mixerAdd() void MixesPanel::mixerlistWidget_customContextMenuRequested(QPoint pos) { - QString Theme=getTheme(); QIcon AddIcon; - populate_icon(&AddIcon,Theme,"add.png"); + populate_icon(&AddIcon,"add.png"); QIcon EditIcon; - populate_icon(&EditIcon,Theme,"edit.png"); + populate_icon(&EditIcon,"edit.png"); QIcon ClearIcon; - populate_icon(&ClearIcon,Theme,"clear.png"); + populate_icon(&ClearIcon,"clear.png"); QIcon CopyIcon; - populate_icon(&CopyIcon,Theme,"copy.png"); + populate_icon(&CopyIcon,"copy.png"); QIcon CutIcon; - populate_icon(&CutIcon,Theme,"cut.png"); + populate_icon(&CutIcon,"cut.png"); QIcon PasteIcon; - populate_icon(&PasteIcon,Theme,"paste.png"); + populate_icon(&PasteIcon,"paste.png"); QIcon DuplicateIcon; - populate_icon(&DuplicateIcon,Theme,"duplicate.png"); + populate_icon(&DuplicateIcon,"duplicate.png"); QIcon MoveUpIcon; - populate_icon(&MoveUpIcon,Theme,"moveup.png"); + populate_icon(&MoveUpIcon,"moveup.png"); QIcon MoveDownIcon; - populate_icon(&MoveDownIcon,Theme,"movedown.png"); + populate_icon(&MoveDownIcon,"movedown.png"); QPoint globalPos = MixerlistWidget->mapToGlobal(pos); const QClipboard *clipboard = QApplication::clipboard(); diff --git a/companion/src/modeledit/modeledit.cpp b/companion/src/modeledit/modeledit.cpp index ec6d76ab8..6b7d42004 100644 --- a/companion/src/modeledit/modeledit.cpp +++ b/companion/src/modeledit/modeledit.cpp @@ -21,11 +21,10 @@ ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool i generalSettings(generalSettings) { ui->setupUi(this); - QString Theme=getTheme(); QSettings settings("companion", "companion"); restoreGeometry(settings.value("modelEditGeometry").toByteArray()); QIcon SimulateIcon; - populate_icon(&SimulateIcon,Theme,"simulate.png"); + populate_icon(&SimulateIcon,"simulate.png"); ui->pushButton->setIcon(SimulateIcon); addTab(new Setup(this, model), tr("Setup")); addTab(new HeliPanel(this, model), tr("Heli")); diff --git a/companion/src/modelslist.cpp b/companion/src/modelslist.cpp index b96925020..9b19c5ccc 100644 --- a/companion/src/modelslist.cpp +++ b/companion/src/modelslist.cpp @@ -83,31 +83,30 @@ void ModelsListWidget::ShowContextMenu(const QPoint& pos) const QClipboard *clipboard = QApplication::clipboard(); const QMimeData *mimeData = clipboard->mimeData(); bool hasData = mimeData->hasFormat("application/x-companion9x"); - QString Theme=getTheme(); QIcon AddIcon; - populate_icon(&AddIcon,Theme,"add.png"); + populate_icon(&AddIcon,"add.png"); QIcon EditIcon; - populate_icon(&EditIcon,Theme,"edit.png"); + populate_icon(&EditIcon,"edit.png"); QIcon OpenIcon; - populate_icon(&OpenIcon,Theme,"open.png"); + populate_icon(&OpenIcon,"open.png"); QIcon WizardIcon; - populate_icon(&WizardIcon,Theme,"wizard.png"); + populate_icon(&WizardIcon,"wizard.png"); QIcon ClearIcon; - populate_icon(&ClearIcon,Theme,"clear.png"); + populate_icon(&ClearIcon,"clear.png"); QIcon CopyIcon; - populate_icon(&CopyIcon,Theme,"copy.png"); + populate_icon(&CopyIcon,"copy.png"); QIcon CutIcon; - populate_icon(&CutIcon,Theme,"cut.png"); + populate_icon(&CutIcon,"cut.png"); QIcon PasteIcon; - populate_icon(&PasteIcon,Theme,"paste.png"); + populate_icon(&PasteIcon,"paste.png"); QIcon DuplicateIcon; - populate_icon(&DuplicateIcon,Theme,"duplicate.png"); + populate_icon(&DuplicateIcon,"duplicate.png"); QIcon CurrentModelIcon; - populate_icon(&CurrentModelIcon,Theme,"currentmodel.png"); + populate_icon(&CurrentModelIcon,"currentmodel.png"); QIcon PrintIcon; - populate_icon(&PrintIcon,Theme,"print.png"); + populate_icon(&PrintIcon,"print.png"); QIcon SimulateIcon; - populate_icon(&SimulateIcon,Theme,"simulate.png"); + populate_icon(&SimulateIcon,"simulate.png"); QMenu contextMenu; contextMenu.addAction(EditIcon, tr("&Edit"),this,SLOT(OpenEditWindow())); diff --git a/companion/src/preferencesdialog.cpp b/companion/src/preferencesdialog.cpp index 625934292..73b6d3d8a 100644 --- a/companion/src/preferencesdialog.cpp +++ b/companion/src/preferencesdialog.cpp @@ -17,15 +17,14 @@ preferencesDialog::preferencesDialog(QWidget *parent) : updateLock(false) { ui->setupUi(this); - QString Theme=getTheme(); QIcon Icon; - populate_icon(&Icon, Theme, "preferences.png"); + populate_icon(&Icon,"preferences.png"); this->setWindowIcon(Icon); QIcon LibraryIcon; - populate_icon(&LibraryIcon, Theme, "library.png"); + populate_icon(&LibraryIcon,"library.png"); ui->splashLibraryButton->setIcon(LibraryIcon); QIcon ClearIcon; - populate_icon(&ClearIcon, Theme, "clear.png"); + populate_icon(&ClearIcon,"clear.png"); ui->clearImageButton->setIcon(ClearIcon); QCheckBox * OptionCheckBox[]= { diff --git a/companion/src/preferencesdialog.ui b/companion/src/preferencesdialog.ui index c05efb26a..7160c715b 100644 --- a/companion/src/preferencesdialog.ui +++ b/companion/src/preferencesdialog.ui @@ -7,7 +7,7 @@ 0 0 685 - 766 + 764 @@ -35,6 +35,79 @@ 4 + + + + + + true + + + + + + + Open Folder + + + + + + + auto backup before write + + + + + + + + + + 0 + 0 + + + + Show Splash At Start + + + + + + + + + Enable + + + + + + + + 0 + 0 + + + + + + + + Calibrate + + + + + + + + + Automatic Backup Folder + + + @@ -78,14 +151,14 @@ - + Qt::Horizontal - + @@ -101,31 +174,7 @@ - - - - - - Check for updates on startup - - - true - - - - - - - Check for selected Fw updates - - - true - - - - - - + @@ -180,17 +229,14 @@ - - - - + Remember switches in simulator - + @@ -219,7 +265,7 @@ - + 6 @@ -256,7 +302,7 @@ - + Simulator capture folder @@ -276,7 +322,7 @@ - + @@ -420,7 +466,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -433,35 +479,7 @@ This is used by the templated to determine which channel goes to what number out - - - - - - Enable - - - - - - - - 0 - 0 - - - - - - - - Calibrate - - - - - - + 1 @@ -485,7 +503,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -509,7 +527,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -522,7 +540,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -565,7 +583,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -592,7 +610,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -640,7 +658,7 @@ This is used by the templated to determine which channel goes to what number out - + 1 @@ -671,7 +689,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -684,7 +702,7 @@ This is used by the templated to determine which channel goes to what number out - + @@ -700,7 +718,7 @@ This is used by the templated to determine which channel goes to what number out - + Mode selection: @@ -749,58 +767,13 @@ Mode 4: - - - - 0 - 0 - - - - Joystick - - - - Profile slot - - - - Automatic Backup Folder - - - - - - - - - true - - - - - - - Open Folder - - - - - - - auto backup before write - - - - - - + Qt::Vertical @@ -816,7 +789,7 @@ Mode 4: - + @@ -843,7 +816,7 @@ Mode 4: - + QLayout::SetMaximumSize @@ -934,7 +907,7 @@ May be different from firmware language - + @@ -987,14 +960,14 @@ May be different from firmware language - + Qt::Horizontal - + QLayout::SetMaximumSize @@ -1547,45 +1520,7 @@ May be different from firmware language - - - - - - true - - - - - - - Find Executable - - - - - - - - - Google Earth Executable - - - - - - - - 0 - 0 - - - - Show Splash At Start - - - - + @@ -1598,7 +1533,7 @@ May be different from firmware language - + @@ -1618,17 +1553,10 @@ May be different from firmware language - + - - - - - - true - - + @@ -1645,6 +1573,9 @@ May be different from firmware language + + + Theme @@ -1652,6 +1583,9 @@ May be different from firmware language + + Requires restart + Classic @@ -1682,6 +1616,9 @@ May be different from firmware language + + + Icon size @@ -1689,6 +1626,9 @@ May be different from firmware language + + Requires restart + Small @@ -1713,10 +1653,94 @@ May be different from firmware language + + + + + + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Check for updates on startup + + + true + + + + + + + Check for selected Fw updates + + + true + + + + + + + + + + 0 + 0 + + + + Joystick + + + + + + + Google Earth Executable + + + + + + + + + true + + + + + + + Find Executable + + + + + - locale_QB InvertPixels clearImageButton SplashFileName diff --git a/companion/src/splashlibrary.cpp b/companion/src/splashlibrary.cpp index 4d0c0b111..e8a1a4090 100644 --- a/companion/src/splashlibrary.cpp +++ b/companion/src/splashlibrary.cpp @@ -9,11 +9,10 @@ splashLibrary::splashLibrary(QWidget *parent, QString * fileName) : QDialog(parent), ui(new Ui::splashLibrary) { splashFileName = fileName; ui->setupUi(this); - QString Theme=getTheme(); QIcon NextIcon; - populate_icon(&NextIcon,Theme,"arrow-right.png"); + populate_icon(&NextIcon,"arrow-right.png"); QIcon PrevIcon; - populate_icon(&PrevIcon,Theme,"arrow-left.png"); + populate_icon(&PrevIcon,"arrow-left.png"); ui->nextPage->setIcon(NextIcon); ui->prevPage->setIcon(PrevIcon); page = 0;