--- a/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybacktoolbar.cpp Fri Jun 11 09:44:20 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybacktoolbar.cpp Thu Jun 24 09:49:13 2010 +0300
@@ -15,14 +15,13 @@
*
*/
-// Version : %version: 6 %
+// Version : %version: 7 %
#include <QTimer>
#include <QGraphicsLayout>
-#include <hbeffect.h>
#include <hbaction.h>
#include <hbtoolbar.h>
#include <hbinstance.h>
@@ -44,7 +43,7 @@
// QMPXVideoPlaybackToolBar::QMPXVideoPlaybackToolBar()
// -------------------------------------------------------------------------------------------------
//
-QMPXVideoPlaybackToolBar::QMPXVideoPlaybackToolBar(
+QMPXVideoPlaybackToolBar::QMPXVideoPlaybackToolBar(
QMPXVideoPlaybackControlsController* controller )
: mController( controller )
, mSeekStartTimer( NULL )
@@ -59,8 +58,7 @@
mToolBar = mController->view()->toolBar();
mToolBar->setOrientation( Qt::Horizontal );
- HbEffect::disable( mToolBar );
-
+
mController->view()->hideItems( Hb::ToolBarItem );
initialize();
@@ -74,7 +72,6 @@
{
MPX_DEBUG(_L("QMPXVideoPlaybackToolBar::~QMPXVideoPlaybackToolBar()"));
- HbEffect::enable( mToolBar );
mToolBar->clearActions();
for ( int i = 0 ; i < mButtonIcons.count() ; i++ )
@@ -170,7 +167,7 @@
mButtonActions[EMPX1stButton]->setIcon( *mButtonIcons[EMPXNaturalIcon] );
//
- // Attach/Share button
+ // Attach/Share button
//
mButtonIcons[EMPXAttachIcon]->setIconName( "qtg_mono_attach" );
mButtonIcons[EMPXShareIcon]->setIconName( "qtg_mono_share" );
@@ -184,26 +181,26 @@
mDuration = (qreal)mController->fileDetails()->mDuration / (qreal)KPbMilliMultiplier;
//
- // Create a timer for seeking.
+ // Create a timer for seeking.
// We will issue SetPosition every KSeekingTimeOut msec to show the current frame to user
//
mSeekStartTimer = new QTimer();
mSeekStartTimer->setSingleShot( true );
mSeekStartTimer->setInterval( KSeekStartTimeOut );
-
+
//
// get window size
//
- RWindow *window = mController->view()->getWindow();
+ RWindow *window = mController->view()->getWindow();
TRect displayRect = TRect( TPoint( window->Position() ), TSize( window->Size() ) );
-
+
//
// get window aspect ratio
// if device is in portrait mode, width > height
// if device is in landscape mode, width < height
//
TReal32 width = (TReal32) displayRect.Width();
- TReal32 height = (TReal32) displayRect.Height();
+ TReal32 height = (TReal32) displayRect.Height();
mDisplayAspectRatio = (width > height)? (width / height) : (height / width);
}
}
@@ -233,7 +230,7 @@
{
mSeekingState = EMPXFastForwarding;
- mController->handleCommand( EMPXPbvCmdSeekForward );
+ mController->handleCommand( EMPXPbvCmdSeekForward );
}
}
@@ -272,7 +269,7 @@
if ( mSeekingState == EMPXFastForwarding )
{
- mController->handleCommand( EMPXPbvCmdEndSeek );
+ mController->handleCommand( EMPXPbvCmdEndSeek );
}
else
{
@@ -310,7 +307,7 @@
if ( mSeekingState == EMPXRewinding )
{
- mController->handleCommand( EMPXPbvCmdEndSeek );
+ mController->handleCommand( EMPXPbvCmdEndSeek );
}
else
{
@@ -341,7 +338,7 @@
MPX_DEBUG(_L("QMPXVideoPlaybackToolBar::changeAspectRatio()"));
mController->resetDisappearingTimers( EMPXTimerReset );
-
+
TMPXVideoPlaybackViewCommandIds cmd = EMPXPbvCmdStretchAspectRatio;
switch( mAspectRatio )
@@ -409,7 +406,7 @@
//
// If we are in attach service or audio only view, then don't update the icon.
// Aspect ratio icon slots are shared with attach and share icon.
- // Just update the mAspectRatio
+ // Just update the mAspectRatio
// and once we go back to full screen, we will show the correct aspect ratio icon
//
if ( ! mController->isAttachOperation() && mController->viewMode() == EFullScreenView )
@@ -431,7 +428,7 @@
mButtonActions[EMPX1stButton]->setIcon( *mButtonIcons[EMPXNaturalIcon] );
break;
}
- }
+ }
}
}
@@ -531,11 +528,11 @@
else
{
//
- // check if video clip has same aspect ratio as display window
+ // check if video clip has same aspect ratio as display window
//
- TReal32 videoAspectRatio = (TReal32) details->mVideoWidth / (TReal32) details->mVideoHeight;
+ TReal32 videoAspectRatio = (TReal32) details->mVideoWidth / (TReal32) details->mVideoHeight;
bool enabled = ( mDisplayAspectRatio == videoAspectRatio )? false : true;
-
+
//
// enable or dim 'aspect ratio' buttons accordingly
//
@@ -548,7 +545,7 @@
this, SLOT( changeAspectRatio() ) );
}
}
- }
+ }
else if ( mController->viewMode() == EAudioOnlyView )
{
//
@@ -574,7 +571,7 @@
if ( mButtons.count() )
{
disconnect( mButtons[EMPX1stButton], SIGNAL( released() ), 0, 0 );
- connect( mButtons[EMPX1stButton], SIGNAL( released() ),
+ connect( mButtons[EMPX1stButton], SIGNAL( released() ),
mController, SLOT( sendVideo() ) );
}
}
@@ -615,7 +612,7 @@
}
//
- // toolbar creates button once it gets visible, so we don't know exact timing when toolbar
+ // toolbar creates button once it gets visible, so we don't know exact timing when toolbar
// creates button, so start timer to get layout information once the toolbar gets visible.
// This is needed since we don't use toolbar in proper way.
//
@@ -624,9 +621,9 @@
mRetrieveButtonTimer = new QTimer();
mRetrieveButtonTimer->setSingleShot( false );
mRetrieveButtonTimer->setInterval( KRetrieveButtonTimeOut );
- connect( mRetrieveButtonTimer, SIGNAL( timeout() ), this, SLOT( retrieveButtons() ) );
+ connect( mRetrieveButtonTimer, SIGNAL( timeout() ), this, SLOT( retrieveButtons() ) );
- mRetrieveButtonTimer->start();
+ mRetrieveButtonTimer->start();
}
durationChanged( (qreal)mController->fileDetails()->mDuration / (qreal)KPbMilliMultiplier );
@@ -708,7 +705,7 @@
if ( mRetrieveButtonTimer->isActive() )
{
mRetrieveButtonTimer->stop();
- }
+ }
}
for ( int i = 0 ; i < layout->count() ; i++ )
@@ -744,10 +741,10 @@
{
connect( mButtons[EMPX1stButton], SIGNAL( released() ),
this, SLOT( changeAspectRatio() ) );
- }
+ }
else if ( mController->viewMode() == EAudioOnlyView )
{
- connect( mButtons[EMPX1stButton], SIGNAL( released() ),
+ connect( mButtons[EMPX1stButton], SIGNAL( released() ),
mController, SLOT( sendVideo() ) );
}
}