mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Fixes #511
This commit is contained in:
parent
20ddf27fff
commit
9fd20a87fe
15 changed files with 79 additions and 79 deletions
|
@ -82,7 +82,7 @@ burnConfigDialog::~burnConfigDialog()
|
|||
|
||||
void burnConfigDialog::getSettings()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
#if defined WIN32 || !defined __GNUC__
|
||||
avrLoc = settings.value("avrdude_location", QFileInfo("avrdude.exe").absoluteFilePath()).toString();
|
||||
sambaLoc = settings.value("samba_location", QFileInfo("sam-ba.exe").absoluteFilePath()).toString();
|
||||
|
@ -136,7 +136,7 @@ void burnConfigDialog::getSettings()
|
|||
|
||||
void burnConfigDialog::putSettings()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.setValue("avrdude_location", avrLoc);
|
||||
settings.setValue("programmer", avrProgrammer);
|
||||
settings.setValue("mcu", avrMCU);
|
||||
|
|
|
@ -55,7 +55,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
|
|||
} else {
|
||||
this->setWindowTitle(tr("Write Models and Settings in %1 to TX").arg(DocName));
|
||||
}
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int profileid=settings.value("profileId", 1).toInt();
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(profileid);
|
||||
|
@ -72,7 +72,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
|
|||
} else {
|
||||
burnraw=false;
|
||||
if (checkeEprom(*hexfileName)) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int profileid=settings.value("profileId", 1).toInt();
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(profileid);
|
||||
|
@ -113,7 +113,7 @@ burnDialog::burnDialog(QWidget *parent, int Type, QString * fileName, bool * bac
|
|||
hexfileName->clear();
|
||||
}
|
||||
else if (Type==2) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString FileName;
|
||||
FileName = settings.value("lastFw").toString();
|
||||
QFile file(FileName);
|
||||
|
@ -131,7 +131,7 @@ burnDialog::~burnDialog() {
|
|||
void burnDialog::on_FlashLoadButton_clicked()
|
||||
{
|
||||
QString fileName;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
ui->ImageLoadButton->setDisabled(true);
|
||||
ui->libraryButton->setDisabled(true);
|
||||
ui->InvertColorButton->setDisabled(true);
|
||||
|
@ -181,7 +181,7 @@ void burnDialog::checkFw(QString fileName)
|
|||
if (fileName.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
ui->EEbackupCB->show();
|
||||
} else {
|
||||
|
@ -343,7 +343,7 @@ void burnDialog::on_ImageLoadButton_clicked()
|
|||
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
|
||||
}
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats));
|
||||
|
||||
|
@ -426,7 +426,7 @@ void burnDialog::on_BurnFlashButton_clicked()
|
|||
if (hexType==2) {
|
||||
QString fileName=ui->FWFileName->text();
|
||||
if (!fileName.isEmpty()) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.setValue("lastFlashDir", QFileInfo(fileName).dir().absolutePath());
|
||||
settings.setValue("lastFw", fileName);
|
||||
if (ui->PatchFWCB->isChecked()) {
|
||||
|
@ -463,7 +463,7 @@ void burnDialog::on_BurnFlashButton_clicked()
|
|||
}
|
||||
}
|
||||
if (hexType==1) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int profileid=settings.value("profileId", 1).toInt();
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(profileid);
|
||||
|
@ -640,7 +640,7 @@ void burnDialog::on_PreferredImageCB_toggled(bool checked)
|
|||
{
|
||||
QString tmpFileName;
|
||||
if (checked) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString ImageStr = settings.value("SplashImage", "").toString();
|
||||
if (!ImageStr.isEmpty()) {
|
||||
QImage Image = qstring2image(ImageStr);
|
||||
|
|
|
@ -22,7 +22,7 @@ customizeSplashDialog::~customizeSplashDialog() {
|
|||
void customizeSplashDialog::on_FlashLoadButton_clicked()
|
||||
{
|
||||
QString fileName;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
ui->ImageLoadButton->setDisabled(true);
|
||||
ui->libraryButton->setDisabled(true);
|
||||
ui->SaveFlashButton->setDisabled(true);
|
||||
|
@ -66,7 +66,7 @@ void customizeSplashDialog::on_ImageLoadButton_clicked() {
|
|||
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
|
||||
}
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats));
|
||||
|
||||
|
@ -143,7 +143,7 @@ void customizeSplashDialog::on_libraryButton_clicked() {
|
|||
void customizeSplashDialog::on_SaveFlashButton_clicked()
|
||||
{
|
||||
QString fileName;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
ui->HowToLabel->clear();
|
||||
fileName = QFileDialog::getSaveFileName(this, tr("Write to file"), settings.value("lastFlashDir").toString(), FLASH_FILES_FILTER, 0, QFileDialog::DontConfirmOverwrite);
|
||||
if (fileName.isEmpty()) {
|
||||
|
@ -176,7 +176,7 @@ void customizeSplashDialog::on_InvertColorButton_clicked()
|
|||
void customizeSplashDialog::on_SaveImageButton_clicked()
|
||||
{
|
||||
QString fileName;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
|
||||
fileName = QFileDialog::getSaveFileName(this, tr("Write to file"), settings.value("lastImagesDir").toString(), tr("PNG images (*.png);;"), 0, QFileDialog::DontConfirmOverwrite);
|
||||
if (!fileName.isEmpty()) {
|
||||
|
|
|
@ -438,7 +438,7 @@ GeneralSettings::GeneralSettings()
|
|||
calibSpanNeg[i] = 0x180;
|
||||
calibSpanPos[i] = 0x180;
|
||||
}
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
templateSetup = settings.value("default_channel_order", 0).toInt();
|
||||
stickMode = settings.value("default_mode", 1).toInt();
|
||||
int profile_id = settings.value("ActiveProfile", 0).toInt();
|
||||
|
@ -659,7 +659,7 @@ ModelData ModelData::removeGlobalVars()
|
|||
QList<EEPROMInterface *> eepromInterfaces;
|
||||
void RegisterEepromInterfaces()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int rev4a = settings.value("rev4asupport",0).toInt();
|
||||
eepromInterfaces.push_back(new Open9xInterface(BOARD_STOCK));
|
||||
eepromInterfaces.push_back(new Open9xInterface(BOARD_M128));
|
||||
|
|
|
@ -20,7 +20,7 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
this->setWindowIcon(QIcon(":/icon.png"));
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString();
|
||||
ui->tabWidget->setCurrentIndex(settings.value("generalEditTab", 0).toInt());
|
||||
int profile_id=settings.value("profileId", 0).toInt();
|
||||
|
@ -946,7 +946,7 @@ void GeneralEdit::on_PPM4_editingFinished()
|
|||
void GeneralEdit::on_tabWidget_currentChanged(int index)
|
||||
{
|
||||
// TODO why er9x here
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.setValue("generalEditTab",index);//ui->tabWidget->currentIndex());
|
||||
}
|
||||
|
||||
|
@ -1195,7 +1195,7 @@ void GeneralEdit::on_swGEAChkB_stateChanged(int )
|
|||
|
||||
void GeneralEdit::on_calretrieve_PB_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt();
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(profile_id);
|
||||
|
@ -1312,7 +1312,7 @@ void GeneralEdit::on_calretrieve_PB_clicked()
|
|||
|
||||
void GeneralEdit::on_calstore_PB_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int profile_id=ui->profile_CB->itemData(ui->profile_CB->currentIndex()).toInt();
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(profile_id);
|
||||
|
|
|
@ -130,7 +130,7 @@ void joystickDialog::on_okButton_clicked() {
|
|||
return;
|
||||
}
|
||||
joystick->close();
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("JsCalibration");
|
||||
for (int i=0; i<8;i++) {
|
||||
settings.remove(QString("stick%1_axe").arg(i));
|
||||
|
|
|
@ -58,7 +58,7 @@ class lcdWidget : public QWidget {
|
|||
QPixmap buffer(2*lcdWidth, 2*lcdHeight);
|
||||
QPainter p(&buffer);
|
||||
doPaint(p);
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool();
|
||||
QApplication::clipboard()->setPixmap( buffer );
|
||||
if (!toclipboard) {
|
||||
|
|
|
@ -38,7 +38,7 @@ logsDialog::logsDialog(QWidget *parent) :
|
|||
ui->customPlot->legend->setSelectedFont(legendFont);
|
||||
ui->customPlot->legend->setSelectable(QCPLegend::spItems); // legend box shall not be selectable, only legend items
|
||||
ui->customPlot->legend->setVisible(false);
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString Path=settings.value("gePath", "").toString();
|
||||
if (Path.isEmpty() || !QFile(Path).exists()) {
|
||||
ui->mapsButton->hide();
|
||||
|
@ -202,7 +202,7 @@ void logsDialog::on_mapsButton_clicked() {
|
|||
,F_F,F_F,F_F,F_F,I_F,I_F,I_F,I_F\
|
||||
,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F,I_F};
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString gePath=settings.value("gePath", "").toString();
|
||||
if (gePath.isEmpty() || !QFile(gePath).exists()) {
|
||||
ui->FieldsTW->setDisabled(false);
|
||||
|
@ -578,7 +578,7 @@ void logsDialog::moveLegend()
|
|||
|
||||
void logsDialog::on_fileOpen_BT_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this,tr("Select your log file"), settings.value("lastLogDir").toString());
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("lastLogDir", fileName);
|
||||
|
|
|
@ -77,7 +77,7 @@ class MyProxyStyle : public QProxyStyle
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Start by borrowing any left over settings from companion9x
|
||||
QSettings c9x_settings("companion9x", "companion9x");
|
||||
QSettings c9x_settings("companion", "companion");
|
||||
QSettings com_settings("companion", "companion");
|
||||
if (!com_settings.contains("pos")) {
|
||||
QStringList keys = c9x_settings.allKeys();
|
||||
|
@ -96,7 +96,7 @@ int main(int argc, char *argv[])
|
|||
QString dir;
|
||||
if(argc) dir = QFileInfo(argv[0]).canonicalPath() + "/lang";
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString locale = settings.value("locale",QLocale::system().name()).toString();
|
||||
bool showSplash = settings.value("show_splash", true).toBool();
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ downloadDialog_forWait(NULL)
|
|||
|
||||
// give time to the splash to disappear and main window to open before starting updates
|
||||
int updateDelay = 1000;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool showSplash = settings.value("show_splash", true).toBool();
|
||||
if (showSplash)
|
||||
updateDelay += (SPLASH_TIME*1000);
|
||||
|
@ -167,7 +167,7 @@ downloadDialog_forWait(NULL)
|
|||
|
||||
void MainWindow::displayWarnings()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int warnId=settings.value("warningId", 0 ).toInt();
|
||||
if (warnId<WARNING_ID && warnId!=0) {
|
||||
int res=0;
|
||||
|
@ -201,7 +201,7 @@ void MainWindow::checkForUpdates(bool ignoreSettings, QString & fwId)
|
|||
showcheckForUpdatesResult = ignoreSettings;
|
||||
check1done = true;
|
||||
check2done = true;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
fwToUpdate = fwId;
|
||||
QString stamp = GetFirmware(fwToUpdate)->stamp;
|
||||
|
||||
|
@ -267,7 +267,7 @@ void MainWindow::checkForUpdateFinished(QNetworkReply * reply)
|
|||
"Would you like to download it?").arg(version) ,
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
|
||||
if (ret == QMessageBox::Yes) {
|
||||
#if defined __APPLE__
|
||||
|
@ -309,7 +309,7 @@ void MainWindow::updateDownloaded()
|
|||
void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmwareId)
|
||||
{
|
||||
QString url, ext, cpuid;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
url = firmware->getUrl(firmwareId);
|
||||
cpuid=settings.value("cpuid","").toString();
|
||||
ext = url.mid(url.lastIndexOf("."));
|
||||
|
@ -332,7 +332,7 @@ void MainWindow::downloadLatestFW(FirmwareInfo * firmware, const QString & firmw
|
|||
void MainWindow::reply1Accepted()
|
||||
{
|
||||
QString errormsg;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool autoflash=settings.value("burnFirmware", true).toBool();
|
||||
bool addversion=settings.value("rename_firmware_files", false).toBool();
|
||||
settings.beginGroup("FwRevisions");
|
||||
|
@ -456,7 +456,7 @@ void MainWindow::reply1Finished(QNetworkReply * reply)
|
|||
// TODO delete downloadDialog_forWait?
|
||||
}
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
cpuid=settings.value("cpuid","").toString();
|
||||
QByteArray qba = reply->readAll();
|
||||
int i = qba.indexOf("SVN_VERS");
|
||||
|
@ -626,7 +626,7 @@ void MainWindow::newFile()
|
|||
|
||||
void MainWindow::openFile()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER));
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath());
|
||||
|
@ -659,7 +659,7 @@ void MainWindow::saveAs()
|
|||
|
||||
void MainWindow::openRecentFile()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
if (action) {
|
||||
QString fileName=action->data().toString();
|
||||
|
@ -681,14 +681,14 @@ void MainWindow::openRecentFile()
|
|||
|
||||
void MainWindow::loadProfile()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
int chord,defmod, burnfw;
|
||||
bool renfw;
|
||||
|
||||
if (action) {
|
||||
int profnum=action->data().toInt();
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.setValue("ActiveProfile",profnum);
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(profnum);
|
||||
|
@ -733,7 +733,7 @@ void MainWindow::unloadProfile()
|
|||
{
|
||||
ActiveProfile=0;
|
||||
ActiveProfileName="";
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.setValue("ActiveProfile",0);
|
||||
FirmwareInfo *firmware = GetCurrentFirmware();
|
||||
setWindowTitle(tr("Companion - Models and Settings Editor - %1").arg(firmware->name));
|
||||
|
@ -1076,7 +1076,7 @@ void MainWindow::burnFrom()
|
|||
|
||||
void MainWindow::burnExtenalToEEPROM()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName;
|
||||
bool backup = false;
|
||||
burnDialog *cd = new burnDialog(this, 1, &fileName, &backup);
|
||||
|
@ -1324,7 +1324,7 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString
|
|||
|
||||
void MainWindow::burnToFlash(QString fileToFlash)
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName;
|
||||
bool backup = settings.value("backupOnFlash", false).toBool();
|
||||
if(!fileToFlash.isEmpty())
|
||||
|
@ -1414,7 +1414,7 @@ void MainWindow::burnToFlash(QString fileToFlash)
|
|||
|
||||
void MainWindow::burnExtenalFromEEPROM()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Save transmitter Models and Settings to File"), settings.value("lastDir").toString(), tr(EXTERNAL_EEPROM_FILES_FILTER));
|
||||
if (!fileName.isEmpty()) {
|
||||
EEPROMInterface *eepromInterface = GetEepromInterface();
|
||||
|
@ -1442,7 +1442,7 @@ void MainWindow::burnExtenalFromEEPROM()
|
|||
|
||||
void MainWindow::burnFromFlash()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getSaveFileName(this,tr("Read Tx Firmware to File"), settings.value("lastFlashDir").toString(),tr(FLASH_FILES_FILTER));
|
||||
if (!fileName.isEmpty()) {
|
||||
QFile file(fileName);
|
||||
|
@ -1528,7 +1528,7 @@ void MainWindow::updateMenus()
|
|||
updateRecentFileActions();
|
||||
updateProfilesActions();
|
||||
bool notfound=true;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("Profiles");
|
||||
for (int i=0; i<MAX_PROFILES; i++) {
|
||||
QString profile=QString("profile%1").arg(i+1);
|
||||
|
@ -1894,7 +1894,7 @@ void MainWindow::createToolBars()
|
|||
profileButton->setToolTip(tr("Firmware Profiles"));
|
||||
fileToolBar->addWidget(profileButton);
|
||||
bool notfound=true;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("Profiles");
|
||||
for (int i=0; i<MAX_PROFILES; i++) {
|
||||
QString profile=QString("profile%1").arg(i+1);
|
||||
|
@ -1940,7 +1940,7 @@ void MainWindow::createStatusBar()
|
|||
|
||||
void MainWindow::readSettings()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool maximized = settings.value("maximized", false).toBool();
|
||||
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
|
||||
QSize size = settings.value("size", QSize(400, 400)).toSize();
|
||||
|
@ -1967,7 +1967,7 @@ void MainWindow::readSettings()
|
|||
|
||||
void MainWindow::writeSettings()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
|
||||
settings.setValue("maximized", isMaximized());
|
||||
if(!isMaximized()) {
|
||||
|
@ -2013,7 +2013,7 @@ void MainWindow::setActiveSubWindow(QWidget *window)
|
|||
void MainWindow::updateRecentFileActions()
|
||||
{
|
||||
int i,j, numRecentFiles;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QStringList files = settings.value("recentFileList").toStringList();
|
||||
|
||||
numRecentFiles = qMin(files.size(), (int)MaxRecentFiles);
|
||||
|
@ -2033,7 +2033,7 @@ void MainWindow::updateRecentFileActions()
|
|||
void MainWindow::updateProfilesActions()
|
||||
{
|
||||
int i;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("Profiles");
|
||||
for (i=0; i<MAX_PROFILES; i++) {
|
||||
QString profile=QString("profile%1").arg(i+1);
|
||||
|
@ -2150,7 +2150,7 @@ void MainWindow::dropEvent(QDropEvent *event)
|
|||
QString fileName = urls.first().toLocalFile();
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.setValue("lastDir", QFileInfo(fileName).dir().absolutePath());
|
||||
|
||||
QMdiSubWindow *existing = findMdiChild(fileName);
|
||||
|
|
|
@ -179,7 +179,7 @@ void MdiChild::OpenEditWindow(bool wizard=false)
|
|||
}
|
||||
if (isNew && !wizard) {
|
||||
int ret;
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool wizardEnable=settings.value("wizardEnable", true).toBool();
|
||||
if (wizardEnable) {
|
||||
ret = QMessageBox::question(this, tr("Companion"), tr("Do you want to use model wizard? "), QMessageBox::Yes | QMessageBox::No);
|
||||
|
@ -346,7 +346,7 @@ bool MdiChild::save()
|
|||
|
||||
bool MdiChild::saveAs(bool isNew)
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName;
|
||||
if (GetEepromInterface()->getBoard() == BOARD_SKY9X) {
|
||||
curFile.replace(".eepe", ".bin");
|
||||
|
@ -490,7 +490,7 @@ void MdiChild::setCurrentFile(const QString &fileName)
|
|||
fileChanged = false;
|
||||
setWindowModified(false);
|
||||
updateTitle();
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int MaxRecentFiles =settings.value("history_size",10).toInt();
|
||||
QStringList files = settings.value("recentFileList").toStringList();
|
||||
files.removeAll(fileName);
|
||||
|
@ -508,7 +508,7 @@ QString MdiChild::strippedName(const QString &fullFileName)
|
|||
|
||||
void MdiChild::burnTo() // write to Tx
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool backupEnable=settings.value("backupEnable", true).toBool();
|
||||
QString backupPath=settings.value("backupPath", "").toString();
|
||||
if (!backupPath.isEmpty()) {
|
||||
|
@ -678,7 +678,7 @@ void MdiChild::setEEpromAvail(int eavail)
|
|||
|
||||
bool MdiChild::loadBackup()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), settings.value("lastDir").toString(),tr(EEPROM_FILES_FILTER));
|
||||
if (fileName.isEmpty())
|
||||
return false;
|
||||
|
|
|
@ -225,7 +225,7 @@ void preferencesDialog::firmwareChanged()
|
|||
ui->CPU_ID_LE->hide();
|
||||
ui->CPU_ID_LABEL->hide();
|
||||
}
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("FwRevisions");
|
||||
int fwrev = settings.value(variant.id, -1).toInt();
|
||||
settings.endGroup();
|
||||
|
@ -251,7 +251,7 @@ void preferencesDialog::firmwareChanged()
|
|||
|
||||
void preferencesDialog::writeValues()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
if (ui->locale_QB->currentIndex() > 0)
|
||||
settings.setValue("locale", ui->locale_QB->itemData(ui->locale_QB->currentIndex()));
|
||||
else
|
||||
|
@ -382,7 +382,7 @@ void preferencesDialog::populateFirmwareOptions(const FirmwareInfo * firmware)
|
|||
|
||||
void preferencesDialog::initSettings()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
int i = ui->locale_QB->findData(settings.value("locale"));
|
||||
if (i < 0) i = 0;
|
||||
ui->locale_QB->setCurrentIndex(i);
|
||||
|
@ -521,7 +521,7 @@ void preferencesDialog::on_fw_dnld_clicked()
|
|||
writeValues();
|
||||
if (!variant.firmware->getUrl(variant.id).isNull()) {
|
||||
if (ui->burnFirmware->isChecked()) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
current_firmware_variant = getFirmwareVariant();
|
||||
settings.setValue("firmware", current_firmware_variant.id);
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ void preferencesDialog::on_voice_dnld_clicked()
|
|||
void preferencesDialog::on_libraryPathButton_clicked()
|
||||
{
|
||||
ui->ProfSave_PB->setEnabled(true);
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your library folder"), settings.value("libraryPath").toString());
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("libraryPath", fileName);
|
||||
|
@ -552,7 +552,7 @@ void preferencesDialog::on_libraryPathButton_clicked()
|
|||
|
||||
void preferencesDialog::on_snapshotPathButton_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your snapshot folder"), settings.value("snapshotPath").toString());
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("snapshotpath", fileName);
|
||||
|
@ -563,7 +563,7 @@ void preferencesDialog::on_snapshotPathButton_clicked()
|
|||
|
||||
void preferencesDialog::on_snapshotClipboardCKB_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
if (ui->snapshotClipboardCKB->isChecked()) {
|
||||
ui->snapshotPath->setDisabled(true);
|
||||
ui->snapshotPathButton->setDisabled(true);
|
||||
|
@ -579,7 +579,7 @@ void preferencesDialog::on_snapshotClipboardCKB_clicked()
|
|||
|
||||
void preferencesDialog::on_backupPathButton_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select your Models and Settings backup folder"), settings.value("backupPath").toString());
|
||||
if (!fileName.isEmpty()) {
|
||||
settings.setValue("backupPath", fileName);
|
||||
|
@ -590,7 +590,7 @@ void preferencesDialog::on_backupPathButton_clicked()
|
|||
|
||||
void preferencesDialog::on_ge_pathButton_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select Google Earth executable"),ui->ge_lineedit->text());
|
||||
if (!fileName.isEmpty()) {
|
||||
ui->ge_lineedit->setText(fileName);
|
||||
|
@ -616,7 +616,7 @@ void preferencesDialog::on_splashLibraryButton_clicked()
|
|||
|
||||
void preferencesDialog::on_sdPathButton_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getExistingDirectory(this,tr("Select the folder replicating your SD structure"), settings.value("sdPath").toString());
|
||||
if (!fileName.isEmpty()) {
|
||||
ui->sdPath->setText(fileName);
|
||||
|
@ -626,7 +626,7 @@ void preferencesDialog::on_sdPathButton_clicked()
|
|||
|
||||
void preferencesDialog::on_ProfSlot_SB_valueChanged()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
|
||||
settings.beginGroup(profile);
|
||||
|
@ -655,7 +655,7 @@ void preferencesDialog::on_ProfSlot_SB_valueChanged()
|
|||
|
||||
void preferencesDialog::on_ProfSave_PB_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
settings.beginGroup("Profiles");
|
||||
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
|
||||
QString name=ui->ProfName_LE->text();
|
||||
|
@ -694,7 +694,7 @@ void preferencesDialog::on_ProfSave_PB_clicked()
|
|||
|
||||
void preferencesDialog::on_export_PB_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
|
||||
QString name=ui->ProfName_LE->text();
|
||||
if (!name.isEmpty()) {
|
||||
|
@ -715,7 +715,7 @@ void preferencesDialog::on_export_PB_clicked()
|
|||
|
||||
void preferencesDialog::on_import_PB_clicked()
|
||||
{
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
|
||||
QString name=ui->ProfName_LE->text();
|
||||
if (!name.isEmpty()) {
|
||||
|
@ -748,7 +748,7 @@ void preferencesDialog::on_SplashSelect_clicked()
|
|||
supportedImageFormats += QLatin1String(" *.") + QImageReader::supportedImageFormats()[formatIndex];
|
||||
}
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Open Image to load"), settings.value("lastImagesDir").toString(), tr("Images (%1)").arg(supportedImageFormats));
|
||||
|
||||
|
@ -825,7 +825,7 @@ void preferencesDialog::on_joystickChkB_clicked() {
|
|||
}
|
||||
|
||||
void preferencesDialog::on_joystickcalButton_clicked() {
|
||||
//QSettings settings("companion9x", "companion9x");
|
||||
//QSettings settings("companion", "companion");
|
||||
//settings.setValue("joystick-name",ui->joystickCB->currentText());
|
||||
joystickDialog * jd=new joystickDialog(this, ui->joystickCB->currentIndex());
|
||||
jd->exec();
|
||||
|
@ -837,7 +837,7 @@ void preferencesDialog::on_checkFWUpdates_clicked()
|
|||
{
|
||||
FirmwareVariant variant = getFirmwareVariant();
|
||||
if (ui->burnFirmware->isChecked()) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
current_firmware_variant = variant;
|
||||
settings.setValue("firmware", variant.id);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ simulatorDialog::simulatorDialog(QWidget *parent) :
|
|||
beepVal = 0;
|
||||
beepShow = 0;
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
backLight = settings.value("backLight",0).toInt();
|
||||
bool simuSW=settings.value("simuSW",false).toBool();
|
||||
switch (backLight) {
|
||||
|
@ -211,7 +211,7 @@ void simulatorDialog::setupTimer()
|
|||
void simulatorDialog::onButtonPressed(int value)
|
||||
{
|
||||
if (value==Qt::Key_Print) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool();
|
||||
QString fileName ="";
|
||||
if (!toclipboard) {
|
||||
|
|
|
@ -59,7 +59,7 @@ void splashLibrary::setupPage(int page) {
|
|||
}
|
||||
|
||||
void splashLibrary::getFileList() {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
imageList.clear();
|
||||
if (settings.value("embedded_splashes", 0).toInt() == 0) {
|
||||
QDir myRes(":/images/library");
|
||||
|
|
|
@ -30,7 +30,7 @@ xsimulatorDialog::xsimulatorDialog(QWidget *parent) :
|
|||
ui->setupUi(this);
|
||||
ui->lcd->setFocus();
|
||||
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
ui->lcd->setBackgroundColor(47, 123, 227);
|
||||
setupSticks();
|
||||
resize(0, 0); // to force min height, min width
|
||||
|
@ -179,7 +179,7 @@ void xsimulatorDialog::setupTimer()
|
|||
void xsimulatorDialog::onButtonPressed(int value)
|
||||
{
|
||||
if (value==Qt::Key_Print) {
|
||||
QSettings settings("companion9x", "companion9x");
|
||||
QSettings settings("companion", "companion");
|
||||
bool toclipboard=settings.value("snapshot_to_clipboard", false).toBool();
|
||||
QString fileName ="";
|
||||
if (!toclipboard) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue