2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2020-12-26 19:56:06 +00:00
|
|
|
// Copyright (c) 2020-2021, The Monero Project.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-06-27 11:46:32 +00:00
|
|
|
#include "AboutDialog.h"
|
|
|
|
#include "ui_AboutDialog.h"
|
2020-10-07 10:36:04 +00:00
|
|
|
#include "utils/utils.h"
|
|
|
|
#include "config-feather.h"
|
|
|
|
|
|
|
|
AboutDialog::AboutDialog(QWidget *parent)
|
|
|
|
: QDialog(parent)
|
|
|
|
, ui(new Ui::AboutDialog)
|
2021-03-14 21:12:02 +00:00
|
|
|
, m_model(new QStringListModel(this))
|
2020-10-07 10:36:04 +00:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
this->setWindowIcon(QIcon("://assets/images/appicons/64x64.png"));
|
|
|
|
// cute fox (c) Diego "rehrar" Salazar :-D
|
|
|
|
QPixmap p(":assets/images/cutexmrfox.png");
|
|
|
|
ui->aboutImage->setPixmap(p.scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
|
|
|
auto about = Utils::fileOpenQRC(":assets/about.txt");
|
|
|
|
auto about_text = Utils::barrayToString(about);
|
|
|
|
about_text = about_text.replace("<feather_version>", FEATHER_VERSION);
|
|
|
|
about_text = about_text.replace("<feather_git_head>", FEATHER_BRANCH);
|
|
|
|
about_text = about_text.replace("<current_year>", QString::number(QDate::currentDate().year()));
|
|
|
|
ui->copyrightText->setPlainText(about_text);
|
|
|
|
|
|
|
|
auto ack = Utils::fileOpenQRC(":assets/ack.txt");
|
|
|
|
auto ack_text = Utils::barrayToString(ack);
|
|
|
|
ui->ackText->setText(ack_text);
|
|
|
|
|
2021-01-22 05:21:08 +00:00
|
|
|
QString contributors = Utils::barrayToString(Utils::fileOpenQRC(":assets/contributors.txt"));
|
|
|
|
QStringList contributor_list = contributors.split("\n");
|
|
|
|
m_model->setStringList(contributor_list);
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-01-22 05:21:08 +00:00
|
|
|
ui->authorView->setHeaderHidden(true);
|
|
|
|
ui->authorView->setModel(this->m_model);
|
2020-10-07 10:36:04 +00:00
|
|
|
ui->authorView->header()->setSectionResizeMode(QHeaderView::Stretch);
|
|
|
|
|
|
|
|
this->adjustSize();
|
|
|
|
}
|
|
|
|
|
2021-06-27 12:13:05 +00:00
|
|
|
AboutDialog::~AboutDialog() = default;
|
2020-10-07 10:36:04 +00:00
|
|
|
|