diff options
Diffstat (limited to 'src/main-view/AboutDialog.cpp')
-rw-r--r-- | src/main-view/AboutDialog.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main-view/AboutDialog.cpp b/src/main-view/AboutDialog.cpp new file mode 100644 index 0000000..f1a7839 --- /dev/null +++ b/src/main-view/AboutDialog.cpp @@ -0,0 +1,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>"; + } |