31 #include "gui/formabout.h"
33 #include "miscellaneous/iconfactory.h"
34 #include "miscellaneous/textfactory.h"
37 #include <QTextStream>
44 setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
48 setWindowTitle(tr(
"About %1").arg(APP_NAME));
50 m_ui->m_lblIcon->setPixmap(QPixmap(APP_ICON_PATH));
53 QTextStream text_stream;
55 text_stream.setDevice(&file);
57 file.setFileName(APP_INFO_PATH +
"/CHANGELOG");
58 if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
59 m_ui->m_txtChangelog->setText(text_stream.readAll());
63 m_ui->m_txtChangelog->setText(tr(
"Changelog not found."));
66 file.setFileName(APP_INFO_PATH +
"/LICENSE");
67 if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
68 m_ui->m_txtLicense->setText(text_stream.readAll());
72 m_ui->m_txtLicense->setText(tr(
"License not found."));
76 m_ui->m_lblDesc->setText(tr(
"<b>%8</b><br>"
77 "<b>Version:</b> %1 (build on %2 with CMake %3)<br>"
78 "<b>Revision:</b> %4<br>"
79 "<b>Build date:</b> %5<br>"
80 "<b>Qt:</b> %6 (compiled against %7)<br>").arg(qApp->applicationVersion(),
85 __TIME__)).toString(Qt::DefaultLocaleShortDate),
90 m_ui->m_txtInfo->setText(tr(
"<body>%4 is an easy-to-use program that helps users make mobile apps without any knowledge of application development."
91 "<br><br>Visit us at <a href=\"%2\">%2</a>."
92 "<br><br>Any feedback or suggestions related to %4 are always welcome. Please write to us at <a href=\"mailto:%1\">%1</a>."
93 "<br><br>Copyright (C) 2012 %3</body>").arg(APP_EMAIL,
99 FormAbout::~FormAbout() {
100 qDebug(
"Destroying FormAbout instance.");
static QDateTime parseDateTime(const QString &date_time)
Tries to parse input textual date/time representation.
static IconFactory * instance()
Singleton getter.