[vlmc-devel] commit: About.cpp: Applied HACKINGS. Used project strings from config.h. ( Rohit Yadav )

git at videolan.org git at videolan.org
Wed Sep 22 21:39:10 CEST 2010


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Thu Sep 23 01:23:24 2010 +0530| [8e6f3507ce2140e4277efb79af3d07a3d5989a0f] | committer: Rohit Yadav 

About.cpp: Applied HACKINGS. Used project strings from config.h.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=8e6f3507ce2140e4277efb79af3d07a3d5989a0f
---

 src/Gui/About.cpp |   44 +++++++++++++++++++++++++++++---------------
 src/Gui/About.h   |   10 ++++++----
 2 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/src/Gui/About.cpp b/src/Gui/About.cpp
index 38f490a..b6c65bf 100644
--- a/src/Gui/About.cpp
+++ b/src/Gui/About.cpp
@@ -4,6 +4,7 @@
  * Copyright (C) 2008-2010 VideoLAN
  *
  * Authors: Christophe Courtaut <christophe.courtaut at gmail.com>
+ *          Rohit Yadav <rohityadav89 at gmail.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -20,27 +21,38 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#include "About.h"
+#include "config.h"
+
 #include <QApplication>
 #include <QFile>
-#include <QString>
 #include <QPlainTextEdit>
+#include <QString>
 #include <QtGlobal>
-#include "About.h"
 
-About::About( QWidget *parent ) :
-    QDialog( parent )
+About::About( QWidget *parent ) : QDialog( parent )
 {
     m_ui.setupUi( this );
     m_ui.tabWidget->setCurrentIndex( 0 );
+
     setText( ":/text/AUTHORS", m_ui.plainTextEditAuthors );
+    setText( ":/text/THANKS", m_ui.plainTextEditThanks );
     setText( ":/text/TRANSLATORS", m_ui.plainTextEditTranslators );
     setText( ":/text/COPYING", m_ui.plainTextEditLicense );
-    m_ui.labelVersion->setText(
-            m_ui.labelVersion->text().arg( qApp->applicationVersion() )
-            );
-    m_ui.labelQtVersion->setText(
-            m_ui.labelQtVersion->text().arg( qVersion(), QT_VERSION_STR )
-            );
+
+    m_ui.labelAbout->setText( tr( "VLMC (VideoLAN Movie Creator) is a "
+        "cross-platform, non-linear video editing software based on the VLC "
+        "Media Player.\n" ) );
+
+    m_ui.labelTitle->setText( 
+        m_ui.labelTitle->text().arg( PROJECT_VERSION, CODENAME ) );
+
+    m_ui.labelBuild->setText(
+        m_ui.labelBuild->text().arg( HOSTNAME, SYSNAME, qVersion(), QT_VERSION_STR ) );
+
+    m_ui.labelCopyright->setText( 
+        m_ui.labelCopyright->text().arg( PROJECT_COPYRIGHT, PROJECT_CONTACT, ORG_WEBSITE ) );
+
     connect( qApp, SIGNAL( aboutToQuit() ), this, SLOT( deleteLater() ) );
 }
 
@@ -49,18 +61,20 @@ void About::changeEvent( QEvent *e )
     QDialog::changeEvent( e );
     switch ( e->type() )
     {
-    case QEvent::LanguageChange:
-        m_ui.retranslateUi( this );
-        break;
-    default:
-        break;
+        case QEvent::LanguageChange:
+            m_ui.retranslateUi( this );
+            break;
+        default:
+            break;
     }
 }
 
 void About::setText( const QString& filename, QPlainTextEdit* widget )
 {
     QFile file( filename );
+
     if ( file.open( QIODevice::ReadOnly | QIODevice::Text ) )
         widget->insertPlainText( QString::fromUtf8( file.readAll() ) );
+
     widget->moveCursor( QTextCursor::Start );
 }
diff --git a/src/Gui/About.h b/src/Gui/About.h
index 868f709..d73943f 100644
--- a/src/Gui/About.h
+++ b/src/Gui/About.h
@@ -4,6 +4,7 @@
  * Copyright (C) 2008-2010 VideoLAN
  *
  * Authors: Christophe Courtaut <christophe.courtaut at gmail.com>
+ *          Rohit Yadav <rohityadav89 at gmail.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -23,17 +24,20 @@
 #ifndef ABOUT_H
 #define ABOUT_H
 
-#include <QDialog>
-
 #include "QSingleton.hpp"
 #include "ui_About.h"
 
+#include <QDialog>
+
 class QPlainTextEdit;
 
 class About : public QDialog, public QSingleton<About>
 {
     Q_OBJECT
     Q_DISABLE_COPY( About )
+
+    friend class    QSingleton<About>;
+
 protected:
     virtual void    changeEvent( QEvent *e );
 
@@ -41,8 +45,6 @@ private:
     explicit        About( QWidget *parent = 0 );
     void            setText( const QString& filename, QPlainTextEdit* widget );
     Ui::AboutVLMC   m_ui;
-
-    friend class    QSingleton<About>;
 };
 
 #endif // ABOUT_H



More information about the Vlmc-devel mailing list