videoplayback/videoplaybackview/inc/videoplaybackcontrolscontroller.h
changeset 65 a9d57bd8d7b7
parent 62 0e1e938beb1a
equal deleted inserted replaced
62:0e1e938beb1a 65:a9d57bd8d7b7
    13 *
    13 *
    14 * Description:  Implementation of VideoPlaybackControlsController
    14 * Description:  Implementation of VideoPlaybackControlsController
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#25 %
    18 // Version : %version: da1mmcf#28 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 #ifndef VIDEOPLAYBACKCONTROLSCONTROLLER_H_
    22 #ifndef VIDEOPLAYBACKCONTROLSCONTROLLER_H_
    23 #define VIDEOPLAYBACKCONTROLSCONTROLLER_H_
    23 #define VIDEOPLAYBACKCONTROLSCONTROLLER_H_
    24 
    24 
    25 // INCLUDES
    25 // INCLUDES
    26 #include <QObject>
    26 #include <QObject>
    27 #include <QPixmap>
    27 #include <QPixmap>
    28 
    28 
       
    29 #include <xqserviceutil.h>
    29 #include <mpxplaybackframeworkdefs.h>
    30 #include <mpxplaybackframeworkdefs.h>
    30 
    31 
    31 #include "mpxvideo_debug.h"
    32 #include "mpxvideo_debug.h"
    32 #include "videoplaybackcontrol.hrh"
    33 #include "videoplaybackcontrol.hrh"
    33 #include "mpxcommonvideoplaybackview.hrh"
    34 #include "mpxcommonvideoplaybackview.hrh"
    45 class VideoPlaybackDocumentLoader;
    46 class VideoPlaybackDocumentLoader;
    46 class VideoPlaybackFullScreenControl;
    47 class VideoPlaybackFullScreenControl;
    47 class VideoPlaybackControlsController;
    48 class VideoPlaybackControlsController;
    48 class VideoPlaybackControlConfiguration;
    49 class VideoPlaybackControlConfiguration;
    49 class VideoServices;
    50 class VideoServices;
    50 
    51 class ShareUi;
    51 
    52 
    52 // DATA TYPES
    53 // DATA TYPES
    53 
    54 
    54 enum TTimerAction
    55 enum TTimerAction
    55 {
    56 {
   143 
   144 
   144         void updateVideoRectDone();
   145         void updateVideoRectDone();
   145 
   146 
   146         inline TPlaybackViewMode viewMode();
   147         inline TPlaybackViewMode viewMode();
   147 
   148 
   148         void changeViewMode( TPlaybackViewMode viewMode, bool transitionEffect = true );
   149         void evaluateAndChangeViewMode(
       
   150                 TPlaybackViewMode viewMode = EFullScreenView, bool transitionEffect = false );
   149 
   151 
   150         inline bool isAttachOperation();
   152         inline bool isAttachOperation();
   151 
   153 
   152         inline bool isFileDetailsAdded();
   154         inline bool isFileDetailsAdded();
   153 
   155 
   154         bool isRNLogoBitmapInControlList();
   156         bool isRNLogoBitmapInControlList();
   155 
   157 
   156         bool shouldShowRNLogo();
   158         bool shouldShowRNLogo();
       
   159         
       
   160         inline bool isService();
   157 
   161 
   158     private:
   162     private:
   159         /**
   163         /**
   160         * Initialize controller
   164         * Initialize controller
   161         */
   165         */
   238 
   242 
   239         /**
   243         /**
   240 		* Return true if control is visible
   244 		* Return true if control is visible
   241 		*/
   245 		*/
   242 		bool isSoftKeyVisible();
   246 		bool isSoftKeyVisible();
   243 
       
   244         /**
       
   245         * Handle tvout connected/disconnected event
       
   246         */
       
   247 		void handleTvOutEvent( bool connected,
       
   248 		                       TVideoPlaybackControlCommandIds event );
       
   249 
   247 
   250 		void updateVideoRect(  bool transitionEffect = true );
   248 		void updateVideoRect(  bool transitionEffect = true );
   251 
   249 
   252 		void showVolumeControls();
   250 		void showVolumeControls();
   253 
   251 
   282     private:
   280     private:
   283         VideoBasePlaybackView                     *mView;
   281         VideoBasePlaybackView                     *mView;
   284         CMPXVideoViewWrapper                      *mViewWrapper;
   282         CMPXVideoViewWrapper                      *mViewWrapper;
   285         VideoPlaybackViewFileDetails              *mFileDetails;
   283         VideoPlaybackViewFileDetails              *mFileDetails;
   286 
   284 
   287         QList<VideoPlaybackFullScreenControl*> mControls;
   285         QList<VideoPlaybackFullScreenControl*>     mControls;
   288 
   286 
   289         VideoPlaybackControlPolicy                *mControlsPolicy;
   287         VideoPlaybackControlPolicy                *mControlsPolicy;
   290         VideoPlaybackControlConfiguration         *mControlsConfig;
   288         VideoPlaybackControlConfiguration         *mControlsConfig;
   291 
   289 
   292         QTimer                                    *mControlsTimer;
   290         QTimer                                    *mControlsTimer;
   299         VideoServices                             *mVideoServices;
   297         VideoServices                             *mVideoServices;
   300 
   298 
   301         bool                                       mViewTransitionIsGoingOn;
   299         bool                                       mViewTransitionIsGoingOn;
   302         bool                                       mIsAttachOperation;
   300         bool                                       mIsAttachOperation;
   303         bool                                       mFileDetailsAdded;
   301         bool                                       mFileDetailsAdded;
       
   302         bool                                       mShowControlsWhenInHorizontal;
   304 
   303 
   305         TThumbNailState                            mThumbNailState;
   304         TThumbNailState                            mThumbNailState;
   306 
   305 
   307         TMPXPlaybackState                          mState;
   306         TMPXPlaybackState                          mState;
   308         TPlaybackViewMode                          mViewMode;
   307         TPlaybackViewMode                          mViewMode;
   309         Qt::Orientation                            mOrientation;
   308         Qt::Orientation                            mOrientation;
       
   309             
       
   310         ShareUi                                    *mShareUi;
   310 };
   311 };
   311 
   312 
   312 // INLINE METHODS
   313 // INLINE METHODS
   313 // -------------------------------------------------------------------------------------------------
   314 // -------------------------------------------------------------------------------------------------
   314 //   VideoPlaybackControlsController::state
   315 //   VideoPlaybackControlsController::state
   397         mFileDetailsAdded );
   398         mFileDetailsAdded );
   398 
   399 
   399     return mFileDetailsAdded;
   400     return mFileDetailsAdded;
   400 }
   401 }
   401 
   402 
       
   403 
       
   404 // -------------------------------------------------------------------------------------------------
       
   405 //   VideoPlaybackControlsController::isService
       
   406 // -------------------------------------------------------------------------------------------------
       
   407 //
       
   408 inline
       
   409 bool VideoPlaybackControlsController::isService()
       
   410 {
       
   411     MPX_DEBUG(_L("VideoPlaybackControlsController::isService()"));
       
   412     
       
   413     return XQServiceUtil::isService();
       
   414 }
       
   415 
       
   416 
   402 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
   417 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
   403 
   418 
   404 // End of File
   419 // End of File