summaryrefslogtreecommitdiff
path: root/src/main-view/AboutDialog.cpp
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/main-view/AboutDialog.cpp
Initial mirror commitHEADmaster
Diffstat (limited to 'src/main-view/AboutDialog.cpp')
-rw-r--r--src/main-view/AboutDialog.cpp27
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>";
+ }