videoplayback/videoplaybackview/tsrc/testuserinputhandler/stub/src/videobaseplaybackview.cpp
changeset 52 e3cecb93e76a
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
       
     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 Video playback view
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:  3 %
       
    19 
       
    20 
       
    21 
       
    22 //  Include Files
       
    23 #include <aknappui.h>
       
    24 #include <qgraphicssceneevent>
       
    25 #include <hbinstance.h>
       
    26 #include <mmf/common/mmferrors.h>
       
    27 
       
    28 #include "../inc/videobaseplaybackview.h"
       
    29 
       
    30 
       
    31 //  Member Functions
       
    32 
       
    33 // -------------------------------------------------------------------------------------------------
       
    34 // VideoBasePlaybackView::VideoBasePlaybackView()
       
    35 // -------------------------------------------------------------------------------------------------
       
    36 //
       
    37 VideoBasePlaybackView::VideoBasePlaybackView()
       
    38 {
       
    39     mCurrentError = KErrNone;
       
    40     mViewActive = false;
       
    41 }
       
    42 
       
    43 // -------------------------------------------------------------------------------------------------
       
    44 //   VideoBasePlaybackView::~VideoBasePlaybackView()
       
    45 // -------------------------------------------------------------------------------------------------
       
    46 //
       
    47 VideoBasePlaybackView::~VideoBasePlaybackView()
       
    48 {
       
    49 }
       
    50 
       
    51 // -------------------------------------------------------------------------------------------------
       
    52 //   VideoBasePlaybackView::handleActivateView()
       
    53 // -------------------------------------------------------------------------------------------------
       
    54 //
       
    55 void VideoBasePlaybackView::handleActivateView()
       
    56 {
       
    57     mViewActive = true;
       
    58 }
       
    59 
       
    60 // -------------------------------------------------------------------------------------------------
       
    61 //   VideoBasePlaybackView::handleDeactivateView()
       
    62 // -------------------------------------------------------------------------------------------------
       
    63 //
       
    64 void VideoBasePlaybackView::handleDeactivateView()
       
    65 {
       
    66     mViewActive = false;
       
    67 }
       
    68 
       
    69 // -------------------------------------------------------------------------------------------------
       
    70 // VideoBasePlaybackView::mousePress
       
    71 // -------------------------------------------------------------------------------------------------
       
    72 //
       
    73 void VideoBasePlaybackView::mousePressEvent( QGraphicsSceneMouseEvent *event ) 
       
    74 {
       
    75     Q_UNUSED( event );
       
    76 }
       
    77 
       
    78 // -------------------------------------------------------------------------------------------------
       
    79 // VideoBasePlaybackView::itemChange
       
    80 // -------------------------------------------------------------------------------------------------
       
    81 //
       
    82 QVariant VideoBasePlaybackView::itemChange( GraphicsItemChange change, const QVariant &value )
       
    83 {
       
    84     return QGraphicsWidget::itemChange( change, value );
       
    85 }
       
    86 
       
    87 // -------------------------------------------------------------------------------------------------
       
    88 //   VideoBasePlaybackView::closePlaybackView()
       
    89 // -------------------------------------------------------------------------------------------------
       
    90 //
       
    91 void VideoBasePlaybackView::paint( QPainter *painter, 
       
    92                                      const QStyleOptionGraphicsItem *option, 
       
    93                                      QWidget *widget )
       
    94 {
       
    95     Q_UNUSED( painter );
       
    96     Q_UNUSED( option );
       
    97     Q_UNUSED( widget );    
       
    98 }
       
    99 
       
   100 
       
   101 // -------------------------------------------------------------------------------------------------
       
   102 //   VideoBasePlaybackView::event()
       
   103 // -------------------------------------------------------------------------------------------------
       
   104 //
       
   105 bool VideoBasePlaybackView::event( QEvent *event )
       
   106 {
       
   107     Q_UNUSED( event );
       
   108     bool consumed = false;
       
   109 
       
   110     return consumed;
       
   111 }
       
   112 
       
   113 // -------------------------------------------------------------------------------------------------
       
   114 //   VideoBasePlaybackView::handleClosePlaybackView()
       
   115 // -------------------------------------------------------------------------------------------------
       
   116 //
       
   117 void VideoBasePlaybackView::handleClosePlaybackView()
       
   118 {
       
   119     mViewActive = false;
       
   120 }
       
   121 
       
   122 // -------------------------------------------------------------------------------------------------
       
   123 //   VideoBasePlaybackView::issuePlayCommand
       
   124 // -------------------------------------------------------------------------------------------------
       
   125 //
       
   126 void VideoBasePlaybackView::issuePlayCommand()
       
   127 {
       
   128 }
       
   129 
       
   130 // -------------------------------------------------------------------------------------------------
       
   131 //   VideoBasePlaybackView::handleBufferingState
       
   132 // -------------------------------------------------------------------------------------------------
       
   133 //
       
   134 void VideoBasePlaybackView::handleBufferingState()
       
   135 {
       
   136 }
       
   137 
       
   138 // -------------------------------------------------------------------------------------------------
       
   139 //   VideoBasePlaybackView::handlePluginError()
       
   140 // -------------------------------------------------------------------------------------------------
       
   141 //
       
   142 void VideoBasePlaybackView::handlePluginError( int aError )
       
   143 {
       
   144     mCurrentError = aError;
       
   145 }
       
   146 
       
   147 // -------------------------------------------------------------------------------------------------
       
   148 //   VideoBasePlaybackView::doClosePlayer
       
   149 // -------------------------------------------------------------------------------------------------
       
   150 //
       
   151 void VideoBasePlaybackView::doClosePlayer()
       
   152 {
       
   153     mViewActive = false;
       
   154 }
       
   155 
       
   156 
       
   157 
       
   158 // -------------------------------------------------------------------------------------------------
       
   159 //   VideoBasePlaybackView::retrievePdlInformation
       
   160 // -------------------------------------------------------------------------------------------------
       
   161 //
       
   162 void VideoBasePlaybackView::retrievePdlInformation()
       
   163 {
       
   164 }
       
   165 
       
   166 // -------------------------------------------------------------------------------------------------
       
   167 //   VideoBasePlaybackView::closePlaybackView()
       
   168 // -------------------------------------------------------------------------------------------------
       
   169 //
       
   170 void VideoBasePlaybackView::closePlaybackView()
       
   171 {
       
   172     mViewActive = false;
       
   173 }
       
   174 
       
   175 // -------------------------------------------------------------------------------------------------
       
   176 //   VideoBasePlaybackView::startClosingPlaybackView()
       
   177 // -------------------------------------------------------------------------------------------------
       
   178 //
       
   179 void VideoBasePlaybackView::startClosingPlaybackView()
       
   180 {
       
   181     mViewActive = false;
       
   182 }
       
   183 
       
   184 // -------------------------------------------------------------------------------------------------
       
   185 //   VideoBasePlaybackView::getWindow()
       
   186 // -------------------------------------------------------------------------------------------------
       
   187 //
       
   188 RWindow *VideoBasePlaybackView::getWindow()
       
   189 {
       
   190     return static_cast<RWindow*>( hbInstance->allMainWindows()[0]->effectiveWinId()->DrawableWindow() );
       
   191 }
       
   192 
       
   193 
       
   194 // EOF