Allow themes and icon preferences

This commit is contained in:
Romolo Manfredini
2014-01-19 15:35:45 +01:00
parent 0bf7410145
commit a4e3cf6f3c
5 changed files with 399 additions and 223 deletions
+86 -43
View File
@@ -37,56 +37,13 @@
<file>images/9xcursmin.png</file> <file>images/9xcursmin.png</file>
<file>images/9xcursdown.png</file> <file>images/9xcursdown.png</file>
<file>images/9xcursphoto.png</file> <file>images/9xcursphoto.png</file>
<file>images/copy.png</file>
<file>images/cut.png</file>
<file>images/currentmodel.png</file>
<file>images/information.png</file>
<file>images/new.png</file>
<file>images/open.png</file>
<file>images/paste.png</file>
<file>images/save.png</file>
<file>images/saveas.png</file>
<file>images/screenshot.png</file> <file>images/screenshot.png</file>
<file>images/splash.png</file> <file>images/splash.png</file>
<file>images/splasht.png</file> <file>images/splasht.png</file>
<file>images/companion-title.png</file> <file>images/companion-title.png</file>
<file>images/read_eeprom.png</file>
<file>images/write_eeprom.png</file>
<file>images/write_flash.png</file>
<file>images/read_flash.png</file>
<file>images/simulate.png</file>
<file>images/configure.png</file>
<file>images/customize.png</file>
<file>images/print.png</file>
<file>images/clear.png</file>
<file>images/add.png</file>
<file>images/edit.png</file>
<file>images/wizard.png</file>
<file>images/duplicate.png</file>
<file>images/fuses.png</file>
<file>images/list.png</file>
<file>images/maps.png</file> <file>images/maps.png</file>
<file>images/track.png</file> <file>images/track.png</file>
<file>images/track0.png</file> <file>images/track0.png</file>
<file>images/play.png</file>
<file>images/stop.png</file>
<file>images/read_eeprom_file.png</file>
<file>images/write_eeprom_file.png</file>
<file>images/moveup.png</file>
<file>images/movedown.png</file>
<file>images/update.png</file>
<file>images/contributors.png</file>
<file>images/changelog.png</file>
<file>images/preferences.png</file>
<file>images/switch_dir.png</file>
<file>images/exit.png</file>
<file>images/recentdocument.png</file>
<file>images/profiles.png</file>
<file>images/library.png</file>
<file>images/logs.png</file>
<file>images/arrow-left.png</file>
<file>images/arrow-right.png</file>
<file>images/compare.png</file>
<file>images/x9b0.png</file> <file>images/x9b0.png</file>
<file>images/x9l0.png</file> <file>images/x9l0.png</file>
<file>images/x9l1.png</file> <file>images/x9l1.png</file>
@@ -335,5 +292,91 @@
<file>images/library/30002.png</file> <file>images/library/30002.png</file>
<file>images/library/30003.png</file> <file>images/library/30003.png</file>
<file>images/library/30004.png</file> <file>images/library/30004.png</file>
<file>themes/monochrome/open.png</file>
<file>themes/monochrome/edit.png</file>
<file>themes/monochrome/information.png</file>
<file>themes/monochrome/configure.png</file>
<file>themes/monochrome/switch_dir.png</file>
<file>themes/monochrome/list.png</file>
<file>themes/monochrome/wizard.png</file>
<file>themes/monochrome/logs.png</file>
<file>themes/monochrome/new.png</file>
<file>themes/monochrome/save.png</file>
<file>themes/monochrome/recentdocument.png</file>
<file>themes/monochrome/simulate.png</file>
<file>themes/monochrome/changelog.png</file>
<file>themes/monochrome/copy.png</file>
<file>themes/monochrome/write_flash.png</file>
<file>themes/monochrome/read_eeprom_file.png</file>
<file>themes/monochrome/clear.png</file>
<file>themes/monochrome/play.png</file>
<file>themes/monochrome/fuses.png</file>
<file>themes/monochrome/arrow-right.png</file>
<file>themes/monochrome/exit.png</file>
<file>themes/monochrome/moveup.png</file>
<file>themes/monochrome/read_eeprom.png</file>
<file>themes/monochrome/cut.png</file>
<file>themes/monochrome/arrow-left.png</file>
<file>themes/monochrome/write_eeprom_file.png</file>
<file>themes/monochrome/library.png</file>
<file>themes/monochrome/profiles.png</file>
<file>themes/monochrome/paste.png</file>
<file>themes/monochrome/print.png</file>
<file>themes/monochrome/compare.png</file>
<file>themes/monochrome/customize.png</file>
<file>themes/monochrome/saveas.png</file>
<file>themes/monochrome/preferences.png</file>
<file>themes/monochrome/movedown.png</file>
<file>themes/monochrome/currentmodel.png</file>
<file>themes/monochrome/read_flash.png</file>
<file>themes/monochrome/duplicate.png</file>
<file>themes/monochrome/add.png</file>
<file>themes/monochrome/update.png</file>
<file>themes/monochrome/contributors.png</file>
<file>themes/monochrome/stop.png</file>
<file>themes/monochrome/write_eeprom.png</file>
<file>themes/classic/open.png</file>
<file>themes/classic/edit.png</file>
<file>themes/classic/information.png</file>
<file>themes/classic/configure.png</file>
<file>themes/classic/switch_dir.png</file>
<file>themes/classic/list.png</file>
<file>themes/classic/wizard.png</file>
<file>themes/classic/logs.png</file>
<file>themes/classic/new.png</file>
<file>themes/classic/save.png</file>
<file>themes/classic/recentdocument.png</file>
<file>themes/classic/simulate.png</file>
<file>themes/classic/changelog.png</file>
<file>themes/classic/copy.png</file>
<file>themes/classic/write_flash.png</file>
<file>themes/classic/read_eeprom_file.png</file>
<file>themes/classic/clear.png</file>
<file>themes/classic/play.png</file>
<file>themes/classic/fuses.png</file>
<file>themes/classic/arrow-right.png</file>
<file>themes/classic/exit.png</file>
<file>themes/classic/moveup.png</file>
<file>themes/classic/read_eeprom.png</file>
<file>themes/classic/cut.png</file>
<file>themes/classic/arrow-left.png</file>
<file>themes/classic/write_eeprom_file.png</file>
<file>themes/classic/library.png</file>
<file>themes/classic/profiles.png</file>
<file>themes/classic/paste.png</file>
<file>themes/classic/print.png</file>
<file>themes/classic/compare.png</file>
<file>themes/classic/customize.png</file>
<file>themes/classic/saveas.png</file>
<file>themes/classic/preferences.png</file>
<file>themes/classic/movedown.png</file>
<file>themes/classic/currentmodel.png</file>
<file>themes/classic/read_flash.png</file>
<file>themes/classic/duplicate.png</file>
<file>themes/classic/add.png</file>
<file>themes/classic/update.png</file>
<file>themes/classic/contributors.png</file>
<file>themes/classic/stop.png</file>
<file>themes/classic/write_eeprom.png</file>
</qresource> </qresource>
</RCC> </RCC>
+81 -52
View File
@@ -95,6 +95,15 @@ downloadDialog_forWait(NULL)
MaxRecentFiles=MAX_RECENT; MaxRecentFiles=MAX_RECENT;
QSettings settings("companion", "companion"); QSettings settings("companion", "companion");
int theme_set=settings.value("theme", 1).toInt();
switch(theme_set) {
case 0:
Theme="classic";
break;
default:
Theme="monochrome";
break;
}
restoreGeometry(settings.value("mainWindowGeometry").toByteArray()); restoreGeometry(settings.value("mainWindowGeometry").toByteArray());
createActions(); createActions();
createMenus(); createMenus();
@@ -1060,14 +1069,14 @@ void MainWindow::burnFrom()
QStringList str; QStringList str;
str << path << tempFile; str << path << tempFile;
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
res = ad->exec(); res = ad->exec();
sleep(1); sleep(1);
} }
} else { } else {
QStringList str = GetReceiveEEpromCommand(tempFile); QStringList str = GetReceiveEEpromCommand(tempFile);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
res = ad->exec(); res = ad->exec();
} }
if(QFileInfo(tempFile).exists() && res) { if(QFileInfo(tempFile).exists() && res) {
@@ -1117,14 +1126,14 @@ void MainWindow::burnExtenalToEEPROM()
QStringList str; QStringList str;
str << path << backupFile; str << path << backupFile;
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
} }
} else { } else {
QStringList str = GetReceiveEEpromCommand(backupFile); QStringList str = GetReceiveEEpromCommand(backupFile);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"));
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
} }
@@ -1134,7 +1143,7 @@ void MainWindow::burnExtenalToEEPROM()
QString tempFlash = tempDir + "/flash.bin"; QString tempFlash = tempDir + "/flash.bin";
QStringList str = GetReceiveFlashCommand(tempFlash); QStringList str = GetReceiveFlashCommand(tempFlash);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx"); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx");
ad->setWindowIcon(QIcon(":/images/read_flash.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_flash.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
QString restoreFile = tempDir + "/compat.bin"; QString restoreFile = tempDir + "/compat.bin";
@@ -1167,14 +1176,14 @@ void MainWindow::burnExtenalToEEPROM()
QStringList str; QStringList str;
str << path << backupFile; str << path << backupFile;
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Backup Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
} }
} else { } else {
QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile); QStringList str = ((MainWindow *)this->parent())->GetReceiveEEpromCommand(backupFile);
avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); avrOutputDialog *ad = new avrOutputDialog(this, ((MainWindow *)this->parent())->GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"));
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
} }
@@ -1189,14 +1198,14 @@ void MainWindow::burnExtenalToEEPROM()
QStringList str; QStringList str;
str << fileName << path; str << fileName << path;
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write Models and Settings To Tx")); //, AVR_DIALOG_KEEP_OPEN); avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Write Models and Settings To Tx")); //, AVR_DIALOG_KEEP_OPEN);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
} }
} else { } else {
QStringList str = GetSendEEpromCommand(fileName); QStringList str = GetSendEEpromCommand(fileName);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Models and Settings To Tx", AVR_DIALOG_SHOW_DONE); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Models and Settings To Tx", AVR_DIALOG_SHOW_DONE);
ad->setWindowIcon(QIcon(":/images/write_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/write_eeprom.png"));
ad->exec(); ad->exec();
} }
} }
@@ -1361,13 +1370,13 @@ void MainWindow::burnToFlash(QString fileToFlash)
} }
QStringList str = GetReceiveEEpromCommand(backupFile); QStringList str = GetReceiveEEpromCommand(backupFile);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
int res = ad->exec(); int res = ad->exec();
if (QFileInfo(backupFile).exists() && res) { if (QFileInfo(backupFile).exists() && res) {
sleep(1); sleep(1);
QStringList str = GetSendFlashCommand(fileName); QStringList str = GetSendFlashCommand(fileName);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL);
ad->setWindowIcon(QIcon(":/images/write_flash.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/write_flash.png"));
int res = ad->exec(); int res = ad->exec();
if (res) { if (res) {
QString restoreFile = tempDir + "/restore.bin"; QString restoreFile = tempDir + "/restore.bin";
@@ -1378,7 +1387,7 @@ void MainWindow::burnToFlash(QString fileToFlash)
sleep(1); sleep(1);
QStringList str = GetSendEEpromCommand(restoreFile); QStringList str = GetSendEEpromCommand(restoreFile);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Restore Models and Settings To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Restore Models and Settings To Tx"), AVR_DIALOG_CLOSE_IF_SUCCESSFUL);
ad->setWindowIcon(QIcon(":/images/write_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/write_eeprom.png"));
res=ad->exec(); res=ad->exec();
if (!res) { if (!res) {
QMessageBox::warning(this, tr("Restore failed"), tr("Could not restore Models and Settings to TX. The models and settings data file can be found at: %1").arg(backupFile)); QMessageBox::warning(this, tr("Restore failed"), tr("Could not restore Models and Settings to TX. The models and settings data file can be found at: %1").arg(backupFile));
@@ -1403,14 +1412,14 @@ void MainWindow::burnToFlash(QString fileToFlash)
QString backupFile=backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin"; QString backupFile=backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin";
QStringList str = GetReceiveEEpromCommand(backupFile); QStringList str = GetReceiveEEpromCommand(backupFile);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx")); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Backup Models and Settings From Tx"));
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
sleep(1); sleep(1);
} }
QStringList str = GetSendFlashCommand(fileName); QStringList str = GetSendFlashCommand(fileName);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_SHOW_DONE); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Write Firmware To Tx"), AVR_DIALOG_SHOW_DONE);
ad->setWindowIcon(QIcon(":/images/write_flash.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/write_flash.png"));
ad->exec(); ad->exec();
} }
} }
@@ -1431,14 +1440,14 @@ void MainWindow::burnExtenalFromEEPROM()
QStringList str; QStringList str;
str << path << fileName; str << path << fileName;
avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN); avrOutputDialog *ad = new avrOutputDialog(this,"", str, tr("Read Models and Settings From Tx")); //, AVR_DIALOG_KEEP_OPEN);
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
} }
} else { } else {
settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath()); settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath());
QStringList str = GetReceiveEEpromCommand(fileName); QStringList str = GetReceiveEEpromCommand(fileName);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx")); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, tr("Read Models and Settings From Tx"));
ad->setWindowIcon(QIcon(":/images/read_eeprom.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_eeprom.png"));
ad->exec(); ad->exec();
} }
} }
@@ -1456,7 +1465,7 @@ void MainWindow::burnFromFlash()
settings.setValue("lastFlashDir",QFileInfo(fileName).dir().absolutePath()); settings.setValue("lastFlashDir",QFileInfo(fileName).dir().absolutePath());
QStringList str = GetReceiveFlashCommand(fileName); QStringList str = GetReceiveFlashCommand(fileName);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx"); avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Read Firmware From Tx");
ad->setWindowIcon(QIcon(":/images/read_flash.png")); ad->setWindowIcon(QIcon(":/themes/"+Theme+"/read_flash.png"));
ad->exec(); ad->exec();
} }
@@ -1596,137 +1605,137 @@ MdiChild *MainWindow::createMdiChild()
void MainWindow::createActions() void MainWindow::createActions()
{ {
newAct = new QAction(QIcon(":/images/new.png"), tr("&New"), this); newAct = new QAction(QIcon(":/themes/"+Theme+"/new.png"), tr("&New"), this);
newAct->setShortcuts(QKeySequence::New); newAct->setShortcuts(QKeySequence::New);
newAct->setStatusTip(tr("Create a new file")); newAct->setStatusTip(tr("Create a new file"));
connect(newAct, SIGNAL(triggered()), this, SLOT(newFile())); connect(newAct, SIGNAL(triggered()), this, SLOT(newFile()));
openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this); openAct = new QAction(QIcon(":/themes/"+Theme+"/open.png"), tr("&Open..."), this);
openAct->setShortcuts(QKeySequence::Open); openAct->setShortcuts(QKeySequence::Open);
openAct->setStatusTip(tr("Open an existing file")); openAct->setStatusTip(tr("Open an existing file"));
connect(openAct, SIGNAL(triggered()), this, SLOT(openFile())); connect(openAct, SIGNAL(triggered()), this, SLOT(openFile()));
loadbackupAct = new QAction(QIcon(":/images/open.png"), tr("&loadBackup..."), this); loadbackupAct = new QAction(QIcon(":/themes/"+Theme+"/open.png"), tr("&loadBackup..."), this);
loadbackupAct->setStatusTip(tr("Load backup from file")); loadbackupAct->setStatusTip(tr("Load backup from file"));
connect(loadbackupAct, SIGNAL(triggered()), this, SLOT(loadBackup())); connect(loadbackupAct, SIGNAL(triggered()), this, SLOT(loadBackup()));
saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this); saveAct = new QAction(QIcon(":/themes/"+Theme+"/save.png"), tr("&Save"), this);
saveAct->setShortcuts(QKeySequence::Save); saveAct->setShortcuts(QKeySequence::Save);
saveAct->setStatusTip(tr("Save the document to disk")); saveAct->setStatusTip(tr("Save the document to disk"));
connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));
saveAsAct = new QAction(QIcon(":/images/saveas.png"), tr("Save &As..."), this); saveAsAct = new QAction(QIcon(":/themes/"+Theme+"/saveas.png"), tr("Save &As..."), this);
saveAsAct->setShortcuts(QKeySequence::SaveAs); saveAsAct->setShortcuts(QKeySequence::SaveAs);
saveAsAct->setStatusTip(tr("Save the document under a new name")); saveAsAct->setStatusTip(tr("Save the document under a new name"));
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs())); connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
logsAct = new QAction(QIcon(":/images/logs.png"), tr("Lo&gs"), this); logsAct = new QAction(QIcon(":/themes/"+Theme+"/logs.png"), tr("Lo&gs"), this);
logsAct->setShortcut(tr("Ctrl+G")); logsAct->setShortcut(tr("Ctrl+G"));
logsAct->setStatusTip(tr("Open log file")); logsAct->setStatusTip(tr("Open log file"));
connect(logsAct, SIGNAL(triggered()), this, SLOT(logFile())); connect(logsAct, SIGNAL(triggered()), this, SLOT(logFile()));
preferencesAct = new QAction(QIcon(":/images/preferences.png"), tr("&Preferences..."), this); preferencesAct = new QAction(QIcon(":/themes/"+Theme+"/preferences.png"), tr("&Preferences..."), this);
preferencesAct->setStatusTip(tr("Edit general preferences")); preferencesAct->setStatusTip(tr("Edit general preferences"));
connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences())); connect(preferencesAct, SIGNAL(triggered()), this, SLOT(preferences()));
checkForUpdatesAct = new QAction(QIcon(":/images/update.png"), tr("&Check for updates..."), this); checkForUpdatesAct = new QAction(QIcon(":/themes/"+Theme+"/update.png"), tr("&Check for updates..."), this);
checkForUpdatesAct->setStatusTip(tr("Check for new version of Companion")); checkForUpdatesAct->setStatusTip(tr("Check for new version of Companion"));
connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates())); connect(checkForUpdatesAct, SIGNAL(triggered()), this, SLOT(doUpdates()));
contributorsAct = new QAction(QIcon(":/images/contributors.png"), tr("Contributors &List..."), this); contributorsAct = new QAction(QIcon(":/themes/"+Theme+"/contributors.png"), tr("Contributors &List..."), this);
contributorsAct->setStatusTip(tr("Show Companion contributors list")); contributorsAct->setStatusTip(tr("Show Companion contributors list"));
connect(contributorsAct, SIGNAL(triggered()), this, SLOT(contributors())); connect(contributorsAct, SIGNAL(triggered()), this, SLOT(contributors()));
changelogAct = new QAction(QIcon(":/images/changelog.png"), tr("ChangeLog..."), this); changelogAct = new QAction(QIcon(":/themes/"+Theme+"/changelog.png"), tr("ChangeLog..."), this);
changelogAct->setStatusTip(tr("Show Companion changelog")); changelogAct->setStatusTip(tr("Show Companion changelog"));
connect(changelogAct, SIGNAL(triggered()), this, SLOT(changelog())); connect(changelogAct, SIGNAL(triggered()), this, SLOT(changelog()));
fwchangelogAct = new QAction(QIcon(":/images/changelog.png"), tr("Firmware ChangeLog..."), this); fwchangelogAct = new QAction(QIcon(":/themes/"+Theme+"/changelog.png"), tr("Firmware ChangeLog..."), this);
fwchangelogAct->setStatusTip(tr("Show firmware changelog")); fwchangelogAct->setStatusTip(tr("Show firmware changelog"));
connect(fwchangelogAct, SIGNAL(triggered()), this, SLOT(fwchangelog())); connect(fwchangelogAct, SIGNAL(triggered()), this, SLOT(fwchangelog()));
compareAct = new QAction(QIcon(":/images/compare.png"), tr("Compare..."), this); compareAct = new QAction(QIcon(":/themes/"+Theme+"/compare.png"), tr("Compare..."), this);
compareAct->setStatusTip(tr("Compare models")); compareAct->setStatusTip(tr("Compare models"));
compareAct->setEnabled(false); compareAct->setEnabled(false);
connect(compareAct, SIGNAL(triggered()), this, SLOT(compare())); connect(compareAct, SIGNAL(triggered()), this, SLOT(compare()));
customizeSplashAct = new QAction(QIcon(":/images/customize.png"), tr("Customize your &TX..."), this); customizeSplashAct = new QAction(QIcon(":/themes/"+Theme+"/customize.png"), tr("Customize your &TX..."), this);
customizeSplashAct->setStatusTip(tr("Customize the splash screen of your TX")); customizeSplashAct->setStatusTip(tr("Customize the splash screen of your TX"));
connect(customizeSplashAct, SIGNAL(triggered()), this, SLOT(customizeSplash())); connect(customizeSplashAct, SIGNAL(triggered()), this, SLOT(customizeSplash()));
//! [0] //! [0]
exitAct = new QAction(QIcon(":/images/exit.png"), tr("E&xit"), this); exitAct = new QAction(QIcon(":/themes/"+Theme+"/exit.png"), tr("E&xit"), this);
exitAct->setShortcuts(QKeySequence::Quit); exitAct->setShortcuts(QKeySequence::Quit);
exitAct->setStatusTip(tr("Exit the application")); exitAct->setStatusTip(tr("Exit the application"));
connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
//! [0] //! [0]
cutAct = new QAction(QIcon(":/images/cut.png"), tr("Cu&t"), this); cutAct = new QAction(QIcon(":/themes/"+Theme+"/cut.png"), tr("Cu&t"), this);
cutAct->setShortcuts(QKeySequence::Cut); cutAct->setShortcuts(QKeySequence::Cut);
cutAct->setStatusTip(tr("Cut the current selection's contents to the " cutAct->setStatusTip(tr("Cut the current selection's contents to the "
"clipboard")); "clipboard"));
connect(cutAct, SIGNAL(triggered()), this, SLOT(cut())); connect(cutAct, SIGNAL(triggered()), this, SLOT(cut()));
copyAct = new QAction(QIcon(":/images/copy.png"), tr("&Copy"), this); copyAct = new QAction(QIcon(":/themes/"+Theme+"/copy.png"), tr("&Copy"), this);
copyAct->setShortcuts(QKeySequence::Copy); copyAct->setShortcuts(QKeySequence::Copy);
copyAct->setStatusTip(tr("Copy the current selection's contents to the " copyAct->setStatusTip(tr("Copy the current selection's contents to the "
"clipboard")); "clipboard"));
connect(copyAct, SIGNAL(triggered()), this, SLOT(copy())); connect(copyAct, SIGNAL(triggered()), this, SLOT(copy()));
pasteAct = new QAction(QIcon(":/images/paste.png"), tr("&Paste"), this); pasteAct = new QAction(QIcon(":/themes/"+Theme+"/paste.png"), tr("&Paste"), this);
pasteAct->setShortcuts(QKeySequence::Paste); pasteAct->setShortcuts(QKeySequence::Paste);
pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current " pasteAct->setStatusTip(tr("Paste the clipboard's contents into the current "
"selection")); "selection"));
connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste())); connect(pasteAct, SIGNAL(triggered()), this, SLOT(paste()));
burnToAct = new QAction(QIcon(":/images/write_eeprom.png"), tr("&Write Models and Settings To Tx"), this); burnToAct = new QAction(QIcon(":/themes/"+Theme+"/write_eeprom.png"), tr("&Write Models and Settings To Tx"), this);
burnToAct->setShortcut(tr("Ctrl+Alt+W")); burnToAct->setShortcut(tr("Ctrl+Alt+W"));
burnToAct->setStatusTip(tr("Write Models and Settings to transmitter")); burnToAct->setStatusTip(tr("Write Models and Settings to transmitter"));
connect(burnToAct,SIGNAL(triggered()),this,SLOT(burnTo())); connect(burnToAct,SIGNAL(triggered()),this,SLOT(burnTo()));
burnFromAct = new QAction(QIcon(":/images/read_eeprom.png"), tr("&Read Models and Settings From Tx"), this); burnFromAct = new QAction(QIcon(":/themes/"+Theme+"/read_eeprom.png"), tr("&Read Models and Settings From Tx"), this);
burnFromAct->setShortcut(tr("Ctrl+Alt+R")); burnFromAct->setShortcut(tr("Ctrl+Alt+R"));
burnFromAct->setStatusTip(tr("Read Models and Settings from transmitter")); burnFromAct->setStatusTip(tr("Read Models and Settings from transmitter"));
connect(burnFromAct,SIGNAL(triggered()),this,SLOT(burnFrom())); connect(burnFromAct,SIGNAL(triggered()),this,SLOT(burnFrom()));
burnToFlashAct = new QAction(QIcon(":/images/write_flash.png"), tr("Write Firmware"), this); burnToFlashAct = new QAction(QIcon(":/themes/"+Theme+"/write_flash.png"), tr("Write Firmware"), this);
burnToFlashAct->setStatusTip(tr("Write firmware to transmitter")); burnToFlashAct->setStatusTip(tr("Write firmware to transmitter"));
connect(burnToFlashAct,SIGNAL(triggered()),this,SLOT(burnToFlash())); connect(burnToFlashAct,SIGNAL(triggered()),this,SLOT(burnToFlash()));
burnExtenalToEEPROMAct = new QAction(QIcon(":/images/write_eeprom_file.png"), tr("Write Models and Settings from file to Tx"), this); burnExtenalToEEPROMAct = new QAction(QIcon(":/themes/"+Theme+"/write_eeprom_file.png"), tr("Write Models and Settings from file to Tx"), this);
burnExtenalToEEPROMAct->setStatusTip(tr("Write Models and Settings from file to transmitter")); burnExtenalToEEPROMAct->setStatusTip(tr("Write Models and Settings from file to transmitter"));
connect(burnExtenalToEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalToEEPROM())); connect(burnExtenalToEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalToEEPROM()));
burnExtenalFromEEPROMAct = new QAction(QIcon(":/images/read_eeprom_file.png"), tr("Save transmitter Models and Settings to file"), this); burnExtenalFromEEPROMAct = new QAction(QIcon(":/themes/"+Theme+"/read_eeprom_file.png"), tr("Save transmitter Models and Settings to file"), this);
burnExtenalFromEEPROMAct->setStatusTip(tr("Save the Models and Settings from the transmitter to a file")); burnExtenalFromEEPROMAct->setStatusTip(tr("Save the Models and Settings from the transmitter to a file"));
connect(burnExtenalFromEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalFromEEPROM())); connect(burnExtenalFromEEPROMAct,SIGNAL(triggered()),this,SLOT(burnExtenalFromEEPROM()));
burnFromFlashAct = new QAction(QIcon(":/images/read_flash.png"), tr("Read Firmware"), this); burnFromFlashAct = new QAction(QIcon(":/themes/"+Theme+"/read_flash.png"), tr("Read Firmware"), this);
burnFromFlashAct->setStatusTip(tr("Read firmware from transmitter")); burnFromFlashAct->setStatusTip(tr("Read firmware from transmitter"));
connect(burnFromFlashAct,SIGNAL(triggered()),this,SLOT(burnFromFlash())); connect(burnFromFlashAct,SIGNAL(triggered()),this,SLOT(burnFromFlash()));
burnConfigAct = new QAction(QIcon(":/images/configure.png"), tr("&Configure..."), this); burnConfigAct = new QAction(QIcon(":/themes/"+Theme+"/configure.png"), tr("&Configure..."), this);
burnConfigAct->setStatusTip(tr("Configure software for reading from and writing to the transmitter")); burnConfigAct->setStatusTip(tr("Configure software for reading from and writing to the transmitter"));
connect(burnConfigAct,SIGNAL(triggered()),this,SLOT(burnConfig())); connect(burnConfigAct,SIGNAL(triggered()),this,SLOT(burnConfig()));
EEPROMInterface *eepromInterface = GetEepromInterface(); EEPROMInterface *eepromInterface = GetEepromInterface();
if (!IS_ARM(eepromInterface->getBoard())) { if (!IS_ARM(eepromInterface->getBoard())) {
burnListAct = new QAction(QIcon(":/images/list.png"), tr("&List programmers"), this); burnListAct = new QAction(QIcon(":/themes/"+Theme+"/list.png"), tr("&List programmers"), this);
burnListAct->setStatusTip(tr("List available programmers")); burnListAct->setStatusTip(tr("List available programmers"));
connect(burnListAct,SIGNAL(triggered()),this,SLOT(burnList())); connect(burnListAct,SIGNAL(triggered()),this,SLOT(burnList()));
burnFusesAct = new QAction(QIcon(":/images/fuses.png"), tr("&Fuses..."), this); burnFusesAct = new QAction(QIcon(":/themes/"+Theme+"/fuses.png"), tr("&Fuses..."), this);
burnFusesAct->setStatusTip(tr("Show fuses dialog")); burnFusesAct->setStatusTip(tr("Show fuses dialog"));
connect(burnFusesAct,SIGNAL(triggered()),this,SLOT(burnFuses())); connect(burnFusesAct,SIGNAL(triggered()),this,SLOT(burnFuses()));
} }
simulateAct = new QAction(QIcon(":/images/simulate.png"), tr("&Simulate"), this); simulateAct = new QAction(QIcon(":/themes/"+Theme+"/simulate.png"), tr("&Simulate"), this);
simulateAct->setShortcut(tr("Alt+S")); simulateAct->setShortcut(tr("Alt+S"));
simulateAct->setStatusTip(tr("Simulate selected model.")); simulateAct->setStatusTip(tr("Simulate selected model."));
simulateAct->setEnabled(false); simulateAct->setEnabled(false);
connect(simulateAct,SIGNAL(triggered()),this,SLOT(simulate())); connect(simulateAct,SIGNAL(triggered()),this,SLOT(simulate()));
printAct = new QAction(QIcon(":/images/print.png"), tr("&Print"), this); printAct = new QAction(QIcon(":/themes/"+Theme+"/print.png"), tr("&Print"), this);
printAct->setShortcut(tr("Ctrl+P")); printAct->setShortcut(tr("Ctrl+P"));
printAct->setStatusTip(tr("Print current model.")); printAct->setStatusTip(tr("Print current model."));
printAct->setEnabled(false); printAct->setEnabled(false);
@@ -1766,11 +1775,11 @@ void MainWindow::createActions()
separatorAct = new QAction(this); separatorAct = new QAction(this);
separatorAct->setSeparator(true); separatorAct->setSeparator(true);
aboutAct = new QAction(QIcon(":/images/information.png"), tr("&About"), this); aboutAct = new QAction(QIcon(":/themes/"+Theme+"/information.png"), tr("&About"), this);
aboutAct->setStatusTip(tr("Show the application's About box")); aboutAct->setStatusTip(tr("Show the application's About box"));
connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
switchLayoutDirectionAct = new QAction(QIcon(":/images/switch_dir.png"), tr("Switch layout direction"), this); switchLayoutDirectionAct = new QAction(QIcon(":/themes/"+Theme+"/switch_dir.png"), tr("Switch layout direction"), this);
switchLayoutDirectionAct->setStatusTip(tr("Switch layout Left/Right")); switchLayoutDirectionAct->setStatusTip(tr("Switch layout Left/Right"));
connect(switchLayoutDirectionAct, SIGNAL(triggered()), this, SLOT(switchLayoutDirection())); connect(switchLayoutDirectionAct, SIGNAL(triggered()), this, SLOT(switchLayoutDirection()));
for (int i = 0; i < MaxRecentFiles; ++i) { for (int i = 0; i < MaxRecentFiles; ++i) {
@@ -1800,7 +1809,7 @@ void MainWindow::createMenus()
fileMenu->addAction(saveAct); fileMenu->addAction(saveAct);
fileMenu->addAction(saveAsAct); fileMenu->addAction(saveAsAct);
fileMenu->addMenu(recentFileMenu); fileMenu->addMenu(recentFileMenu);
recentFileMenu->setIcon(QIcon(":/images/recentdocument.png")); recentFileMenu->setIcon(QIcon(":/themes/"+Theme+"/recentdocument.png"));
for ( int i = 0; i < MaxRecentFiles; ++i) for ( int i = 0; i < MaxRecentFiles; ++i)
recentFileMenu->addAction(recentFileActs[i]); recentFileMenu->addAction(recentFileActs[i]);
fileMenu->addSeparator(); fileMenu->addSeparator();
@@ -1813,7 +1822,7 @@ void MainWindow::createMenus()
fileMenu->addAction(preferencesAct); fileMenu->addAction(preferencesAct);
fileMenu->addMenu(profilesMenu); fileMenu->addMenu(profilesMenu);
profilesMenu->setIcon(QIcon(":/images/profiles.png")); profilesMenu->setIcon(QIcon(":/themes/"+Theme+"/profiles.png"));
for ( int i = 0; i < MAX_PROFILES; ++i) for ( int i = 0; i < MAX_PROFILES; ++i)
profilesMenu->addAction(profileActs[i]); profilesMenu->addAction(profileActs[i]);
fileMenu->addAction(switchLayoutDirectionAct); fileMenu->addAction(switchLayoutDirectionAct);
@@ -1878,14 +1887,32 @@ QMenu *MainWindow::createProfilesMenu()
void MainWindow::createToolBars() void MainWindow::createToolBars()
{ {
QSettings settings("companion", "companion");
int icon_size=settings.value("icon_size",1 ).toInt();
QSize size;
switch(icon_size) {
case 0:
size=QSize(16,16);
break;
case 1:
size=QSize(24,24);
break;
case 3:
size=QSize(48,48);
break;
default:
size=QSize(32,32);
break;
}
fileToolBar = addToolBar(tr("File")); fileToolBar = addToolBar(tr("File"));
fileToolBar->setIconSize(size);
fileToolBar->setObjectName("File"); fileToolBar->setObjectName("File");
fileToolBar->addAction(newAct); fileToolBar->addAction(newAct);
fileToolBar->addAction(openAct); fileToolBar->addAction(openAct);
QToolButton * recentToolButton = new QToolButton; QToolButton * recentToolButton = new QToolButton;
recentToolButton->setPopupMode(QToolButton::InstantPopup); recentToolButton->setPopupMode(QToolButton::InstantPopup);
recentToolButton->setMenu(createRecentFileMenu()); recentToolButton->setMenu(createRecentFileMenu());
recentToolButton->setIcon(QIcon(":/images/recentdocument.png")); recentToolButton->setIcon(QIcon(":/themes/"+Theme+"/recentdocument.png"));
recentToolButton->setToolTip(tr("Recent Files")); recentToolButton->setToolTip(tr("Recent Files"));
fileToolBar->addWidget(recentToolButton); fileToolBar->addWidget(recentToolButton);
fileToolBar->addAction(saveAct); fileToolBar->addAction(saveAct);
@@ -1895,11 +1922,10 @@ void MainWindow::createToolBars()
profileButton = new QToolButton; profileButton = new QToolButton;
profileButton->setPopupMode(QToolButton::InstantPopup); profileButton->setPopupMode(QToolButton::InstantPopup);
profileButton->setMenu(createProfilesMenu()); profileButton->setMenu(createProfilesMenu());
profileButton->setIcon(QIcon(":/images/profiles.png")); profileButton->setIcon(QIcon(":/themes/"+Theme+"/profiles.png"));
profileButton->setToolTip(tr("Firmware Profiles")); profileButton->setToolTip(tr("Firmware Profiles"));
fileToolBar->addWidget(profileButton); fileToolBar->addWidget(profileButton);
bool notfound=true; bool notfound=true;
QSettings settings("companion", "companion");
settings.beginGroup("Profiles"); settings.beginGroup("Profiles");
for (int i=0; i<MAX_PROFILES; i++) { for (int i=0; i<MAX_PROFILES; i++) {
QString profile=QString("profile%1").arg(i+1); QString profile=QString("profile%1").arg(i+1);
@@ -1917,6 +1943,7 @@ void MainWindow::createToolBars()
fileToolBar->addAction(compareAct); fileToolBar->addAction(compareAct);
editToolBar = addToolBar(tr("Edit")); editToolBar = addToolBar(tr("Edit"));
editToolBar->setIconSize(size);
editToolBar->setObjectName("Edit"); editToolBar->setObjectName("Edit");
editToolBar->addAction(cutAct); editToolBar->addAction(cutAct);
editToolBar->addAction(copyAct); editToolBar->addAction(copyAct);
@@ -1925,6 +1952,7 @@ void MainWindow::createToolBars()
burnToolBar = new QToolBar(tr("Write")); burnToolBar = new QToolBar(tr("Write"));
addToolBar( Qt::LeftToolBarArea, burnToolBar ); addToolBar( Qt::LeftToolBarArea, burnToolBar );
burnToolBar->setIconSize(size);
burnToolBar->setObjectName("Write"); burnToolBar->setObjectName("Write");
burnToolBar->addAction(burnToAct); burnToolBar->addAction(burnToAct);
burnToolBar->addAction(burnFromAct); burnToolBar->addAction(burnFromAct);
@@ -1938,6 +1966,7 @@ void MainWindow::createToolBars()
burnToolBar->addAction(burnConfigAct); burnToolBar->addAction(burnConfigAct);
helpToolBar = addToolBar(tr("Help")); helpToolBar = addToolBar(tr("Help"));
helpToolBar->setIconSize(size);
helpToolBar->setObjectName("Help"); helpToolBar->setObjectName("Help");
helpToolBar->addAction(checkForUpdatesAct); helpToolBar->addAction(checkForUpdatesAct);
helpToolBar->addAction(aboutAct); helpToolBar->addAction(aboutAct);
+1
View File
@@ -138,6 +138,7 @@ private:
void updateProfilesActions(); void updateProfilesActions();
int getFileType(const QString &fullFileName); int getFileType(const QString &fullFileName);
QString FindTaranisPath(); QString FindTaranisPath();
QString Theme;
QString strippedName(const QString &fullFileName); QString strippedName(const QString &fullFileName);
MdiChild *activeMdiChild(); MdiChild *activeMdiChild();
+4
View File
@@ -265,6 +265,8 @@ void preferencesDialog::writeValues()
settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked()); settings.setValue("rename_firmware_files", ui->renameFirmware->isChecked());
settings.setValue("wizardEnable", ui->wizardEnable_ChkB->isChecked()); settings.setValue("wizardEnable", ui->wizardEnable_ChkB->isChecked());
settings.setValue("show_splash", ui->showSplash->isChecked()); settings.setValue("show_splash", ui->showSplash->isChecked());
settings.setValue("theme", ui->theme_CB->currentIndex());
settings.setValue("icon_size", ui->iconSize_CB->currentIndex());
settings.setValue("simuSW", ui->simuSW->isChecked()); settings.setValue("simuSW", ui->simuSW->isChecked());
settings.setValue("history_size", ui->historySize->value()); settings.setValue("history_size", ui->historySize->value());
settings.setValue("burnFirmware", ui->burnFirmware->isChecked()); settings.setValue("burnFirmware", ui->burnFirmware->isChecked());
@@ -404,6 +406,8 @@ void preferencesDialog::initSettings()
ui->renameFirmware->setChecked(settings.value("rename_firmware_files", false).toBool()); ui->renameFirmware->setChecked(settings.value("rename_firmware_files", false).toBool());
ui->wizardEnable_ChkB->setChecked(settings.value("wizardEnable", true).toBool()); ui->wizardEnable_ChkB->setChecked(settings.value("wizardEnable", true).toBool());
ui->showSplash->setChecked(settings.value("show_splash", true).toBool()); ui->showSplash->setChecked(settings.value("show_splash", true).toBool());
ui->theme_CB->setCurrentIndex(settings.value("theme", 1).toInt());
ui->iconSize_CB->setCurrentIndex(settings.value("icon_size", 2).toInt());
ui->historySize->setValue(settings.value("history_size", 10).toInt()); ui->historySize->setValue(settings.value("history_size", 10).toInt());
ui->backLightColor->setCurrentIndex(settings.value("backLight", 0).toInt()); ui->backLightColor->setCurrentIndex(settings.value("backLight", 0).toInt());
ui->startupCheck_fw->setChecked(settings.value("startup_check_fw", true).toBool()); ui->startupCheck_fw->setChecked(settings.value("startup_check_fw", true).toBool());
+227 -128
View File
@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>685</width> <width>685</width>
<height>710</height> <height>766</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@@ -26,7 +26,7 @@
<string>Preferences</string> <string>Preferences</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="companion.qrc"> <iconset>
<normaloff>:/images/preferences.png</normaloff>:/images/preferences.png</iconset> <normaloff>:/images/preferences.png</normaloff>:/images/preferences.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,1,0"> <layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0,0,1,0">
@@ -39,27 +39,57 @@
<property name="margin"> <property name="margin">
<number>4</number> <number>4</number>
</property> </property>
<item row="7" column="0"> <item row="2" column="1" colspan="4">
<widget class="QLabel" name="label_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="sizePolicy"> <item>
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <widget class="QSpinBox" name="historySize">
<horstretch>0</horstretch> <property name="sizePolicy">
<verstretch>0</verstretch> <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
</sizepolicy> <horstretch>40</horstretch>
</property> <verstretch>0</verstretch>
<property name="text"> </sizepolicy>
<string>Show Splash Screen</string> </property>
</property> <property name="maximum">
</widget> <number>15</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="wizardEnable_ChkB">
<property name="text">
<string>Ask use of wizard for new models</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="3" column="0" colspan="5"> <item row="4" column="0" colspan="5">
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -99,17 +129,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="2" colspan="2"> <item row="5" column="4" rowspan="7">
<widget class="QCheckBox" name="wizardEnable_ChkB">
<property name="text">
<string>Ask use of wizard for new models</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="4" rowspan="7">
<layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0"> <layout class="QGridLayout" name="gridLayout_3" columnstretch="0,0">
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QLabel" name="imageLabel"> <widget class="QLabel" name="imageLabel">
@@ -161,7 +181,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="companion.qrc"> <iconset>
<normaloff>:/images/clear.png</normaloff>:/images/clear.png</iconset> <normaloff>:/images/clear.png</normaloff>:/images/clear.png</iconset>
</property> </property>
</widget> </widget>
@@ -171,14 +191,14 @@
<item row="0" column="1" colspan="2"> <item row="0" column="1" colspan="2">
<widget class="QComboBox" name="locale_QB"/> <widget class="QComboBox" name="locale_QB"/>
</item> </item>
<item row="12" column="2" colspan="2"> <item row="13" column="2" colspan="2">
<widget class="QCheckBox" name="simuSW"> <widget class="QCheckBox" name="simuSW">
<property name="text"> <property name="text">
<string>Remember switches in simulator</string> <string>Remember switches in simulator</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="1"> <item row="13" column="1">
<widget class="QComboBox" name="backLightColor"> <widget class="QComboBox" name="backLightColor">
<item> <item>
<property name="text"> <property name="text">
@@ -207,7 +227,7 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="4" column="1" colspan="3"> <item row="5" column="1" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
@@ -228,7 +248,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="companion.qrc"> <iconset>
<normaloff>:/images/library.png</normaloff>:/images/library.png</iconset> <normaloff>:/images/library.png</normaloff>:/images/library.png</iconset>
</property> </property>
</widget> </widget>
@@ -248,33 +268,27 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="1"> <item row="14" column="0">
<widget class="QCheckBox" name="showSplash"> <widget class="QLabel" name="label_19">
<property name="text"> <property name="text">
<string/> <string>Simulator capture folder</string>
</property>
<property name="checked">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="0" column="0">
<widget class="QSpinBox" name="historySize"> <widget class="QLabel" name="label">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>40</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="maximum"> <property name="text">
<number>15</number> <string>Language (requires restart)</string>
</property>
<property name="value">
<number>10</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="28" column="4"> <item row="29" column="4">
<widget class="QComboBox" name="channelorderCB"> <widget class="QComboBox" name="channelorderCB">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@@ -418,7 +432,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -431,7 +445,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="32" column="1" colspan="4"> <item row="33" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QCheckBox" name="joystickChkB"> <widget class="QCheckBox" name="joystickChkB">
@@ -459,7 +473,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="10" column="1" colspan="3"> <item row="11" column="1" colspan="3">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>1</number> <number>1</number>
@@ -483,7 +497,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="21" column="1" colspan="4"> <item row="22" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<widget class="QLabel" name="FwInfo"> <widget class="QLabel" name="FwInfo">
@@ -507,7 +521,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="10" column="0"> <item row="11" column="0">
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="label_9">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -520,7 +534,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="34" column="0" colspan="5"> <item row="35" column="0" colspan="5">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer_3">
@@ -563,7 +577,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="23" column="1" colspan="4"> <item row="24" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_6" stretch="1,0"> <layout class="QHBoxLayout" name="horizontalLayout_6" stretch="1,0">
<item> <item>
<widget class="QLabel" name="label_12"> <widget class="QLabel" name="label_12">
@@ -590,7 +604,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="29" column="1" colspan="4"> <item row="30" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_6" columnstretch="0,0,1,0,0"> <layout class="QGridLayout" name="gridLayout_6" columnstretch="0,0,1,0,0">
<item row="1" column="4"> <item row="1" column="4">
<widget class="QPushButton" name="export_PB"> <widget class="QPushButton" name="export_PB">
@@ -638,20 +652,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="0"> <item row="14" column="1" colspan="4">
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Language (requires restart)</string>
</property>
</widget>
</item>
<item row="13" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_8"> <layout class="QGridLayout" name="gridLayout_8">
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>1</number> <number>1</number>
@@ -682,7 +683,7 @@ This is used by the templated to determine which channel goes to what number out
</item> </item>
</layout> </layout>
</item> </item>
<item row="28" column="0"> <item row="29" column="0">
<widget class="QLabel" name="label_14"> <widget class="QLabel" name="label_14">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@@ -695,7 +696,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="28" column="3"> <item row="29" column="3">
<widget class="QLabel" name="label_13"> <widget class="QLabel" name="label_13">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -711,7 +712,7 @@ This is used by the templated to determine which channel goes to what number out
</property> </property>
</widget> </widget>
</item> </item>
<item row="28" column="1" colspan="2"> <item row="29" column="1" colspan="2">
<widget class="QComboBox" name="stickmodeCB"> <widget class="QComboBox" name="stickmodeCB">
<property name="whatsThis"> <property name="whatsThis">
<string>Mode selection: <string>Mode selection:
@@ -759,7 +760,7 @@ Mode 4:
</item> </item>
</widget> </widget>
</item> </item>
<item row="32" column="0"> <item row="33" column="0">
<widget class="QLabel" name="label_11"> <widget class="QLabel" name="label_11">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
@@ -772,57 +773,21 @@ Mode 4:
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="3"> <item row="30" column="0">
<widget class="QComboBox" name="splashincludeCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Include companion splashes</string>
</property>
</item>
<item>
<property name="text">
<string>Only user defined splashes</string>
</property>
</item>
</widget>
</item>
<item row="7" column="2">
<widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Splash library behaviour</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="29" column="0">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
<property name="text"> <property name="text">
<string>Profile slot</string> <string>Profile slot</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="0"> <item row="17" column="0">
<widget class="QLabel" name="label_17"> <widget class="QLabel" name="label_17">
<property name="text"> <property name="text">
<string>Automatic Backup Folder</string> <string>Automatic Backup Folder</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="1" colspan="4"> <item row="17" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_10"> <layout class="QHBoxLayout" name="horizontalLayout_10">
<item> <item>
<widget class="QLineEdit" name="backupPath"> <widget class="QLineEdit" name="backupPath">
@@ -847,7 +812,7 @@ Mode 4:
</item> </item>
</layout> </layout>
</item> </item>
<item row="24" column="1" colspan="4"> <item row="25" column="1" colspan="4">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@@ -863,7 +828,7 @@ Mode 4:
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="22" column="1" colspan="4"> <item row="23" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_11" stretch="1,0"> <layout class="QHBoxLayout" name="horizontalLayout_11" stretch="1,0">
<item> <item>
<widget class="QLabel" name="label_18"> <widget class="QLabel" name="label_18">
@@ -890,7 +855,7 @@ Mode 4:
</item> </item>
</layout> </layout>
</item> </item>
<item row="18" column="1" colspan="4"> <item row="19" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0,0,0,0"> <layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0,0,0,0">
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum> <enum>QLayout::SetMaximumSize</enum>
@@ -981,7 +946,7 @@ May be different from firmware language</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="18" column="0"> <item row="19" column="0">
<layout class="QGridLayout" name="gridLayout_7"> <layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
@@ -1021,13 +986,6 @@ May be different from firmware language</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="13" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Simulator capture folder</string>
</property>
</widget>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="sizePolicy"> <property name="sizePolicy">
@@ -1041,14 +999,14 @@ May be different from firmware language</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="0" colspan="5"> <item row="15" column="0" colspan="5">
<widget class="Line" name="line_2"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="20" column="1" colspan="4"> <item row="21" column="1" colspan="4">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0,0"> <layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0,0">
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum> <enum>QLayout::SetMaximumSize</enum>
@@ -1601,7 +1559,7 @@ May be different from firmware language</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="17" column="1" colspan="4"> <item row="18" column="1" colspan="4">
<layout class="QHBoxLayout" name="ge_layout"> <layout class="QHBoxLayout" name="ge_layout">
<item> <item>
<widget class="QLineEdit" name="ge_lineedit"> <widget class="QLineEdit" name="ge_lineedit">
@@ -1619,13 +1577,154 @@ May be different from firmware language</string>
</item> </item>
</layout> </layout>
</item> </item>
<item row="17" column="0"> <item row="18" column="0">
<widget class="QLabel" name="ge_label"> <widget class="QLabel" name="ge_label">
<property name="text"> <property name="text">
<string>Google Earth Executable</string> <string>Google Earth Executable</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show Splash At Start</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_10">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Splash library behaviour</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="3">
<widget class="QComboBox" name="splashincludeCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Include companion splashes</string>
</property>
</item>
<item>
<property name="text">
<string>Only user defined splashes</string>
</property>
</item>
</widget>
</item>
<item row="3" column="1" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QCheckBox" name="showSplash">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Theme</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="theme_CB">
<item>
<property name="text">
<string>Classic</string>
</property>
</item>
<item>
<property name="text">
<string>Monochrome</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Icon size</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="iconSize_CB">
<item>
<property name="text">
<string>Small</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Big</string>
</property>
</item>
<item>
<property name="text">
<string>Huge</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
<tabstops> <tabstops>