This repository has been archived on 2020-04-18. You can view files and clone it, but cannot push or open issues or pull requests.
FediPotato/gui/src/dialog_about.cpp

48 lines
888 B
C++

#include "dialog_about.hpp"
#include "fedipotato.hpp"
#include <QFile>
namespace FediPotato
{
AboutDialog::AboutDialog(QDialog *parent)
: QDialog(parent)
{
setupUi(this);
setWindowTitle(QString("About FediPotato ")
+= FediPotato::get_version().data());
display_authors();
display_credits();
}
void AboutDialog::display_authors() const
{
QFile file(":/AUTHORS");
if (file.open(QIODevice::ReadOnly))
{
label_authors->setText(file.readAll());
}
else
{
label_authors->setText(tr("Could not open :/AUTHORS."));
}
}
void AboutDialog::display_credits() const
{
QFile file(":/CREDITS");
if (file.open(QIODevice::ReadOnly))
{
label_credits->setText(file.readAll());
}
else
{
label_credits->setText(tr("Could not open :/CREDITS."));
}
}
} // namespace FediPotato