videoplayback/hbvideoplaybackview/controlsrc/mpxvideoplaybackstatuspanecontrol.cpp
changeset 41 229f037ce963
parent 40 13331705e488
equal deleted inserted replaced
40:13331705e488 41:229f037ce963
    13 *
    13 *
    14 * Description:  Implementation of QMPXVideoPlaybackStatusPaneControl
    14 * Description:  Implementation of QMPXVideoPlaybackStatusPaneControl
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 17 %
    18 // Version : %version: 19 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 #include <QFileInfo>
    22 #include <QFileInfo>
    23 
    23 
    40 
    40 
    41 // -------------------------------------------------------------------------------------------------
    41 // -------------------------------------------------------------------------------------------------
    42 // QMPXVideoPlaybackStatusPaneControl::QMPXVideoPlaybackStatusPaneControl()
    42 // QMPXVideoPlaybackStatusPaneControl::QMPXVideoPlaybackStatusPaneControl()
    43 // -------------------------------------------------------------------------------------------------
    43 // -------------------------------------------------------------------------------------------------
    44 //
    44 //
    45 QMPXVideoPlaybackStatusPaneControl::QMPXVideoPlaybackStatusPaneControl( 
    45 QMPXVideoPlaybackStatusPaneControl::QMPXVideoPlaybackStatusPaneControl(
    46         QMPXVideoPlaybackControlsController* controller, 
    46         QMPXVideoPlaybackControlsController* controller,
    47         TMPXVideoPlaybackControls index, 
    47         TMPXVideoPlaybackControls index,
    48         HbWidget* widget, 
    48         HbWidget* widget,
    49         TUint controlproperties )
    49         TUint controlproperties )
    50     : QMPXVideoPlaybackFullScreenControl( controller, index, widget, controlproperties )
    50     : QMPXVideoPlaybackFullScreenControl( controller, index, widget, controlproperties )
    51     , mActionBack( NULL )
    51     , mActionBack( NULL )
    52     , mTitleLabel( NULL )
    52     , mTitleLabel( NULL )
    53     , mTitleGroupBox( NULL )
    53     , mTitleGroupBox( NULL )
   179         QString title = mController->fileDetails()->mTitle;
   179         QString title = mController->fileDetails()->mTitle;
   180 
   180 
   181         if ( title.count() == 0 )
   181         if ( title.count() == 0 )
   182         {
   182         {
   183             QFileInfo fileInfo( mController->fileDetails()->mClipName );
   183             QFileInfo fileInfo( mController->fileDetails()->mClipName );
   184             title = fileInfo.baseName ();
   184             title = fileInfo.completeBaseName();
   185         }
   185         }
   186 
   186 
   187         QGraphicsWidget *qWidget = mController->layoutLoader()->findWidget( QString( "title" ) );
   187         QGraphicsWidget *qWidget = mController->layoutLoader()->findWidget( QString( "title" ) );
   188         mTitleLabel = qobject_cast<HbLabel*>( qWidget );
   188         mTitleLabel = qobject_cast<HbLabel*>( qWidget );
   189         mTitleLabel->setPlainText( title );
   189         mTitleLabel->setPlainText( title );
   208     {
   208     {
   209         case EFullScreenView:
   209         case EFullScreenView:
   210         {
   210         {
   211             //
   211             //
   212             // Set TitleBar transparent and go back to preview view with back key
   212             // Set TitleBar transparent and go back to preview view with back key
   213             // 
   213             //
   214             disconnect( mActionBack, SIGNAL( triggered() ), this, SLOT( openFullScreenView() ) );
   214             disconnect( mActionBack, SIGNAL( triggered() ), this, SLOT( openFullScreenView() ) );
   215             connect( mActionBack, SIGNAL( triggered() ), mController->view(), SLOT( closePlaybackView() ) );
   215             connect( mActionBack, SIGNAL( triggered() ), mController->view(), SLOT( closePlaybackView() ) );
   216 
   216 
   217             mController->view()->setViewFlags( 
   217             mController->view()->setViewFlags( mController->view()->viewFlags() |
   218                     HbView::HbViewFlags( HbView::ViewTitleBarTransparent | HbView::ViewStatusBarTransparent ) );
   218                                                HbView::ViewTitleBarTransparent |
       
   219                                                HbView::ViewStatusBarTransparent );
   219 
   220 
   220             mTitleLabel->setVisible( true );
   221             mTitleLabel->setVisible( true );
   221             mTitleGroupBox->setVisible( false );
   222             mTitleGroupBox->setVisible( false );
   222 
   223 
   223             break;
   224             break;
   224         }
   225         }
   225         case EDetailsView:
   226         case EDetailsView:
   226         {
   227         {
   227             //
   228             //
   228             // Set TitleBar opaque and go back to full screen view with back key
   229             // Set TitleBar opaque and go back to full screen view with back key
   229             // 
   230             //
   230             disconnect( mActionBack, SIGNAL( triggered() ), mController->view(), SLOT( closePlaybackView() ) );
   231             disconnect( mActionBack, SIGNAL( triggered() ), mController->view(), SLOT( closePlaybackView() ) );
   231             connect( mActionBack, SIGNAL( triggered() ), this, SLOT( openFullScreenView() ) );
   232             connect( mActionBack, SIGNAL( triggered() ), this, SLOT( openFullScreenView() ) );
   232 
   233 
   233             mController->view()->setViewFlags( HbView::ViewFlagNone );
   234             mController->view()->setViewFlags( HbView::ViewFlagNone );
   234 
   235 
   239         }
   240         }
   240         case EAudioOnlyView:
   241         case EAudioOnlyView:
   241         {
   242         {
   242             //
   243             //
   243             // Set TitleBar opaque and go back to preview view with back key
   244             // Set TitleBar opaque and go back to preview view with back key
   244             // 
   245             //
   245             disconnect( mActionBack, SIGNAL( triggered() ), this, SLOT( openFullScreenView() ) );
   246             disconnect( mActionBack, SIGNAL( triggered() ), this, SLOT( openFullScreenView() ) );
   246             connect( mActionBack, SIGNAL( triggered() ), mController->view(), SLOT( closePlaybackView() ) );
   247             connect( mActionBack, SIGNAL( triggered() ), mController->view(), SLOT( closePlaybackView() ) );
   247 
   248 
   248             mController->view()->setViewFlags( HbView::ViewFlagNone );
   249             mController->view()->setViewFlags( HbView::ViewFlagNone );
   249             break;
   250             break;