videoplayback/videoplaybackview/tsrc/testfiledetailswidget/stub/inc/videoplaybackcontrolscontroller.h
changeset 52 e3cecb93e76a
child 63 4707a0db12f6
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
       
     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 VideoPlaybackControlsController
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version:  3 %
       
    19 
       
    20 
       
    21 
       
    22 #ifndef VIDEOPLAYBACKCONTROLSCONTROLLER_H_
       
    23 #define VIDEOPLAYBACKCONTROLSCONTROLLER_H_
       
    24 
       
    25 // INCLUDES
       
    26 #include <qobject>
       
    27 #include <mpxplaybackframeworkdefs.h>
       
    28 
       
    29 #include "mpxvideo_debug.h"
       
    30 #include "mpxhelixplaybackplugindefs.h"
       
    31 #include "mpxcommonvideoplaybackview.hrh"
       
    32 #include "videoplaybackviewfiledetails.h"
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class VideoPlaybackDocumentLoader;
       
    36 
       
    37 
       
    38 // DATA TYPES
       
    39 
       
    40 enum TTimerAction
       
    41 {
       
    42     ETimerCancel,
       
    43     ETimerReset
       
    44 };
       
    45 
       
    46 enum TPlaybackViewMode
       
    47 {
       
    48     EFullScreenView,
       
    49     EDetailsView,
       
    50     EAudioOnlyView
       
    51 };
       
    52 
       
    53 const QString KPLAYBACKVIEW_DOCML = ":/videoplaybackview/videoplaybackview.docml";
       
    54 
       
    55 // CLASS DECLARATION
       
    56 
       
    57 class VideoPlaybackControlsController : public QObject
       
    58 {
       
    59     Q_OBJECT
       
    60 
       
    61     public:
       
    62 
       
    63         /**
       
    64         * constructor.
       
    65         */
       
    66         VideoPlaybackControlsController();
       
    67 
       
    68         /**
       
    69         * Destructor.
       
    70         */
       
    71         virtual ~VideoPlaybackControlsController();
       
    72 
       
    73     public:
       
    74 
       
    75         /**
       
    76         * Command handling function.
       
    77         * Call HandleCommandL() of container
       
    78         */
       
    79         void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 );
       
    80 
       
    81         /**
       
    82         * Reset or cancel timers for the controls
       
    83         */
       
    84         void resetDisappearingTimers( TTimerAction timerAction );
       
    85 
       
    86         /**
       
    87         * Return state
       
    88         */
       
    89         inline TMPXPlaybackState state();
       
    90 
       
    91         /**
       
    92         * Return file details
       
    93         */
       
    94         inline VideoPlaybackViewFileDetails* fileDetails();
       
    95 
       
    96         inline VideoPlaybackDocumentLoader* layoutLoader();
       
    97 
       
    98         TPlaybackViewMode viewMode();
       
    99 
       
   100         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
       
   101 
       
   102     public:
       
   103         VideoPlaybackViewFileDetails          *mFileDetails;
       
   104         VideoPlaybackDocumentLoader           *mLoader;
       
   105 
       
   106         TMPXPlaybackState                      mState;
       
   107         TPlaybackViewMode                      mViewMode;
       
   108         TTimerAction                           mTimerAction;
       
   109         TMPXVideoPlaybackViewCommandIds        mCommand;
       
   110         int                                    mCommandValue;
       
   111 };
       
   112 
       
   113 // INLINE METHODS
       
   114 // -------------------------------------------------------------------------------------------------
       
   115 //   VideoPlaybackControlsController::state
       
   116 // -------------------------------------------------------------------------------------------------
       
   117 //
       
   118 inline
       
   119 TMPXPlaybackState VideoPlaybackControlsController::state()
       
   120 {
       
   121     return mState;
       
   122 }
       
   123 
       
   124 // -------------------------------------------------------------------------------------------------
       
   125 //   VideoPlaybackControlsController::fileDetails
       
   126 // -------------------------------------------------------------------------------------------------
       
   127 //
       
   128 inline
       
   129 VideoPlaybackViewFileDetails* VideoPlaybackControlsController::fileDetails()
       
   130 {
       
   131     return mFileDetails;
       
   132 }
       
   133 
       
   134 // -------------------------------------------------------------------------------------------------
       
   135 //   VideoPlaybackControlsController::layoutLoader
       
   136 // -------------------------------------------------------------------------------------------------
       
   137 //
       
   138 inline
       
   139 VideoPlaybackDocumentLoader* VideoPlaybackControlsController::layoutLoader()
       
   140 {
       
   141     return mLoader;
       
   142 }
       
   143 
       
   144 // -------------------------------------------------------------------------------------------------
       
   145 //   VideoPlaybackControlsController::viewMode
       
   146 // -------------------------------------------------------------------------------------------------
       
   147 //
       
   148 inline
       
   149 TPlaybackViewMode VideoPlaybackControlsController::viewMode()
       
   150 {
       
   151     return mViewMode;
       
   152 }
       
   153 
       
   154 #endif /*VIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
       
   155 
       
   156 // End of File