]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/mediainfo.cpp
qt4: use const for QString when possible.
[vlc] / modules / gui / qt4 / dialogs / mediainfo.cpp
index 6994a03c825eb2ee0eda95b30ebabeae9a3a9ddc..41a5ef34050cd8250814f045e798cbebd65e2664 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * mediainfo.cpp : Information about an item
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
  * $Id$
  *
  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
@@ -21,6 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  ******************************************************************************/
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -86,22 +87,36 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
     BUTTONACT( saveMetaButton, saveMeta() );
 
     /* Let the MetaData Panel update the URI */
-    CONNECT( MP, uriSet( QString ), uriLine, setText( QString ) );
+    CONNECT( MP, uriSet( const QString& ), uriLine, setText( const QString& ) );
     CONNECT( MP, editing(), saveMetaButton, show() );
 
+    /* Display the buttonBar according to the Tab selected */
     CONNECT( infoTabW, currentChanged( int ), this, updateButtons( int ) );
 
     /* If using the General Mode */
     if( isMainInputInfo )
     {
         msg_Dbg( p_intf, "Using a general info windows" );
+        /**
+         * Connects on the various signals of input_Manager
+         * For the currently playing element
+         **/
+        CONNECT( THEMIM->getIM(), infoChanged( input_item_t* ),
+                 IP, update( input_item_t* ) );
+        CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ),
+                 MP, update( input_item_t* ) );
+        CONNECT( THEMIM->getIM(), metaChanged( input_item_t* ),
+                 EMP, update( input_item_t* ) );
+        CONNECT( THEMIM->getIM(), statisticsUpdated( input_item_t* ),
+                 ISP, update( input_item_t* ) );
+
         if( THEMIM->getInput() )
             p_item = input_GetItem( THEMIM->getInput() );
     }
     else
         msg_Dbg( p_intf, "Using an item specific info windows" );
 
-    /* Call update at start, so info is shown for a running input */
+    /* Call update at start, so info is filled up at begginning */
     if( p_item )
         updateAllTabs( p_item );
 
@@ -131,8 +146,7 @@ void MediaInfoDialog::updateAllTabs( input_item_t *p_item )
     MP->update( p_item );
     EMP->update( p_item );
 
-    if( isMainInputInfo )
-        ISP->update( p_item );
+    if( isMainInputInfo ) ISP->update( p_item );
 }
 
 void MediaInfoDialog::clearAllTabs()
@@ -140,6 +154,7 @@ void MediaInfoDialog::clearAllTabs()
     IP->clear();
     MP->clear();
     EMP->clear();
+
     if( isMainInputInfo ) ISP->clear();
 }