--- a/QTfrontend/ui/widget/about.cpp Wed Jan 02 11:11:49 2013 +0100
+++ b/QTfrontend/ui/widget/about.cpp Sun Jan 27 00:28:57 2013 +0100
@@ -23,10 +23,21 @@
#include <QRegExp>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
+#include <QMessageBox>
#include <QNetworkReply>
#include <QDebug>
#include "hwconsts.h"
#include "SDLInteraction.h"
+#include "SDL.h"
+#include "SDL_version.h"
+#include "physfs.h"
+
+#ifdef VIDEOREC
+extern "C"
+{
+#include "libavutil/avutil.h"
+}
+#endif
#include "about.h"
@@ -35,6 +46,9 @@
{
QGridLayout *mainLayout = new QGridLayout(this);
+ QVBoxLayout * leftLayout = new QVBoxLayout();
+ mainLayout->addLayout(leftLayout, 0, 0, 2, 1);
+
QLabel *imageLabel = new QLabel;
QImage image(":/res/Hedgehog.png");
imageLabel->setPixmap(QPixmap::fromImage(image));
@@ -44,7 +58,7 @@
imageLabel->setMinimumHeight(30);
imageLabel->setMaximumHeight(300);
- mainLayout->addWidget(imageLabel, 0, 0, 2, 1);
+ leftLayout->addWidget(imageLabel, 0, Qt::AlignHCenter);
QLabel *lbl1 = new QLabel(this);
lbl1->setOpenExternalLinks(true);
@@ -55,7 +69,7 @@
"</style>"
"<div align=\"center\"><h1>Hedgewars</h1>"
"<h3>" + QLabel::tr("Version") + " " + *cVersionString + "</h3>"
- "<p><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p><br>" +
+ "<p><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p>" +
QLabel::tr("This program is distributed under the GNU General Public License v2") +
"</div>"
);
@@ -68,6 +82,42 @@
lbl2->setSource(localpage); //sets the source of the label from the file above
mainLayout->addWidget(lbl2, 1, 1);
+ /* Library information */
+
+ QString libinfo = "<style type=text/css>a:link { color: #FFFF6E; }</style>";
+
+#ifdef __GNUC__
+ libinfo.append(QString("Compiler: <a href=\"http://gcc.gnu.org\">GCC</a> %1<br>").arg(__VERSION__));
+#else
+ libinfo.append(QString("Compiler: Unknown<br>").arg(__VERSION__));
+#endif
+
+ libinfo.append(QString("<a href=\"http://www.libsdl.org/\">SDL</a> version: %1.%2.%3<br>")
+ .arg(SDL_MAJOR_VERSION)
+ .arg(SDL_MINOR_VERSION)
+ .arg(SDL_PATCHLEVEL));
+
+ libinfo.append(QString("<a href=\"http://qt-project.org/\">Qt</a> version: %1<br>").arg(QT_VERSION_STR));
+
+#ifdef VIDEOREC
+ libinfo.append(QString("<a href=\"http://libav.org\">Libav</a> version: %1.%2.%3<br>")
+ .arg(LIBAVUTIL_VERSION_MAJOR)
+ .arg(LIBAVUTIL_VERSION_MINOR)
+ .arg(LIBAVUTIL_VERSION_MICRO));
+#endif
+
+ libinfo.append(QString("<a href=\"http://icculus.org/physfs/\">PhysFS</a> version: %1.%2.%3<br>")
+ .arg(PHYSFS_VER_MAJOR)
+ .arg(PHYSFS_VER_MINOR)
+ .arg(PHYSFS_VER_PATCH));
+
+ QLabel * lblLibInfo = new QLabel();
+ lblLibInfo->setText(libinfo);
+ lblLibInfo->setWordWrap(true);
+ lblLibInfo->setMaximumWidth(280);
+ leftLayout->addWidget(lblLibInfo, 0, Qt::AlignTop | Qt::AlignHCenter);
+ leftLayout->addStretch(1);
+
setAcceptDrops(true);
}