");
- if(file2.open( QIODevice::ReadOnly | QIODevice::Text ) ) {
- while (!file2.atEnd()) {
- str.append("");
- for (int i=0; i<3; i++) {
- str.append("");
- if (!file2.atEnd()) {
- QByteArray line = file2.readLine();
- str.append(line.trimmed());
- } else {
- str.append(" ");
- }
- str.append(" | ");
- }
- str.append("
");
- }
- }
- str.append(" |
");
- str.append("" + tr("Honors go to Rafal Tomczak (RadioClone), Thomas Husterer (th9x) and Erez Raviv (er9x and eePe)") + "
|
");
- str.append("" + tr("Thank you all !!!") + " |
");
- str.append("
");
- str.append("");
- ui->textEditor->setHtml(str);
- ui->textEditor->scroll(0, 0);
- setWindowTitle(tr("Contributors"));
- break;
- }
-
- 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"));
+ ui->setupUi(this);
+
+ setWindowTitle(tr("OpenTX Contributors"));
+ setWindowIcon(CompanionIcon("contributors.png"));
+
+ QString str = "" \
+ "" \
+ " " \
+ ""
+ "";
+
+ QFile credits(":/CREDITS.txt");
+ if (credits.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QStringList names;
+ while (!credits.atEnd()) {
+ QByteArray line = credits.readLine();
+ if (line.trimmed() == "")
break;
- }
-
- 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()));
- }
+ 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));
-void contributorsDialog::showEvent ( QShowEvent * )
-{
- ui->textEditor->scroll(0, 0);
-}
+ names.clear();
+ while (!donations.atEnd()) {
+ QByteArray line = donations.readLine();
+ names.append(line);
+ }
+ str.append(formatTable(tr("People who have donated to OpenTX"), names, 6));
+ }
-contributorsDialog::~contributorsDialog()
-{
- delete ui;
+ str.append("