Merge branch 'next' of https://github.com/opentx/opentx into next
This commit is contained in:
@@ -316,3 +316,4 @@ Christian Fuchs
|
|||||||
Arold Reinders
|
Arold Reinders
|
||||||
Robert Miller
|
Robert Miller
|
||||||
Aviomotive - www.aviomotive.com
|
Aviomotive - www.aviomotive.com
|
||||||
|
Mark Gaskievicz
|
||||||
|
|||||||
@@ -460,56 +460,6 @@ void fwPreferencesDialog::on_ProfSave_PB_clicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void fwPreferencesDialog::on_export_PB_clicked()
|
|
||||||
{
|
|
||||||
QSettings settings;
|
|
||||||
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
|
|
||||||
QString name=ui->ProfName_LE->text();
|
|
||||||
if (!name.isEmpty()) {
|
|
||||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Export profile As"), settings.value("lastDir").toString() + "/" +name+".ini" , "*.ini");
|
|
||||||
if (fileName.isEmpty())
|
|
||||||
return;
|
|
||||||
QSettings exportfile(fileName, QSettings::IniFormat);
|
|
||||||
settings.beginGroup("Profiles");
|
|
||||||
settings.beginGroup(profile);
|
|
||||||
QStringList keys = settings.childKeys();
|
|
||||||
foreach (QString key, keys) {
|
|
||||||
exportfile.setValue(key,settings.value(key));
|
|
||||||
}
|
|
||||||
settings.endGroup();
|
|
||||||
}
|
|
||||||
settings.endGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
void fwPreferencesDialog::on_import_PB_clicked()
|
|
||||||
{
|
|
||||||
QSettings settings;
|
|
||||||
QString profile=QString("profile%1").arg(ui->ProfSlot_SB->value());
|
|
||||||
QString name=ui->ProfName_LE->text();
|
|
||||||
if (!name.isEmpty()) {
|
|
||||||
int ret = QMessageBox::question(this, "Companion",
|
|
||||||
tr("Profile slot is not empty, profile slot %1 will we overwritten.<br>Are you sure ?").arg(ui->ProfSlot_SB->value()) ,
|
|
||||||
QMessageBox::Yes | QMessageBox::No);
|
|
||||||
if (ret==QMessageBox::No) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Profile to import"), settings.value("lastDir").toString(), "*.ini");
|
|
||||||
if (fileName.isEmpty())
|
|
||||||
return;
|
|
||||||
QSettings importfile(fileName, QSettings::IniFormat);
|
|
||||||
settings.beginGroup("Profiles");
|
|
||||||
settings.beginGroup(profile);
|
|
||||||
QStringList keys = importfile.childKeys();
|
|
||||||
foreach (QString key, keys) {
|
|
||||||
settings.setValue(key,importfile.value(key));
|
|
||||||
}
|
|
||||||
settings.endGroup();
|
|
||||||
settings.endGroup();
|
|
||||||
on_ProfSlot_SB_valueChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void fwPreferencesDialog::on_SplashSelect_clicked()
|
void fwPreferencesDialog::on_SplashSelect_clicked()
|
||||||
{
|
{
|
||||||
QString supportedImageFormats;
|
QString supportedImageFormats;
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ private slots:
|
|||||||
void on_checkFWUpdates_clicked();
|
void on_checkFWUpdates_clicked();
|
||||||
void on_ProfSlot_SB_valueChanged();
|
void on_ProfSlot_SB_valueChanged();
|
||||||
void on_ProfSave_PB_clicked();
|
void on_ProfSave_PB_clicked();
|
||||||
void on_export_PB_clicked();
|
|
||||||
void on_import_PB_clicked();
|
|
||||||
void on_SplashSelect_clicked();
|
void on_SplashSelect_clicked();
|
||||||
void on_clearImageButton_clicked();
|
void on_clearImageButton_clicked();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -86,13 +86,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="42" column="5">
|
|
||||||
<widget class="QPushButton" name="ProfSave_PB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Save Profile</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="4">
|
<item row="12" column="4">
|
||||||
<widget class="QCheckBox" name="optionCheckBox_19">
|
<widget class="QCheckBox" name="optionCheckBox_19">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -938,20 +931,6 @@ This is used by the templated to determine which channel goes to what number out
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="42" column="4">
|
|
||||||
<widget class="QPushButton" name="export_PB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Export</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="42" column="3">
|
|
||||||
<widget class="QPushButton" name="import_PB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Import</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="23" column="0">
|
<item row="23" column="0">
|
||||||
<widget class="QLabel" name="label_16">
|
<widget class="QLabel" name="label_16">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
@@ -1126,6 +1105,13 @@ May be different from firmware language</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="35" column="5">
|
||||||
|
<widget class="QPushButton" name="ProfSave_PB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save Profile</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#include <QNetworkProxyFactory>
|
#include <QNetworkProxyFactory>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QDesktopServices>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "mdichild.h"
|
#include "mdichild.h"
|
||||||
#include "burnconfigdialog.h"
|
#include "burnconfigdialog.h"
|
||||||
@@ -686,6 +687,11 @@ void MainWindow::newFile()
|
|||||||
child->show();
|
child->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::openDocumentURL()
|
||||||
|
{
|
||||||
|
QString link = "http://www.open-tx.org/documents.html";
|
||||||
|
QDesktopServices::openUrl(QUrl(link));
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::openFile()
|
void MainWindow::openFile()
|
||||||
{
|
{
|
||||||
@@ -1900,6 +1906,11 @@ void MainWindow::createActions()
|
|||||||
russianLanguageAct = new QAction(tr("Russian"),this);
|
russianLanguageAct = new QAction(tr("Russian"),this);
|
||||||
russianLanguageAct->setStatusTip(tr("Use Russian in menus"));
|
russianLanguageAct->setStatusTip(tr("Use Russian in menus"));
|
||||||
connect(russianLanguageAct, SIGNAL(triggered()), this, SLOT(setRULanguage()));
|
connect(russianLanguageAct, SIGNAL(triggered()), this, SLOT(setRULanguage()));
|
||||||
|
|
||||||
|
openDocumentURLAct = new QAction(tr("Manuals and other Documents"),this);
|
||||||
|
openDocumentURLAct->setStatusTip(tr("Open the OpenTX document page in a web browser"));
|
||||||
|
connect(openDocumentURLAct, SIGNAL(triggered()), this, SLOT(openDocumentURL()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::createMenus()
|
void MainWindow::createMenus()
|
||||||
@@ -1992,6 +2003,7 @@ void MainWindow::createMenus()
|
|||||||
helpMenu->addAction(checkForUpdatesAct);
|
helpMenu->addAction(checkForUpdatesAct);
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
helpMenu->addAction(aboutAct);
|
helpMenu->addAction(aboutAct);
|
||||||
|
helpMenu->addAction(openDocumentURLAct);
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
helpMenu->addAction(changelogAct);
|
helpMenu->addAction(changelogAct);
|
||||||
helpMenu->addAction(fwchangelogAct);
|
helpMenu->addAction(fwchangelogAct);
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ public slots:
|
|||||||
void unloadProfile();
|
void unloadProfile();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void openDocumentURL();
|
||||||
|
|
||||||
void setLanguage(QString langString);
|
void setLanguage(QString langString);
|
||||||
void setDefaultLanguage() {setLanguage("");};
|
void setDefaultLanguage() {setLanguage("");};
|
||||||
void setCZLanguage() {setLanguage("cs_CZ");};
|
void setCZLanguage() {setLanguage("cs_CZ");};
|
||||||
@@ -270,6 +272,7 @@ private:
|
|||||||
QAction *portugueseLanguageAct;
|
QAction *portugueseLanguageAct;
|
||||||
QAction *swedishLanguageAct;
|
QAction *swedishLanguageAct;
|
||||||
QAction *russianLanguageAct;
|
QAction *russianLanguageAct;
|
||||||
|
QAction *openDocumentURLAct;
|
||||||
QString fwToUpdate;
|
QString fwToUpdate;
|
||||||
QToolButton * profileButton;
|
QToolButton * profileButton;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user