videoplayback/hbvideoplaybackview/tsrc/testmpxvideoplaybacktoolbar/stub/src/hbvideobaseplaybackview.cpp
changeset 44 518105d52e45
parent 42 17f382c040b1
child 49 824471cb468a
equal deleted inserted replaced
42:17f382c040b1 44:518105d52e45
     1 /*
       
     2 * Copyright (c) 2010 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 Video playback view
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:   2 %
       
    19 
       
    20 
       
    21 
       
    22 //  Include Files
       
    23 
       
    24 #include <hbinstance.h>
       
    25 #include <coecntrl.h>
       
    26 
       
    27 #include "hbtoolbar.h"
       
    28 #include "hbvideobaseplaybackview.h"
       
    29 
       
    30 //  Member Functions
       
    31 
       
    32 // -------------------------------------------------------------------------------------------------
       
    33 // HbVideoPlaybackView::HbVideoPlaybackView()
       
    34 // -------------------------------------------------------------------------------------------------
       
    35 //
       
    36 HbVideoBasePlaybackView::HbVideoBasePlaybackView()
       
    37 {
       
    38      mToolBar = new HbToolBar();
       
    39 }
       
    40 
       
    41 // -------------------------------------------------------------------------------------------------
       
    42 //   HbVideoPlaybackView::~HbVideoPlaybackView()
       
    43 // -------------------------------------------------------------------------------------------------
       
    44 //
       
    45 HbVideoBasePlaybackView::~HbVideoBasePlaybackView()
       
    46 {
       
    47     if ( mToolBar )
       
    48     {
       
    49          delete mToolBar;
       
    50          mToolBar = NULL;
       
    51     }
       
    52 }
       
    53 
       
    54 // -------------------------------------------------------------------------------------------------
       
    55 //   HbVideoBasePlaybackView::toolBar()
       
    56 // -------------------------------------------------------------------------------------------------
       
    57 //
       
    58 HbToolBar* HbVideoBasePlaybackView::toolBar()
       
    59 {
       
    60     return mToolBar;
       
    61 }
       
    62 
       
    63 // -------------------------------------------------------------------------------------------------
       
    64 //   HbVideoBasePlaybackView::hideItems()
       
    65 // -------------------------------------------------------------------------------------------------
       
    66 //
       
    67 void HbVideoBasePlaybackView::hideItems( int item )
       
    68 {
       
    69     Q_UNUSED( item );
       
    70     mToolBar->setVisible( false );
       
    71 }
       
    72 
       
    73 // -------------------------------------------------------------------------------------------------
       
    74 //   HbVideoBasePlaybackView::hideItems()
       
    75 // -------------------------------------------------------------------------------------------------
       
    76 //
       
    77 void HbVideoBasePlaybackView::showItems( int item )
       
    78 {
       
    79     Q_UNUSED( item );
       
    80     mToolBar->setVisible( true );
       
    81 }
       
    82 
       
    83 // -------------------------------------------------------------------------------------------------
       
    84 //   HbVideoBasePlaybackView::getWindow()
       
    85 // -------------------------------------------------------------------------------------------------
       
    86 //
       
    87 RWindow *HbVideoBasePlaybackView::getWindow()
       
    88 {
       
    89     return static_cast<RWindow*>( hbInstance->allMainWindows()[0]->effectiveWinId()->DrawableWindow() );
       
    90 }
       
    91 
       
    92 // EOF