From 07ec18822abde6d998f075783f8275209b3259f0 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 31 Oct 2016 15:17:25 +0000 Subject: [PATCH] Add feautes list to about dialog --- app/AboutDialog.cpp | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/app/AboutDialog.cpp b/app/AboutDialog.cpp index e07a6d3..cd67614 100644 --- a/app/AboutDialog.cpp +++ b/app/AboutDialog.cpp @@ -23,6 +23,8 @@ * Based on the work of Glad Deschrijver in KTikZ project */ +#include + #include "AboutDialog.h" #include #include @@ -30,24 +32,46 @@ #include #include +#define TAB_FROM_SPACES "   " + AboutDialog::AboutDialog( QWidget *parent ) : QDialog( parent ) { - QPixmap logo = QPixmap( ":/images/playuver-backgroud-logo.png" ).scaled( QSize( 350, 350 ), Qt::KeepAspectRatio ); + QPixmap logo = QPixmap( ":/images/playuver-backgroud-logo.png" ).scaled( QSize( 500, 350 ), Qt::KeepAspectRatio ); QLabel *pixmapLabel = new QLabel; pixmapLabel->setPixmap( logo ); - QLabel *label = new QLabel( QString( "

%1 Version %2

%3

%4

" ) + QLabel *label = new QLabel( QString( "

%1 Version %2

%3

" ) .arg( QApplication::applicationName() ) .arg( QApplication::applicationVersion() ) - .arg( tr( "Enhanced open-source Qt-based raw video player" ) ) - .arg( tr( "Copyright © 2014–2015 Luis Lucas and Joao Carreira" ) ) ); + .arg( tr( "Enhanced open-source Qt-based raw video player" ) ) ); label->setWordWrap( true ); + + QString featuresList = QStringLiteral( "

Features:

    " ); + +#ifdef USE_QTDBUS + featuresList.append( QStringLiteral( "
  • Support for Qt DBus messages" ) ); +#endif +#ifdef USE_FFMPEG + featuresList.append( QStringLiteral( "
  • Support for FFmpeg" ) ); +#endif +#ifdef USE_OPENCV + featuresList.append( QStringLiteral( "
  • Support for OpenCV" ) ); +#endif + featuresList.append( QStringLiteral( "

" ) ); + + QLabel *labelFeatures = new QLabel( featuresList ); + + + QLabel *labelCopyright = new QLabel( QStringLiteral( "Copyright © 2014–2015 Luis Lucas and Joao Carreira" ) ); + QWidget *topWidget = new QWidget; QVBoxLayout *topLayout = new QVBoxLayout; topLayout->addWidget( pixmapLabel ); topLayout->addWidget( label ); + topLayout->addWidget( labelFeatures ); + topLayout->addWidget( labelCopyright ); topWidget->setLayout( topLayout ); // QTextEdit *textEdit = new QTextEdit(tr("

This program is free "