34
|
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 MPXVideoPlaybackControlsController
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
36
|
18 |
// Version : %version: 2 %
|
34
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
|
|
23 |
#define MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
#include <qobject>
|
|
27 |
|
|
28 |
#include <mpxplaybackframeworkdefs.h>
|
|
29 |
|
|
30 |
#include "mpxvideo_debug.h"
|
|
31 |
#include "mpxvideoplaybackcontrol.hrh"
|
|
32 |
#include "mpxcommonvideoplaybackview.hrh"
|
|
33 |
#include "mpxvideoplaybackviewfiledetails.h"
|
|
34 |
|
|
35 |
// FORWARD DECLARATIONS
|
|
36 |
class QMPXVideoPlaybackDocumentLoader;
|
|
37 |
class QMPXVideoPlaybackControlsController;
|
|
38 |
|
|
39 |
|
|
40 |
// DATA TYPES
|
|
41 |
|
|
42 |
enum TMPXTimerAction
|
|
43 |
{
|
|
44 |
EMPXTimerCancel,
|
|
45 |
EMPXTimerReset
|
|
46 |
};
|
|
47 |
|
|
48 |
enum TPlaybackViewMode
|
|
49 |
{
|
|
50 |
EFullScreenView,
|
|
51 |
EDetailsView,
|
|
52 |
EAudioOnlyView
|
|
53 |
};
|
|
54 |
|
|
55 |
|
|
56 |
// CLASS DECLARATION
|
|
57 |
|
|
58 |
class QMPXVideoPlaybackControlsController : public QObject
|
|
59 |
{
|
|
60 |
Q_OBJECT
|
|
61 |
|
|
62 |
public:
|
|
63 |
|
|
64 |
/**
|
|
65 |
* constructor.
|
|
66 |
*/
|
|
67 |
QMPXVideoPlaybackControlsController();
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Destructor.
|
|
71 |
*/
|
|
72 |
virtual ~QMPXVideoPlaybackControlsController();
|
|
73 |
|
|
74 |
public:
|
|
75 |
/**
|
36
|
76 |
* Initialize controller
|
34
|
77 |
*/
|
36
|
78 |
void initializeController();
|
34
|
79 |
|
|
80 |
/**
|
|
81 |
* Command handling function.
|
|
82 |
* Call HandleCommandL() of container
|
|
83 |
*/
|
|
84 |
void handleCommand( TMPXVideoPlaybackViewCommandIds command, int value = 0 );
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Reset or cancel timers for the controls
|
|
88 |
*/
|
|
89 |
void resetDisappearingTimers( TMPXTimerAction timerAction );
|
|
90 |
|
|
91 |
/**
|
|
92 |
* Return state
|
|
93 |
*/
|
|
94 |
inline TMPXPlaybackState state();
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Return file details
|
|
98 |
*/
|
|
99 |
inline QMPXVideoPlaybackViewFileDetails* fileDetails();
|
|
100 |
|
|
101 |
QMPXVideoPlaybackDocumentLoader* layoutLoader();
|
|
102 |
|
|
103 |
TPlaybackViewMode viewMode();
|
|
104 |
|
|
105 |
public:
|
|
106 |
QMPXVideoPlaybackViewFileDetails *mFileDetails;
|
|
107 |
QMPXVideoPlaybackDocumentLoader *mLoader;
|
|
108 |
TMPXPlaybackState mState;
|
|
109 |
TPlaybackViewMode mViewMode;
|
|
110 |
TMPXTimerAction mTimerAction;
|
36
|
111 |
TMPXVideoPlaybackViewCommandIds mCommand;
|
|
112 |
int mValue;
|
34
|
113 |
};
|
|
114 |
|
|
115 |
// INLINE METHODS
|
|
116 |
// -------------------------------------------------------------------------------------------------
|
|
117 |
// QMPXVideoPlaybackControlsController::state
|
|
118 |
// -------------------------------------------------------------------------------------------------
|
|
119 |
//
|
|
120 |
inline
|
|
121 |
TMPXPlaybackState QMPXVideoPlaybackControlsController::state()
|
|
122 |
{
|
|
123 |
return mState;
|
|
124 |
}
|
|
125 |
|
|
126 |
// -------------------------------------------------------------------------------------------------
|
|
127 |
// QMPXVideoPlaybackControlsController::fileDetails
|
|
128 |
// -------------------------------------------------------------------------------------------------
|
|
129 |
//
|
|
130 |
inline
|
|
131 |
QMPXVideoPlaybackViewFileDetails* QMPXVideoPlaybackControlsController::fileDetails()
|
|
132 |
{
|
|
133 |
return mFileDetails;
|
|
134 |
}
|
|
135 |
|
|
136 |
#endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_P_H_*/
|
|
137 |
|
|
138 |
// End of File
|