mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Contributors / Release notes dialogs refactoring
This commit is contained in:
parent
46d7fb3ff6
commit
df7f715dd3
13 changed files with 841 additions and 729 deletions
23
CREDITS.txt
23
CREDITS.txt
|
@ -1,11 +1,14 @@
|
|||
Bertrand Songis
|
||||
Romolo Manfredini
|
||||
André Bernet
|
||||
Bertrand Songis (bsongis)
|
||||
André Bernet (kilrah)
|
||||
Michael Blandford
|
||||
Damjan Adamic (projectkk2glider)
|
||||
Franck Aguerre (jivarofad)
|
||||
Romolo Manfredini (romoloman)
|
||||
Martin Hotař (mhotar)
|
||||
|
||||
Rob Thomson
|
||||
Bryan J. Rentoul (aka Gruvin)
|
||||
Cameron Weeks
|
||||
Martin Hotař
|
||||
Bryan J. Rentoul (gruvin)
|
||||
Cameron Weeks (th9xer)
|
||||
Andreas Weitl
|
||||
Kjell Kernen
|
||||
Gabriel Birkus
|
||||
|
@ -13,10 +16,4 @@ Jean-Pierre Parisy
|
|||
Karl Szmutny
|
||||
Michal Hlavinka
|
||||
Pat Mackenzie
|
||||
Michael Byrne (logos and official splashes)
|
||||
Severino Anedda (splash screens)
|
||||
Grootwitbaas - 9xforums.com (mac)
|
||||
Adrian Amberg (splash screens)
|
||||
Wallaguest1 - 9xforums.com (splash screens)
|
||||
HC1969 - 9xforums.com (splash screens)
|
||||
|
||||
Michael Byrne
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
<a href="http://frsky-rc.com">FrSky (monthly)</a>
|
||||
<a href="http://alofthobbies.com">Aloft Hobbies</a>
|
||||
<a href="http://jonathan.it">Jonathan Modellismo</a>
|
||||
<a href="http://wstech.de">WsTech</a>
|
||||
<a href="http://aviomotive.com">Aviomotive</a>
|
||||
<a href="http://boltrc.com">BoltRC</a>
|
||||
<a href="http://aerialtechhobbies.com">Aerial Tech Hobbies</a>
|
||||
<a href="http://litepilots.com">LitePilots</a>
|
||||
<a href="http://openpilot.com">David Ankers (OpenPilot)</a>
|
||||
|
||||
Mario Sette
|
||||
Felice Baratto
|
||||
Alessandro Mari
|
||||
|
@ -17,8 +27,8 @@ Marc Lucht
|
|||
Michel Baily
|
||||
Zdenek Trojanek
|
||||
Martin Hotar
|
||||
[Devo] Stefan Grundevik
|
||||
[Devo] Fabio Eboli
|
||||
Stefan Grundevik
|
||||
Fabio Eboli
|
||||
Federico Zotti
|
||||
Albin Esbjörnsson
|
||||
Kilian Hüttenhofer
|
||||
|
@ -37,7 +47,6 @@ R. Scott Page
|
|||
Johan Cronje
|
||||
Renato Aranghelovici
|
||||
Jeffrey Irvin
|
||||
Aloft Hobbies
|
||||
John Rodgers
|
||||
Kenneth Crump
|
||||
Damjan Adamic
|
||||
|
@ -80,7 +89,6 @@ Christian Schulz
|
|||
Gregory J Shepherd
|
||||
Michael Shellim
|
||||
Ming Wang
|
||||
R. Scott Page
|
||||
Bernard Lukaschek
|
||||
Nigel Chippindale
|
||||
Mike Perkins
|
||||
|
@ -93,7 +101,6 @@ Heinrich Illig
|
|||
Michael Collins
|
||||
Michael Manning
|
||||
Craig Lorentz
|
||||
Jonathan Modellismo - jonathan.it
|
||||
André Lasseret
|
||||
Felipe Alexandre de Oliveira
|
||||
Brian Harris
|
||||
|
@ -121,7 +128,6 @@ Christophe Rodriguez
|
|||
Larisa Filocamo
|
||||
Hartmut Sahm
|
||||
Åke Brodin
|
||||
Aloft Hobbies - www.alofthobbies.com
|
||||
Ted Moss
|
||||
Filippos Tigarakis
|
||||
Chewytm
|
||||
|
@ -169,15 +175,12 @@ Willie Swanepoel
|
|||
Satoru Sasaki
|
||||
Tyler Darby
|
||||
Nicholas Crego
|
||||
Keith Hertzog
|
||||
Johan Moelich
|
||||
Timo Esser
|
||||
Dean Church (monthly)
|
||||
Brian Paddock
|
||||
Jean Pierre Parisy
|
||||
Norbert Martsch
|
||||
Jean-Marie Guitard
|
||||
Mike Perkins
|
||||
Tilman Baumann
|
||||
Fred Larssen
|
||||
Ari Aalto
|
||||
|
@ -199,7 +202,6 @@ Blake Spilman
|
|||
Timothy Pelletier
|
||||
Glen Roe (ShowMaster)
|
||||
Jan Van Ooteghem
|
||||
David Ankers - Special thanks here to the OpenPilot project!
|
||||
Lawrence Christensen
|
||||
Leo Duflou
|
||||
Bruce Wood
|
||||
|
@ -253,7 +255,6 @@ Terry McKinley
|
|||
Марков Алексей
|
||||
Offer Shmuely
|
||||
Ian Lobley
|
||||
Keith Hertzog
|
||||
Stéphane Fortas
|
||||
Peter Mitrik
|
||||
Thomas Majewski
|
||||
|
@ -272,7 +273,6 @@ Miguel Villalpando
|
|||
Kim Dong Hoon
|
||||
Terry McKinley
|
||||
Walter Bell
|
||||
wsTech - http://wstech.de
|
||||
Clinton Linck
|
||||
Josep Clodas Sola
|
||||
Thierry Martin
|
||||
|
@ -306,7 +306,6 @@ Henry Deucker
|
|||
Christian Fuchs
|
||||
Arold Reinders
|
||||
Robert Miller
|
||||
Aviomotive - www.aviomotive.com
|
||||
Mark Gaskievicz
|
||||
Roland Müller
|
||||
Frank Gewalt
|
||||
|
@ -320,7 +319,6 @@ Steve Coley
|
|||
Sean Cull
|
||||
Roberto Orsello
|
||||
David Finger
|
||||
FrSky - www.frsky-rc.com (monthly)
|
||||
Jean-Marie Oddo
|
||||
Mike Matheny
|
||||
Glen Roe (Showmaster)
|
||||
|
@ -347,7 +345,6 @@ Sven Assmus
|
|||
Markus Eberl
|
||||
Nicholas Field
|
||||
Harald Wilczak
|
||||
Michel Baily
|
||||
John Grepps
|
||||
Anthony Burbidge
|
||||
Sherba Baine
|
||||
|
@ -359,7 +356,6 @@ Aaron Stringer
|
|||
Alan J Wasserman
|
||||
Wolfgang Rauser
|
||||
Samuel Cook
|
||||
BoltRC - www.boltrc.com
|
||||
Friedrich Ipolt
|
||||
Barrington Cole
|
||||
Charles Lakins
|
||||
|
@ -426,14 +422,11 @@ Markus Wolf
|
|||
Andrew Fazio
|
||||
Stefan Künst
|
||||
Stephen Adams
|
||||
Arold Reinders
|
||||
Tauno Rautakorpi
|
||||
Frank Houvenaghel
|
||||
Aerial Tech Hobbies - www.aerialtechhobbies.com
|
||||
George Neusse
|
||||
Andreja Rusjakovski
|
||||
Axel Stöckle
|
||||
Mike Perkins
|
||||
Erwin Störrle
|
||||
Rodger Hopper
|
||||
Fernando Cesar
|
||||
|
@ -489,7 +482,6 @@ Robert Ferguson
|
|||
CY Enterprise
|
||||
Michel Stathakis Neto
|
||||
Beat Zurflueh
|
||||
Heinrich Illig
|
||||
Portstate Pty Ltd
|
||||
Jens Hoffmann
|
||||
Ricardo Santos
|
||||
|
@ -504,7 +496,6 @@ Cecil Porter
|
|||
Robert Canavan
|
||||
Greg Higginbottom
|
||||
Tim Walker
|
||||
Thos. O'Meara Photography
|
||||
Spis Ltd/TurboNote
|
||||
Patricia Cox
|
||||
Matthew Lukes
|
||||
|
@ -619,7 +610,6 @@ Manuel McLure
|
|||
Fernando Rimoldi
|
||||
Hiltenkamp Stephan
|
||||
Sandeep Kishore Jain
|
||||
Sebastien Charpentier
|
||||
Greg Parker
|
||||
Norman Maaß
|
||||
Adriano Del Ben
|
||||
|
@ -649,7 +639,6 @@ Pasi Pitkänen
|
|||
Lexington S Morley
|
||||
Jeff Roberson
|
||||
Volkov Victor
|
||||
Mike Perkins
|
||||
Bryan Anderson
|
||||
Daniel Garber
|
||||
Pavel Stein
|
||||
|
@ -674,7 +663,8 @@ RK Custom Homes
|
|||
James Houck
|
||||
Piet Teekens
|
||||
Tommy Widenflycht
|
||||
Johan Petrus Theophilus Maria van Melis
|
||||
Johan Petrus Theophilus
|
||||
Maria van Melis
|
||||
Ralph Gustafson
|
||||
Paul Luby
|
||||
Andrew Duncan
|
||||
|
@ -683,7 +673,6 @@ Edward Glover
|
|||
Kelly Byrd
|
||||
Brad Curtis
|
||||
Wolfgang Kuhl
|
||||
LitePilots - litepilots.com
|
||||
John Beidl
|
||||
Roy Nixon
|
||||
Glen Roe
|
||||
|
@ -751,7 +740,7 @@ F.Javier Martinez Velasco
|
|||
Claudio Piccinini
|
||||
John Jackson
|
||||
John Beech
|
||||
Rene Traa
|
||||
Rene TraaJohn Jackson
|
||||
Sebastien Charpentier (monthly)
|
||||
Nigel Hendriks
|
||||
Frédéric Devillard
|
||||
|
@ -766,7 +755,6 @@ Richard Shagam
|
|||
Stephen Bailey
|
||||
DK-System
|
||||
Casa Kuxtal
|
||||
Alain Labonne
|
||||
Christopher Potts
|
||||
Douglas George
|
||||
Michael Banks
|
||||
|
|
|
@ -144,6 +144,8 @@ set(companion_SRCS
|
|||
burnconfigdialog.cpp
|
||||
comparedialog.cpp
|
||||
contributorsdialog.cpp
|
||||
releasenotesdialog.cpp
|
||||
releasenotesfirmwaredialog.cpp
|
||||
customizesplashdialog.cpp
|
||||
radiointerface.cpp
|
||||
progresswidget.cpp
|
||||
|
@ -174,6 +176,8 @@ set(companion_MOC_HDRS
|
|||
fusesdialog.h
|
||||
logsdialog.h
|
||||
contributorsdialog.h
|
||||
releasenotesdialog.h
|
||||
releasenotesfirmwaredialog.h
|
||||
customizesplashdialog.h
|
||||
splashlibrary.h
|
||||
splashlabel.h
|
||||
|
@ -203,7 +207,7 @@ set(companion_UIS
|
|||
burnconfigdialog.ui
|
||||
downloaddialog.ui
|
||||
printdialog.ui
|
||||
contributorsdialog.ui
|
||||
htmldialog.ui
|
||||
customizesplashdialog.ui
|
||||
splashlibrary.ui
|
||||
progresswidget.ui
|
||||
|
|
|
@ -1,134 +1,108 @@
|
|||
#include "contributorsdialog.h"
|
||||
#include "ui_contributorsdialog.h"
|
||||
#include <QtGui>
|
||||
#include "ui_htmldialog.h"
|
||||
#include "helpers.h"
|
||||
|
||||
contributorsDialog::contributorsDialog(QWidget *parent, int contest, QString rnurl) :
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
ui(new Ui::contributorsDialog)
|
||||
ContributorsDialog::ContributorsDialog(QWidget * parent):
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
switch (contest) {
|
||||
case 0:
|
||||
{
|
||||
this->setWindowIcon(CompanionIcon("contributors.png"));
|
||||
QFile file(":/DONATIONS.txt");
|
||||
QString str;
|
||||
str.append("<html><head>");
|
||||
str.append("<style type=\"text/css\">\n");
|
||||
str.append(".mycss\n{\nfont-weight:normal;\ncolor:#000000;vertical-align: top;font-size:10px;text-align:left;font-family:arial, helvetica, sans-serif;\n}\n");
|
||||
str.append(".mycssb\n{\nfont-weight:bold;\ncolor:#C00000;vertical-align: top;font-size:10px;text-align:left;font-family:arial, helvetica, sans-serif;\n}\n");
|
||||
str.append(".myhead\n{\nfont-weight:bold;\ncolor:#000000;font-size:14px;text-align:left;font-family:arial, helvetica, sans-serif;\n}\n");
|
||||
str.append("</style>\n</head><body class=\"mycss\"><table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
|
||||
str.append("<tr><td class=\"myhead\">"+tr("People who have contributed to this project")+"</td></tr>");
|
||||
str.append("</table>");
|
||||
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
int columns=6;
|
||||
float cwidth=100.0/columns;
|
||||
while (!file.atEnd()) {
|
||||
str.append("<tr>");
|
||||
for (int i=0; i<columns; i++) {
|
||||
str.append(QString("<td width=\"%1%\" ").arg(cwidth));
|
||||
if (!file.atEnd()) {
|
||||
QByteArray line = file.readLine();
|
||||
if (line.contains("monthly") || line.contains("mensual")) {
|
||||
str.append("class=\"mycssb\">");
|
||||
} else {
|
||||
str.append("class=\"mycss\">");
|
||||
}
|
||||
str.append(line.trimmed()+"</td>");
|
||||
} else {
|
||||
str.append("class=\"mycss\"> </td>");
|
||||
}
|
||||
}
|
||||
str.append("</tr>");
|
||||
}
|
||||
}
|
||||
str.append("</table>");
|
||||
QFile file2(":/CREDITS.txt");
|
||||
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
|
||||
str.append("<tr><td class=\"mycss\"> </td></tr>");
|
||||
str.append("<tr><td class=\"myhead\">"+tr("Coders")+"</td></tr>");
|
||||
str.append("</table>");
|
||||
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
|
||||
if(file2.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
|
||||
while (!file2.atEnd()) {
|
||||
str.append("<tr>");
|
||||
for (int i=0; i<3; i++) {
|
||||
str.append("<td width=\"33.33%\" class=\"mycss\">");
|
||||
if (!file2.atEnd()) {
|
||||
QByteArray line = file2.readLine();
|
||||
str.append(line.trimmed());
|
||||
} else {
|
||||
str.append(" ");
|
||||
}
|
||||
str.append("</td>");
|
||||
}
|
||||
str.append("</tr>");
|
||||
}
|
||||
}
|
||||
str.append("<tr><td class=\"mycss\"> </td></tr>");
|
||||
str.append("<tr><td colspan=3 class=\"mycss\">" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "<br/></td></tr>");
|
||||
str.append("<tr><td colspan=3 class=\"mycss\">" + tr("Thank you all !!!") + "</td></tr>");
|
||||
str.append("</table>");
|
||||
str.append("</body></html>");
|
||||
ui->textEditor->setHtml(str);
|
||||
ui->textEditor->scroll(0, 0);
|
||||
setWindowTitle(tr("Contributors"));
|
||||
break;
|
||||
}
|
||||
ui->setupUi(this);
|
||||
|
||||
case 1:
|
||||
{
|
||||
this->setWindowIcon(CompanionIcon("changelog.png"));
|
||||
QFile file(":/releasenotes.txt");
|
||||
if(file.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
|
||||
ui->textEditor->setHtml(file.readAll());
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
ui->textEditor->scroll(0,0);
|
||||
setWindowTitle(tr("Companion Release Notes"));
|
||||
break;
|
||||
}
|
||||
setWindowTitle(tr("OpenTX Contributors"));
|
||||
setWindowIcon(CompanionIcon("contributors.png"));
|
||||
|
||||
case 2:
|
||||
{
|
||||
if (!rnurl.isEmpty()) {
|
||||
this->setWindowIcon(CompanionIcon("changelog.png"));
|
||||
this->setWindowTitle(tr("OpenTX Release Notes"));
|
||||
manager = new QNetworkAccessManager(this);
|
||||
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
|
||||
QUrl url(rnurl);
|
||||
QNetworkRequest request(url);
|
||||
request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);
|
||||
manager->get(request);
|
||||
}
|
||||
else {
|
||||
QTimer::singleShot(0, this, SLOT(forceClose()));
|
||||
}
|
||||
QString str = "<html>" \
|
||||
"<head>" \
|
||||
" <style type=\"text/css\">" \
|
||||
" .normal { font-weight:normal;color:#000000;vertical-align:top;font-size:10px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
|
||||
" .bold { font-weight:bold;color:#C00000;vertical-align:top;font-size:10px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
|
||||
" .title { font-weight:bold;color:#000000;font-size:14px;text-align:left;font-family:arial,helvetica,sans-serif; }" \
|
||||
" </style>" \
|
||||
"</head>"
|
||||
"<body class=\"normal\">";
|
||||
|
||||
QFile credits(":/CREDITS.txt");
|
||||
if (credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QStringList names;
|
||||
while (!credits.atEnd()) {
|
||||
QByteArray line = credits.readLine();
|
||||
if (line.trimmed() == "")
|
||||
break;
|
||||
}
|
||||
names.append(line.trimmed());
|
||||
}
|
||||
str.append(formatTable(tr("Main Developers"), names, 3));
|
||||
|
||||
names.clear();
|
||||
while (!credits.atEnd()) {
|
||||
QByteArray line = credits.readLine();
|
||||
names.append(line.trimmed());
|
||||
}
|
||||
str.append(formatTable(tr("Other contributors"), names, 3));
|
||||
}
|
||||
|
||||
QFile donations(":/DONATIONS.txt");
|
||||
if (donations.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QStringList names;
|
||||
while (!donations.atEnd()) {
|
||||
QByteArray line = donations.readLine();
|
||||
if (line.trimmed() == "")
|
||||
break;
|
||||
names.append(line.trimmed());
|
||||
}
|
||||
str.append(formatTable(tr("Companies and projects who have donated to OpenTX"), names, 3));
|
||||
|
||||
names.clear();
|
||||
while (!donations.atEnd()) {
|
||||
QByteArray line = donations.readLine();
|
||||
names.append(line);
|
||||
}
|
||||
str.append(formatTable(tr("People who have donated to OpenTX"), names, 6));
|
||||
}
|
||||
|
||||
str.append(" <tr><td class=\"normal\"> </td></tr>" \
|
||||
" <tr><td colspan=3 class=\"normal\">" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "<br/></td></tr>" \
|
||||
" <tr><td colspan=3 class=\"normal\">" + tr("Thank you all !!!") + "</td></tr>" \
|
||||
"</table>");
|
||||
|
||||
|
||||
str.append("</body></html>");
|
||||
ui->textEditor->setHtml(str);
|
||||
ui->textEditor->scroll(0, 0);
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
|
||||
void contributorsDialog::showEvent ( QShowEvent * )
|
||||
ContributorsDialog::~ContributorsDialog()
|
||||
{
|
||||
ui->textEditor->scroll(0, 0);
|
||||
delete ui;
|
||||
}
|
||||
|
||||
contributorsDialog::~contributorsDialog()
|
||||
QString ContributorsDialog::formatTable(const QString & title, const QStringList & names, int columns)
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
const float cwidth = 100.0 / columns;
|
||||
QString str = "<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>" \
|
||||
" <tr><td class=\"normal\"> </td></tr>" \
|
||||
" <tr><td class=\"title\">" + title + "</td></tr>" \
|
||||
"</table>";
|
||||
|
||||
void contributorsDialog::replyFinished(QNetworkReply * reply)
|
||||
{
|
||||
ui->textEditor->setHtml(reply->readAll());
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
str.append("<table width=\"100%\" border=0 cellspacing=0 cellpadding=2>");
|
||||
|
||||
void contributorsDialog::forceClose()
|
||||
{
|
||||
accept();;
|
||||
int column = 0;
|
||||
foreach(QString name, names) {
|
||||
if (column == 0) {
|
||||
str.append("<tr>");
|
||||
}
|
||||
QString trclass = name.contains("monthly") ? "bold" : "normal";
|
||||
str.append(QString("<td width=\"%1%\" class=\"%2\">%3</td>").arg(cwidth).arg(trclass).arg(name.trimmed().replace("monthly", tr("monthly"))));
|
||||
if (++column == columns) {
|
||||
str.append("</tr>");
|
||||
column = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (column != 0) {
|
||||
str.append("</tr>");
|
||||
}
|
||||
|
||||
str.append("</table>");
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -2,30 +2,22 @@
|
|||
#define CONTRIBUTORSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "eeprominterface.h"
|
||||
#include "downloaddialog.h"
|
||||
|
||||
namespace Ui {
|
||||
class contributorsDialog;
|
||||
class HtmlDialog;
|
||||
}
|
||||
|
||||
class contributorsDialog : public QDialog
|
||||
class ContributorsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit contributorsDialog(QWidget *parent = 0, int contest = 0, QString rnurl = QString() );
|
||||
~contributorsDialog();
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
Ui::contributorsDialog *ui;
|
||||
QNetworkAccessManager *manager;
|
||||
|
||||
void showEvent ( QShowEvent * );
|
||||
|
||||
private slots:
|
||||
void forceClose();
|
||||
void replyFinished(QNetworkReply * reply);
|
||||
public:
|
||||
explicit ContributorsDialog(QWidget * parent = 0);
|
||||
~ContributorsDialog();
|
||||
|
||||
private:
|
||||
Ui::HtmlDialog * ui;
|
||||
QString formatTable(const QString & title, const QStringList & names, int colums);
|
||||
};
|
||||
|
||||
#endif // CONTRIBUTORSDIALOG_H
|
||||
|
|
|
@ -1094,6 +1094,17 @@ void addOpenTxCommonOptions(OpenTxFirmware * firmware)
|
|||
firmware->addOptions(fai_options);
|
||||
}
|
||||
|
||||
void addOpenTxTaranisOptions(OpenTxFirmware * firmware)
|
||||
{
|
||||
firmware->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
firmware->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
firmware->addOption("lua", QObject::tr("Support for Lua model scripts"));
|
||||
firmware->addOption("nojoystick", QObject::tr("No Joystick emulation inside the FW (only Mass Storage as in the Bootloader)"));
|
||||
firmware->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
|
||||
firmware->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use anymore on radios sold after Jan 1st, 2015"));
|
||||
firmware->addOption("internalppm", QObject::tr("Support for PPM internal module hack"));
|
||||
}
|
||||
|
||||
void addOpenTxLcdOptions(OpenTxFirmware * firmware)
|
||||
{
|
||||
Option lcd_options[] = {
|
||||
|
@ -1338,35 +1349,20 @@ void registerOpenTxFirmwares()
|
|||
|
||||
/* Taranis board */
|
||||
openTx = new OpenTxFirmware("opentx-taranis", QObject::tr("OpenTX for FrSky Taranis"), BOARD_TARANIS);
|
||||
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
openTx->addOption("haptic", QObject::tr("Haptic module installed"));
|
||||
openTx->addOption("lua", QObject::tr("Support for Lua model scripts"));
|
||||
openTx->addOption("nojoystick", QObject::tr("No Joystick emulation inside the FW (only Mass Storage as in the Bootloader)"));
|
||||
openTx->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
|
||||
openTx->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use anymore on radios sold after Jan 1st, 2015"));
|
||||
addOpenTxTaranisOptions(openTx);
|
||||
addOpenTxCommonOptions(openTx);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* Taranis Plus board */
|
||||
openTx = new OpenTxFirmware("opentx-taranisplus", QObject::tr("OpenTX for FrSky Taranis Plus"), BOARD_TARANIS_PLUS);
|
||||
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
openTx->addOption("lua", QObject::tr("Support for Lua model scripts"));
|
||||
openTx->addOption("nojoystick", QObject::tr("No Joystick emulation inside the FW (only Mass Storage as in the Bootloader)"));
|
||||
openTx->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
|
||||
openTx->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use anymore on radios sold after Jan 1st, 2015"));
|
||||
addOpenTxTaranisOptions(openTx);
|
||||
addOpenTxCommonOptions(openTx);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
/* Taranis X9E board */
|
||||
openTx = new OpenTxFirmware("opentx-taranisx9e", QObject::tr("OpenTX for FrSky Taranis X9E"), BOARD_TARANIS_X9E);
|
||||
openTx->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
openTx->addOption("nogvars", QObject::tr("Disable Global variables"));
|
||||
openTx->addOption("lua", QObject::tr("Support for Lua model scripts"));
|
||||
openTx->addOption("nojoystick", QObject::tr("No Joystick emulation inside the FW (only Mass Storage as in the Bootloader)"));
|
||||
openTx->addOption("mixersmon", QObject::tr("Adds mixers output view to the CHANNELS MONITOR screen, pressing [ENT] switches between the views"));
|
||||
openTx->addOption("eu", QObject::tr("Removes D8 and LR12 FrSky protocols that are not legal for use anymore on radios sold after Jan 1st, 2015"));
|
||||
addOpenTxTaranisOptions(openTx);
|
||||
addOpenTxCommonOptions(openTx);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>contributorsDialog</class>
|
||||
<widget class="QDialog" name="contributorsDialog">
|
||||
<class>HtmlDialog</class>
|
||||
<widget class="QDialog" name="HtmlDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
|
@ -56,6 +56,8 @@
|
|||
#include "printdialog.h"
|
||||
#include "version.h"
|
||||
#include "contributorsdialog.h"
|
||||
#include "releasenotesdialog.h"
|
||||
#include "releasenotesfirmwaredialog.h"
|
||||
#include "customizesplashdialog.h"
|
||||
#include "flasheepromdialog.h"
|
||||
#include "flashfirmwaredialog.h"
|
||||
|
@ -422,8 +424,8 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
|||
msgBox.resize(0, 0);
|
||||
msgBox.exec();
|
||||
if (msgBox.clickedButton() == rnButton) {
|
||||
contributorsDialog *cd = new contributorsDialog(this,2,rn);
|
||||
cd->exec();
|
||||
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
|
||||
dialog->exec();
|
||||
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(versionString), QMessageBox::Yes | QMessageBox::No);
|
||||
if (ret2 == QMessageBox::Yes)
|
||||
download = true;
|
||||
|
@ -451,7 +453,7 @@ void MainWindow::checkForFirmwareUpdateFinished(QNetworkReply * reply)
|
|||
msgBox.resize(0,0);
|
||||
msgBox.exec();
|
||||
if( msgBox.clickedButton() == rnButton ) {
|
||||
contributorsDialog *cd = new contributorsDialog(this, 2, rn);
|
||||
ContributorsDialog *cd = new ContributorsDialog(this); // , 2, rn);
|
||||
cd->exec();
|
||||
int ret2 = QMessageBox::question(this, "Companion", tr("Do you want to download release %1 now ?").arg(versionString),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
@ -666,8 +668,8 @@ void MainWindow::fwPrefs()
|
|||
|
||||
void MainWindow::contributors()
|
||||
{
|
||||
contributorsDialog *cd = new contributorsDialog(this,0);
|
||||
cd->exec();
|
||||
ContributorsDialog * dialog = new ContributorsDialog(this);
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
void MainWindow::sdsync()
|
||||
|
@ -686,8 +688,8 @@ void MainWindow::sdsync()
|
|||
|
||||
void MainWindow::changelog()
|
||||
{
|
||||
contributorsDialog *cd = new contributorsDialog(this,1);
|
||||
cd->exec();
|
||||
ReleaseNotesDialog * dialog = new ReleaseNotesDialog(this);
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
void MainWindow::fwchangelog()
|
||||
|
@ -698,8 +700,8 @@ void MainWindow::fwchangelog()
|
|||
QMessageBox::information(this, tr("Firmware updates"), tr("Current firmware does not provide release notes informations."));
|
||||
}
|
||||
else {
|
||||
contributorsDialog *cd = new contributorsDialog(this,2, rn);
|
||||
cd->exec();
|
||||
ReleaseNotesFirmwareDialog * dialog = new ReleaseNotesFirmwareDialog(this, rn);
|
||||
dialog->exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
25
companion/src/releasenotesdialog.cpp
Executable file
25
companion/src/releasenotesdialog.cpp
Executable file
|
@ -0,0 +1,25 @@
|
|||
#include "releasenotesdialog.h"
|
||||
#include "ui_htmldialog.h"
|
||||
|
||||
ReleaseNotesDialog::ReleaseNotesDialog(QWidget * parent) :
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(tr("Companion Release Notes"));
|
||||
setWindowIcon(CompanionIcon("changelog.png"));
|
||||
|
||||
QFile file(":/releasenotes.txt");
|
||||
if (file.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
|
||||
ui->textEditor->setHtml(file.readAll());
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
ui->textEditor->scroll(0, 0);
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
|
||||
ReleaseNotesDialog::~ReleaseNotesDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
23
companion/src/releasenotesdialog.h
Executable file
23
companion/src/releasenotesdialog.h
Executable file
|
@ -0,0 +1,23 @@
|
|||
#ifndef RELEASENOTESDIALOG_H
|
||||
#define RELEASENOTESDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "helpers.h"
|
||||
|
||||
namespace Ui {
|
||||
class HtmlDialog;
|
||||
}
|
||||
|
||||
class ReleaseNotesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ReleaseNotesDialog(QWidget *parent = 0);
|
||||
~ReleaseNotesDialog();
|
||||
|
||||
private:
|
||||
Ui::HtmlDialog * ui;
|
||||
};
|
||||
|
||||
#endif // RELEASENOTESDIALOG_H
|
32
companion/src/releasenotesfirmwaredialog.cpp
Executable file
32
companion/src/releasenotesfirmwaredialog.cpp
Executable file
|
@ -0,0 +1,32 @@
|
|||
#include "releasenotesfirmwaredialog.h"
|
||||
#include "ui_htmldialog.h"
|
||||
#include "helpers.h"
|
||||
|
||||
ReleaseNotesFirmwareDialog::ReleaseNotesFirmwareDialog(QWidget * parent, const QString & rnurl):
|
||||
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
||||
ui(new Ui::HtmlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(tr("OpenTX Release Notes"));
|
||||
setWindowIcon(CompanionIcon("changelog.png"));
|
||||
|
||||
manager = new QNetworkAccessManager(this);
|
||||
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(replyFinished(QNetworkReply *)));
|
||||
QUrl url(rnurl);
|
||||
QNetworkRequest request(url);
|
||||
request.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::AlwaysNetwork);
|
||||
manager->get(request);
|
||||
}
|
||||
|
||||
ReleaseNotesFirmwareDialog::~ReleaseNotesFirmwareDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ReleaseNotesFirmwareDialog::replyFinished(QNetworkReply * reply)
|
||||
{
|
||||
ui->textEditor->setHtml(reply->readAll());
|
||||
ui->textEditor->setOpenExternalLinks(true);
|
||||
}
|
||||
|
29
companion/src/releasenotesfirmwaredialog.h
Executable file
29
companion/src/releasenotesfirmwaredialog.h
Executable file
|
@ -0,0 +1,29 @@
|
|||
#ifndef RELEASENOTESFIRMWAREDIALOG_H
|
||||
#define RELEASENOTESFIRMWAREDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "eeprominterface.h"
|
||||
#include "downloaddialog.h"
|
||||
|
||||
namespace Ui {
|
||||
class HtmlDialog;
|
||||
}
|
||||
|
||||
class ReleaseNotesFirmwareDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ReleaseNotesFirmwareDialog(QWidget *parent, const QString & rnurl);
|
||||
~ReleaseNotesFirmwareDialog();
|
||||
|
||||
private:
|
||||
Ui::HtmlDialog *ui;
|
||||
QNetworkAccessManager *manager;
|
||||
|
||||
private slots:
|
||||
void replyFinished(QNetworkReply * reply);
|
||||
|
||||
};
|
||||
|
||||
#endif // RELEASENOTESFIRMWAREDIALOG_H
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue