summaryrefslogtreecommitdiff
path: root/src/main-view/AboutDialog.cpp
blob: f1a78394bda11fe60a6ad8538d5a3ab186070170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "AboutDialog.h"
#include "../strings.h"
#include "../version.h"

AboutDialog::AboutDialog(QWidget* parent):
    QMessageBox(parent)
{
    setIconPixmap(QPixmap(":/images/freshmemory.png"));
    setWindowTitle(tr("About %1").arg( Strings::tr(Strings::s_appTitle)));
    setText(createAboutText());
    setEscapeButton(addButton(QMessageBox::Ok));
}

QString AboutDialog::createAboutText()
{
    QString formattedBuildStr;
    if( !BuildStr.isEmpty() )
        formattedBuildStr = "<p style=\"font-size:10pt\">" + BuildStr + "</p>";
    return QString("<p><h2>") + Strings::tr(Strings::s_appTitle) + " " + FM_VERSION + "</h2></p>" +
        formattedBuildStr +
        "<p>" + tr("Learn new things quickly and keep your memory fresh with time spaced repetition.") + "</p>" +
        "<p>" + Strings::tr(Strings::s_author) + "</p>" +
        "<p><a href=\"http://fresh-memory.com\"> fresh-memory.com </a></p>" +
        "</a></p>" +
        "<p>" + tr("License:") + " <a href=\"http://www.gnu.org/copyleft/gpl.html\"> GPL 3" +
        "</a></p>" + "<p><img src=\":/images/gplv3-88x31.png\"></p>";
    }