48 lines
888 B
C++
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
|