diff -r 46a9fde631f4 -r 75db7bb8dce8 QTfrontend/ui/widget/about.cpp --- 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 #include #include +#include #include #include #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 @@ "" "

Hedgewars

" "

" + QLabel::tr("Version") + " " + *cVersionString + "

" - "

http://www.hedgewars.org/


" + + "

http://www.hedgewars.org/

" + QLabel::tr("This program is distributed under the GNU General Public License v2") + "
" ); @@ -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 = ""; + +#ifdef __GNUC__ + libinfo.append(QString("Compiler: GCC %1
").arg(__VERSION__)); +#else + libinfo.append(QString("Compiler: Unknown
").arg(__VERSION__)); +#endif + + libinfo.append(QString("SDL version: %1.%2.%3
") + .arg(SDL_MAJOR_VERSION) + .arg(SDL_MINOR_VERSION) + .arg(SDL_PATCHLEVEL)); + + libinfo.append(QString("Qt version: %1
").arg(QT_VERSION_STR)); + +#ifdef VIDEOREC + libinfo.append(QString("Libav version: %1.%2.%3
") + .arg(LIBAVUTIL_VERSION_MAJOR) + .arg(LIBAVUTIL_VERSION_MINOR) + .arg(LIBAVUTIL_VERSION_MICRO)); +#endif + + libinfo.append(QString("PhysFS version: %1.%2.%3
") + .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); }