videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackcontrolscontroller.cpp
changeset 35 3738fe97f027
parent 34 bbb98528c666
child 36 8aed59de29f9
--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackcontrolscontroller.cpp	Thu Apr 01 23:22:15 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackcontrolscontroller.cpp	Thu Apr 01 23:32:44 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: da1mmcf#27 %
+// Version : %version: da1mmcf#29 %
 
 
 
@@ -23,7 +23,6 @@
 #include <coecntrl.h>
 #include <bautils.h>
 #include <barsread.h>
-#include <StringLoader.h>
 #include <f32file.h>
 
 #include <QTimer>
@@ -36,11 +35,11 @@
 #include <hbratingslider.h>
 #include <hbiconanimator.h>
 #include <hbtransparentwindow.h>
+#include <hbiconanimationmanager.h>
 
 #include "mpxvideoviewwrapper.h"
 #include "hbvideobaseplaybackview.h"
-#include "mpxvideoplaybackbuttonbar.h"
-#include "mpxvideoplaybackprogressbar.h"
+#include "mpxvideoplaybackcontrolbar.h"
 #include "mpxvideoplaybackcontrolpolicy.h"
 #include "mpxvideoplaybackdocumentloader.h"
 #include "mpxvideoplaybackviewfiledetails.h"
@@ -186,6 +185,8 @@
 void QMPXVideoPlaybackControlsController::addFileDetails(
     QMPXVideoPlaybackViewFileDetails* details )
 {
+    MPX_ENTER_EXIT(_L("QMPXVideoPlaybackControlsController::addFileDetails"));
+
     //
     // If it is not local, hide the star rating
     //
@@ -481,10 +482,11 @@
             //
             // Buffering animation icon
             //
+            HbIconAnimationManager* manager = HbIconAnimationManager::global();
+            manager->addDefinitionFile(":/hbvideoplaybackview/animation.axml");
+			
             QGraphicsWidget *widget = mLoader->findWidget( QString( "bufferingIcon" ) );
             HbLabel *bufferingAnim = qobject_cast<HbLabel*>( widget );
-            HbIconItem *iconItem = new HbIconItem( bufferingAnim->icon() );
-            iconItem->animator().startAnimation();
 
             control = new QMPXVideoPlaybackFullScreenControl( this,
                                                               controlIndex,
@@ -507,43 +509,24 @@
 
             break;
         }
-        case EMPXButtonBar:
+        case EMPXControlBar:
         {
             //
             // Button bar
             //
-            QGraphicsWidget *widget = mLoader->findWidget( QString( "buttonBarLayout" ) );
-            QMPXVideoPlaybackButtonBar *buttonBar = 
-                qobject_cast<QMPXVideoPlaybackButtonBar*>( widget );
-            buttonBar->initialize();
+            QGraphicsWidget *widget = mLoader->findWidget( QString( "controlBarLayout" ) );
+            QMPXVideoPlaybackControlBar *controlBar = 
+                qobject_cast<QMPXVideoPlaybackControlBar*>( widget );
+            controlBar->initialize();
 
             control = new QMPXVideoPlaybackFullScreenControl( this,
                                                               controlIndex,
-                                                              buttonBar,
+                                                              controlBar,
                                                               properties );
             mControls.append( control );
 
             break;
         }
-        case EMPXProgressBar:
-        {
-            //
-            // Progress bar
-            //
-            QGraphicsWidget *widget = mLoader->findWidget( QString( "progressBarLayout" ) );
-            QMPXVideoPlaybackProgressBar *progressBar = 
-                qobject_cast<QMPXVideoPlaybackProgressBar*>( widget );
-            progressBar->initialize();
-
-            control = new QMPXVideoPlaybackFullScreenControl( this,
-                                                              controlIndex,
-                                                              progressBar,
-                                                              properties );
-
-            mControls.append( control );
-
-            break;
-        }
         case EMPXFileDetailsWidget:
         {
             QGraphicsWidget *widget = mLoader->findWidget( QString( "fileDetailsLayout" ) );
@@ -703,7 +686,7 @@
 
     for ( int i = 0 ; i < mControls.count() ; i++ )
     {
-        if ( mControls[i]->controlIndex() == EMPXButtonBar )
+        if ( mControls[i]->controlIndex() == EMPXControlBar )
         {
             if ( mControls[i]->isVisible() )
             {