BuildmLearn Toolkit  2.0.4
BuildmLearn Toolkit is an easy-to-use program that helps users make mobile apps without any knowledge of application development.
 All Classes Functions Enumerations Groups Pages
FormAbout Class Reference

Form for displaying "about" information. More...

#include <formabout.h>

Collaboration diagram for FormAbout:
Collaboration graph

Public Member Functions

 FormAbout (QWidget *parent)
 Constructor. More...
 

Detailed Description

Form for displaying "about" information.

Definition at line 46 of file formabout.h.

Constructor & Destructor Documentation

FormAbout::FormAbout ( QWidget *  parent)
explicit

Constructor.

Parameters
parentParent widget.

Definition at line 40 of file formabout.cpp.

40  : QDialog(parent), m_ui(new Ui::FormAbout) {
41  m_ui->setupUi(this);
42 
43  // Set flags and attributes.
44  setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
45  setWindowIcon(IconFactory::instance()->fromTheme("application-about"));
46 
47  //: About toolkit dialog title.
48  setWindowTitle(tr("About %1").arg(APP_NAME));
49 
50  m_ui->m_lblIcon->setPixmap(QPixmap(APP_ICON_PATH));
51 
52  // Load information from embedded text files.
53  QTextStream text_stream;
54  QFile file;
55  text_stream.setDevice(&file);
56 
57  file.setFileName(APP_INFO_PATH + "/CHANGELOG");
58  if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
59  m_ui->m_txtChangelog->setText(text_stream.readAll());
60  file.close();
61  }
62  else {
63  m_ui->m_txtChangelog->setText(tr("Changelog not found."));
64  }
65 
66  file.setFileName(APP_INFO_PATH + "/LICENSE");
67  if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
68  m_ui->m_txtLicense->setText(text_stream.readAll());
69  file.close();
70  }
71  else {
72  m_ui->m_txtLicense->setText(tr("License not found."));
73  }
74 
75  // Set other informative texts.
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(),
81  CMAKE_SYSTEM,
82  CMAKE_VERSION,
83  APP_REVISION,
84  TextFactory::parseDateTime(QString("%1 %2").arg(__DATE__,
85  __TIME__)).toString(Qt::DefaultLocaleShortDate),
86  qVersion(),
87  QT_VERSION_STR,
88  APP_NAME));
89 
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,
94  APP_URL,
95  APP_AUTHOR,
96  APP_NAME));
97 }
static QDateTime parseDateTime(const QString &date_time)
Tries to parse input textual date/time representation.
Definition: textfactory.cpp:43
static IconFactory * instance()
Singleton getter.
Definition: iconfactory.cpp:48

Here is the call graph for this function:


The documentation for this class was generated from the following files: