videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackbuttonbar.cpp
changeset 20 b9e04db066d4
parent 17 69946d1824c4
child 22 9b6761e5bd30
child 24 7d93ee07fb27
equal deleted inserted replaced
17:69946d1824c4 20:b9e04db066d4
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implementation of QMPXVideoPlaybackButtonBar
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: da1mmcf#25 %
       
    19 
       
    20 
       
    21 
       
    22 #include <hbpushbutton.h>
       
    23 
       
    24 #include "mpxvideo_debug.h"
       
    25 #include "mpxvideoplaybackbuttonbar.h"
       
    26 #include "mpxvideoplaybackviewfiledetails.h"
       
    27 #include "mpxcommonvideoplaybackview.hrh"
       
    28 #include "mpxvideoplaybackdocumentloader.h"
       
    29 #include "mpxvideoplaybackcontrolscontroller.h"
       
    30 
       
    31 
       
    32 // -------------------------------------------------------------------------------------------------
       
    33 // QMPXVideoPlaybackButtonBar::QMPXVideoPlaybackButtonBar()
       
    34 // -------------------------------------------------------------------------------------------------
       
    35 //
       
    36 QMPXVideoPlaybackButtonBar::QMPXVideoPlaybackButtonBar( 
       
    37         QMPXVideoPlaybackControlsController* controller )
       
    38     : mController( controller )
       
    39     , mSeekingState( EMPXNotSeeking )
       
    40     , mInitialized( false )
       
    41     , mPosition( 0 )
       
    42     , mDuration( 0 )
       
    43 {
       
    44     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::QMPXVideoPlaybackButtonBar"));
       
    45 }
       
    46 
       
    47 // -------------------------------------------------------------------------------------------------
       
    48 // QMPXVideoPlaybackButtonBar::~QMPXVideoPlaybackButtonBar()
       
    49 // -------------------------------------------------------------------------------------------------
       
    50 //
       
    51 QMPXVideoPlaybackButtonBar::~QMPXVideoPlaybackButtonBar()
       
    52 {
       
    53     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::~QMPXVideoPlaybackButtonBar()"));
       
    54 }
       
    55 
       
    56 // -------------------------------------------------------------------------------------------------
       
    57 // QMPXVideoPlaybackButtonBar::initialize()
       
    58 // -------------------------------------------------------------------------------------------------
       
    59 //
       
    60 void QMPXVideoPlaybackButtonBar::initialize()
       
    61 {
       
    62     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::initialize()"));
       
    63 
       
    64     QMPXVideoPlaybackDocumentLoader *loader = mController->layoutLoader();
       
    65 
       
    66     //
       
    67     // Don't need to initialize buttons once it gets initialized
       
    68     //
       
    69     if ( loader && ! mInitialized )
       
    70     {
       
    71         mInitialized = true;
       
    72 
       
    73         //
       
    74         // RW button
       
    75         //
       
    76         QGraphicsWidget *widget = loader->findWidget( QString( "rwButton" ) );
       
    77         HbPushButton *rwButton = qobject_cast<HbPushButton*>( widget );
       
    78         connect( rwButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
    79         connect( rwButton, SIGNAL( longPress( QPointF ) ), this, SLOT( rwPressing() ) );
       
    80         connect( rwButton, SIGNAL( released() ), this, SLOT( rwReleased() ) ); 
       
    81 
       
    82         mButtons.append( rwButton );
       
    83 
       
    84         //
       
    85         // Play button
       
    86         //
       
    87         widget = loader->findWidget( QString( "playButton" ) );
       
    88         HbPushButton *playButton = qobject_cast<HbPushButton*>( widget );
       
    89         connect( playButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
    90         connect( playButton, SIGNAL( released() ), this, SLOT( play() ) );
       
    91 
       
    92         mButtons.append( playButton );
       
    93 
       
    94         //
       
    95         // Pause button
       
    96         //
       
    97         widget = loader->findWidget( QString( "pauseButton" ) );
       
    98         HbPushButton *pauseButton = qobject_cast<HbPushButton*>( widget );
       
    99         connect( pauseButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   100         connect( pauseButton, SIGNAL( released() ), this, SLOT( pause() ) );
       
   101 
       
   102         mButtons.append( pauseButton );
       
   103 
       
   104         //
       
   105         // FW button
       
   106         //
       
   107         widget = loader->findWidget( QString( "ffButton" ) );
       
   108         HbPushButton *ffButton = qobject_cast<HbPushButton*>( widget );
       
   109         connect( ffButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   110         connect( ffButton, SIGNAL( longPress( QPointF ) ), this, SLOT( ffPressing() ) );
       
   111         connect( ffButton, SIGNAL( released() ), this, SLOT( ffReleased() ) );
       
   112         mButtons.append( ffButton );
       
   113 
       
   114         //
       
   115         // Aspect ratio button
       
   116         //
       
   117         widget = loader->findWidget( QString( "naturalButton" ) );
       
   118         HbPushButton *naturalButton = qobject_cast<HbPushButton*>( widget );
       
   119         connect( naturalButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   120         connect( naturalButton, SIGNAL( released() ), this, SLOT( changeAspectRatio() ) ); 
       
   121         mButtons.append( naturalButton );
       
   122 
       
   123         widget = loader->findWidget( QString( "stretchButton" ) );
       
   124         HbPushButton *stretchButton = qobject_cast<HbPushButton*>( widget );
       
   125         connect( stretchButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   126         connect( stretchButton, SIGNAL( released() ), this, SLOT( changeAspectRatio() ) );
       
   127         mButtons.append( stretchButton );
       
   128 
       
   129         widget = loader->findWidget( QString( "zoomButton" ) );
       
   130         HbPushButton *zoomButton = qobject_cast<HbPushButton*>( widget );
       
   131         connect( zoomButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   132         connect( zoomButton, SIGNAL( released() ), this, SLOT( changeAspectRatio() ) );
       
   133         mButtons.append( zoomButton );
       
   134 
       
   135         //
       
   136         // Details button
       
   137         //
       
   138         widget = loader->findWidget( QString( "detailsButton" ) );
       
   139         HbPushButton *detailsButton = qobject_cast<HbPushButton*>( widget );
       
   140         connect( detailsButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   141         connect( detailsButton, SIGNAL( released() ), this, SLOT( openDetailsView() ) );
       
   142         mButtons.append( detailsButton );
       
   143 
       
   144         //
       
   145         // Attach button 
       
   146         //
       
   147         widget = loader->findWidget( QString( "attachButton" ) );        
       
   148         HbPushButton *attachButton = qobject_cast<HbPushButton*>( widget );
       
   149         connect( attachButton, SIGNAL( pressed() ), this, SLOT( handleButtonPressed() ) );
       
   150         connect( attachButton, SIGNAL( released() ), mController, SLOT( attachVideo() ) ); 
       
   151         mButtons.append( attachButton );
       
   152             
       
   153         for ( int i = 0 ; i < EMPXButtonCount ; i++ )
       
   154         {
       
   155             mButtons[i]->setFlag( QGraphicsItem::ItemIsFocusable, false );
       
   156         }
       
   157 
       
   158         mDuration = (qreal)mController->fileDetails()->mDuration / (qreal)KPbMilliMultiplier;
       
   159 
       
   160         //
       
   161 		// obtain layout for aspect ratio which contains all 3 aspect ratio buttons:
       
   162         //      natural, stretch, zoom
       
   163 		//
       
   164         widget = loader->findWidget( QString( "aspectRatioButtons" ) );
       
   165         
       
   166         if ( mController->isAttachOperation() )
       
   167         {
       
   168             //
       
   169             // disable 3 aspect ratio buttons
       
   170             //
       
   171             widget->setVisible( false );
       
   172                 
       
   173             //
       
   174             // enable "attach" button
       
   175             //
       
   176             mButtons[EMPXButtonAttach]->setVisible( true );        
       
   177        }
       
   178         else
       
   179         {
       
   180             //
       
   181             // enable 3 aspect ratio buttons
       
   182             //
       
   183             widget->setVisible( true );
       
   184         
       
   185             //
       
   186             // disable "attach" button
       
   187             //
       
   188             mButtons[EMPXButtonAttach]->setVisible( false );        
       
   189         }
       
   190     }
       
   191 }
       
   192 
       
   193 // -------------------------------------------------------------------------------------------------
       
   194 // QMPXVideoPlaybackButtonBar::play()
       
   195 // -------------------------------------------------------------------------------------------------
       
   196 //
       
   197 void QMPXVideoPlaybackButtonBar::play()
       
   198 {
       
   199     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::play()"));
       
   200 
       
   201     mController->resetDisappearingTimers( EMPXTimerReset );
       
   202     mController->handleCommand( EMPXPbvCmdPlay );
       
   203 }
       
   204 
       
   205 // -------------------------------------------------------------------------------------------------
       
   206 // QMPXVideoPlaybackButtonBar::ffPressing()
       
   207 // -------------------------------------------------------------------------------------------------
       
   208 //
       
   209 void QMPXVideoPlaybackButtonBar::ffPressing()
       
   210 {
       
   211     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::ffPressing()"),
       
   212                    _L("mSeekingState = %d"), mSeekingState );
       
   213 
       
   214     if ( mSeekingState == EMPXNotSeeking )
       
   215     {
       
   216         mSeekingState = EMPXFastForwarding;
       
   217         mButtons[EMPXButtonFF]->setSelected( true );
       
   218 
       
   219         mController->handleCommand( EMPXPbvCmdSeekForward );        
       
   220     }
       
   221 }
       
   222 
       
   223 // -------------------------------------------------------------------------------------------------
       
   224 // QMPXVideoPlaybackButtonBar::rwPressing()
       
   225 // -------------------------------------------------------------------------------------------------
       
   226 //
       
   227 void QMPXVideoPlaybackButtonBar::rwPressing()
       
   228 {
       
   229     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::rwPressing()"),
       
   230                    _L("mSeekingState = %d"), mSeekingState );
       
   231 
       
   232 
       
   233     if ( mSeekingState == EMPXNotSeeking )
       
   234     {
       
   235         mSeekingState = EMPXRewinding;
       
   236         mButtons[EMPXButtonRW]->setSelected( true );
       
   237 
       
   238         mController->handleCommand( EMPXPbvCmdSeekBackward );
       
   239     }
       
   240 }
       
   241 
       
   242 // -------------------------------------------------------------------------------------------------
       
   243 // QMPXVideoPlaybackButtonBar::ffReleased()
       
   244 // -------------------------------------------------------------------------------------------------
       
   245 //
       
   246 void QMPXVideoPlaybackButtonBar::ffReleased()
       
   247 {
       
   248     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::ffReleased()"),
       
   249                    _L("mSeekingState = %d"), mSeekingState );
       
   250 
       
   251     if ( mSeekingState == EMPXFastForwarding )
       
   252     {
       
   253         mSeekingState = EMPXNotSeeking;
       
   254         mController->handleCommand( EMPXPbvCmdEndSeek );        
       
   255         mButtons[EMPXButtonFF]->setSelected( false );            
       
   256     }
       
   257     else
       
   258     {
       
   259         int temp = mPosition + KMPXFastForward;
       
   260         MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::ffReleased() temp position = %d"), temp);
       
   261 
       
   262         //
       
   263         // If it has the playing time which is less than KMPXFastForward, ignore
       
   264         //
       
   265         if ( temp < mDuration )
       
   266         {
       
   267             mController->handleCommand( EMPXPbvCmdSetPosition, temp );
       
   268         }
       
   269     }
       
   270 
       
   271     mController->resetDisappearingTimers( EMPXTimerReset );
       
   272 }
       
   273 
       
   274 // -------------------------------------------------------------------------------------------------
       
   275 // QMPXVideoPlaybackButtonBar::rwReleased()
       
   276 // -------------------------------------------------------------------------------------------------
       
   277 //
       
   278 void QMPXVideoPlaybackButtonBar::rwReleased()
       
   279 {
       
   280     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::rwReleased()"),
       
   281                    _L("mSeekingState = %d"), mSeekingState );
       
   282 
       
   283     if ( mSeekingState == EMPXRewinding )
       
   284     {
       
   285         mSeekingState = EMPXNotSeeking;
       
   286         mController->handleCommand( EMPXPbvCmdEndSeek );        
       
   287         mButtons[EMPXButtonRW]->setSelected( false );        
       
   288     }
       
   289     else
       
   290     {
       
   291         int temp = mPosition + KMPXRewind;
       
   292         MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::rwReleased() temp position = %d"), temp);
       
   293 
       
   294         //
       
   295         // If it played less than KMPXRewind, jump to 0
       
   296         //
       
   297         if ( temp < 0 )
       
   298         {
       
   299             temp = 0;
       
   300         }
       
   301 
       
   302         mController->handleCommand( EMPXPbvCmdSetPosition, temp );
       
   303     }
       
   304 
       
   305     mController->resetDisappearingTimers( EMPXTimerReset );
       
   306 }
       
   307 
       
   308 // -------------------------------------------------------------------------------------------------
       
   309 // QMPXVideoPlaybackButtonBar::pause()
       
   310 // -------------------------------------------------------------------------------------------------
       
   311 //
       
   312 void QMPXVideoPlaybackButtonBar::pause()
       
   313 {
       
   314     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::pause()"));
       
   315 
       
   316     mController->resetDisappearingTimers( EMPXTimerReset );
       
   317     mController->handleCommand( EMPXPbvCmdPause );
       
   318 }
       
   319 
       
   320 // -------------------------------------------------------------------------------------------------
       
   321 // QMPXVideoPlaybackButtonBar::changeAspectRatio()
       
   322 // -------------------------------------------------------------------------------------------------
       
   323 //
       
   324 void QMPXVideoPlaybackButtonBar::changeAspectRatio()
       
   325 {
       
   326     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::changeAspectRatio()"));
       
   327 
       
   328     if ( ! mController->isAttachOperation() )
       
   329     {    
       
   330         mController->resetDisappearingTimers( EMPXTimerReset );
       
   331     
       
   332         TMPXVideoPlaybackViewCommandIds cmd = EMPXPbvCmdNaturalAspectRatio;
       
   333     
       
   334         if ( mButtons[EMPXButtonStretch]->isVisible() )
       
   335         {
       
   336             cmd = EMPXPbvCmdStretchAspectRatio;
       
   337         }
       
   338         else if ( mButtons[EMPXButtonZoom]->isVisible() )
       
   339         {
       
   340             cmd = EMPXPbvCmdZoomAspectRatio;
       
   341         }
       
   342     
       
   343         mController->handleCommand( cmd );
       
   344     }
       
   345 }
       
   346 
       
   347 // -------------------------------------------------------------------------------------------------
       
   348 // QMPXVideoPlaybackButtonBar::updateState()
       
   349 // -------------------------------------------------------------------------------------------------
       
   350 //
       
   351 void QMPXVideoPlaybackButtonBar::updateState( TMPXPlaybackState state )
       
   352 {
       
   353     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::updateState() state = %d"), state );
       
   354 
       
   355     switch ( state )
       
   356     {
       
   357         case EPbStatePlaying:
       
   358         {
       
   359             if ( ! isEnabled() )
       
   360             {
       
   361                 setEnabled( true );                
       
   362             }
       
   363 
       
   364             mButtons[EMPXButtonPlay]->setVisible( false );
       
   365             mButtons[EMPXButtonPause]->setVisible( true );
       
   366             break;
       
   367         }
       
   368         case EPbStatePaused:
       
   369         {
       
   370             if ( ! isEnabled() )
       
   371             {
       
   372                 setEnabled( true );
       
   373             }
       
   374 
       
   375             mButtons[EMPXButtonPause]->setVisible( false );
       
   376             mButtons[EMPXButtonPlay]->setVisible( true );
       
   377             break;
       
   378         }
       
   379         case EPbStateNotInitialised:
       
   380         case EPbStateInitialising:
       
   381         case EPbStateBuffering:
       
   382         {
       
   383             if ( isEnabled() )
       
   384             {
       
   385                 setEnabled( false );
       
   386             }
       
   387 
       
   388             break;
       
   389         }
       
   390     }
       
   391 }
       
   392 
       
   393 // -------------------------------------------------------------------------------------------------
       
   394 // QMPXVideoPlaybackButtonBar::aspectRatioChanged()
       
   395 // -------------------------------------------------------------------------------------------------
       
   396 //
       
   397 void QMPXVideoPlaybackButtonBar::aspectRatioChanged( int aspectRatio )
       
   398 {
       
   399     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::aspectRatioChanged() aspectRatio = %d"), aspectRatio );
       
   400 
       
   401     if ( ! mController->isAttachOperation() )
       
   402     {
       
   403         switch( aspectRatio )
       
   404         {
       
   405             case EMMFNatural:
       
   406             {
       
   407                 mButtons[EMPXButtonNatural]->setVisible( false );
       
   408                 mButtons[EMPXButtonStretch]->setVisible( true );
       
   409                 mButtons[EMPXButtonZoom]->setVisible( false );
       
   410                 break;
       
   411             }
       
   412             case EMMFStretch:
       
   413             {
       
   414                 mButtons[EMPXButtonNatural]->setVisible( false );
       
   415                 mButtons[EMPXButtonStretch]->setVisible( false );
       
   416                 mButtons[EMPXButtonZoom]->setVisible( true );
       
   417                 break;
       
   418             }
       
   419             default:
       
   420             {
       
   421                 mButtons[EMPXButtonNatural]->setVisible( true );
       
   422                 mButtons[EMPXButtonStretch]->setVisible( false );
       
   423                 mButtons[EMPXButtonZoom]->setVisible( false );
       
   424                 break;
       
   425             }
       
   426         }    
       
   427     }
       
   428 }
       
   429 
       
   430 // -------------------------------------------------------------------------------------------------
       
   431 // QMPXVideoPlaybackButtonBar::handleButtonPressed()
       
   432 // -------------------------------------------------------------------------------------------------
       
   433 //
       
   434 void QMPXVideoPlaybackButtonBar::handleButtonPressed()
       
   435 {
       
   436     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::handleButtonPressed()"));
       
   437 
       
   438     mController->resetDisappearingTimers( EMPXTimerCancel );
       
   439 }
       
   440 
       
   441 // -------------------------------------------------------------------------------------------------
       
   442 // QMPXVideoPlaybackButtonBar::updateWithFileDetails()
       
   443 // -------------------------------------------------------------------------------------------------
       
   444 //
       
   445 void QMPXVideoPlaybackButtonBar::updateWithFileDetails(
       
   446         QMPXVideoPlaybackViewFileDetails* details )
       
   447 {
       
   448     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::updateWithFileDetails()"));
       
   449 
       
   450     if ( ! mController->isAttachOperation() )
       
   451     {    
       
   452         if ( ! details->mVideoEnabled ||
       
   453                details->mVideoHeight <= 0 ||
       
   454                details->mVideoWidth <= 0 ||
       
   455                details->mTvOutConnected )
       
   456         {
       
   457             mButtons[EMPXButtonNatural]->setEnabled( false );
       
   458             mButtons[EMPXButtonStretch]->setEnabled( false );
       
   459             mButtons[EMPXButtonZoom]->setEnabled( false );
       
   460         }
       
   461         else
       
   462         {
       
   463             mButtons[EMPXButtonNatural]->setEnabled( true );
       
   464             mButtons[EMPXButtonStretch]->setEnabled( true );
       
   465             mButtons[EMPXButtonZoom]->setEnabled( true );
       
   466         }
       
   467     }
       
   468 
       
   469     //
       
   470     // for audio-only clips and tv-out, default view is audionOnlyView
       
   471     // therefore, dim details button
       
   472     //
       
   473     if ( ! details->mVideoEnabled || details->mTvOutConnected )
       
   474     {
       
   475         mButtons[EMPXButtonDetails]->setEnabled( false );
       
   476     }
       
   477     else
       
   478     {
       
   479         mButtons[EMPXButtonDetails]->setEnabled( true );
       
   480     }
       
   481 
       
   482     if ( ! details->mSeekable || ( details->mTvOutConnected && ! details->mTvOutPlayAllowed ) )
       
   483     {
       
   484         mButtons[EMPXButtonRW]->setEnabled( false );
       
   485         mButtons[EMPXButtonFF]->setEnabled( false );
       
   486     }
       
   487     else
       
   488     {
       
   489         mButtons[EMPXButtonRW]->setEnabled( true );
       
   490         mButtons[EMPXButtonFF]->setEnabled( true );
       
   491     }
       
   492 
       
   493     if ( ! details->mPausableStream || ( details->mTvOutConnected && ! details->mTvOutPlayAllowed ) )
       
   494     {
       
   495         mButtons[EMPXButtonPause]->setEnabled( false );
       
   496     }
       
   497     else
       
   498     {
       
   499         mButtons[EMPXButtonPause]->setEnabled( true );
       
   500     }
       
   501 
       
   502     if ( details->mTvOutConnected && ! details->mTvOutPlayAllowed )
       
   503     {
       
   504         mButtons[EMPXButtonPlay]->setEnabled( false );
       
   505     }
       
   506     else
       
   507     {
       
   508         mButtons[EMPXButtonPlay]->setEnabled( true );
       
   509     }
       
   510 
       
   511     //
       
   512 	// If it is audio only view, show the background of button
       
   513 	//
       
   514     bool backgrondVisible = false;
       
   515 
       
   516     if ( mController->viewMode() == EAudioOnlyView )
       
   517     {
       
   518         backgrondVisible = true;
       
   519     }
       
   520 
       
   521     for ( int i = 0 ; i < EMPXButtonCount ; i++ )
       
   522     {
       
   523         QGraphicsItem* widget = mButtons[i]->primitive( HbStyle::P_PushButton_background );
       
   524         widget->setVisible( backgrondVisible );
       
   525     }
       
   526 }
       
   527 
       
   528 // -------------------------------------------------------------------------------------------------
       
   529 // QMPXVideoPlaybackButtonBar::openDetailsView()
       
   530 // -------------------------------------------------------------------------------------------------
       
   531 //
       
   532 void QMPXVideoPlaybackButtonBar::openDetailsView()
       
   533 {
       
   534     MPX_ENTER_EXIT(_L("QMPXVideoPlaybackButtonBar::openDetailsView()"));
       
   535 
       
   536     TPlaybackViewMode viewMode = mController->viewMode();
       
   537 
       
   538     if ( viewMode == EFullScreenView )
       
   539     {
       
   540         mController->changeViewMode( EDetailsView );
       
   541     }
       
   542 }
       
   543 
       
   544 // -------------------------------------------------------------------------------------------------
       
   545 // QMPXVideoPlaybackProgressBar::positionChanged
       
   546 // -------------------------------------------------------------------------------------------------
       
   547 //
       
   548 void QMPXVideoPlaybackButtonBar::positionChanged( int position )
       
   549 {
       
   550     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::positionChanged position = %d"), position );
       
   551 
       
   552     mPosition = position;
       
   553 }
       
   554 
       
   555 // -------------------------------------------------------------------------------------------------
       
   556 // QMPXVideoPlaybackButtonBar::durationChanged
       
   557 // -------------------------------------------------------------------------------------------------
       
   558 //
       
   559 void QMPXVideoPlaybackButtonBar::durationChanged( int duration )
       
   560 {
       
   561     MPX_DEBUG(_L("QMPXVideoPlaybackButtonBar::durationChanged duration = %d"), duration );
       
   562 
       
   563     mDuration = duration;
       
   564 }
       
   565 
       
   566 //End of file