|
1 /* |
|
2 * Copyright (c) 2008 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: Media Details Viewer |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ |
|
21 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ |
|
22 |
|
23 // INCLUDES |
|
24 #include <coecntrl.h> |
|
25 |
|
26 #include "mpxvideo_debug.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CEikLabel; |
|
30 class CMPXVideoPlaybackViewFileDetails; |
|
31 class CMPXVideoPlaybackControlsController; |
|
32 |
|
33 #ifdef RD_TACTILE_FEEDBACK |
|
34 class MTouchFeedback; |
|
35 #endif //RD_TACTILE_FEEDBACK |
|
36 |
|
37 class CMPXVideoPlaybackMediaDetailsViewer : public CCoeControl |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 static CMPXVideoPlaybackMediaDetailsViewer* NewL( CMPXVideoPlaybackControlsController* aController); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CMPXVideoPlaybackMediaDetailsViewer(); |
|
49 |
|
50 private: |
|
51 |
|
52 /** |
|
53 * C++ default constructor. |
|
54 */ |
|
55 CMPXVideoPlaybackMediaDetailsViewer( CMPXVideoPlaybackControlsController* aController ); |
|
56 |
|
57 /** |
|
58 * By default Symbian 2nd phase constructor is private. |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * From CoeControl,CountComponentControls. |
|
66 * @return Number of contained component controls. |
|
67 */ |
|
68 TInt CountComponentControls() const; |
|
69 |
|
70 /** |
|
71 * From CCoeControl,ComponentControl. |
|
72 * @param aIndex index of a contained component control. |
|
73 */ |
|
74 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
75 |
|
76 /** |
|
77 * From CCoeControl,Draw. |
|
78 * @param aRect drawable area. |
|
79 */ |
|
80 void Draw( const TRect& aRect ) const; |
|
81 |
|
82 /** |
|
83 * Creates new skins for the control |
|
84 * @return void |
|
85 */ |
|
86 void SkinChangeL(); |
|
87 |
|
88 |
|
89 public: // from CoeControl |
|
90 |
|
91 /** |
|
92 * From CoeControl,OfferKeyEventL |
|
93 */ |
|
94 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
|
95 |
|
96 public: |
|
97 |
|
98 /* |
|
99 * Bring the button bar to its original state |
|
100 * @since 5.0 |
|
101 */ |
|
102 void Reset(); |
|
103 |
|
104 /** |
|
105 * Accessor for the dynamically calculated viewer rect |
|
106 * @since 9.2 |
|
107 * @return the viewer rect |
|
108 */ |
|
109 TRect ViewerRect(); |
|
110 |
|
111 |
|
112 private: |
|
113 |
|
114 void CreateLabelsL(); |
|
115 |
|
116 void LaunchDRMDetailsL(); |
|
117 |
|
118 /** |
|
119 * Sets label rects and text |
|
120 */ |
|
121 void FormatLabelsL() const; |
|
122 |
|
123 void UpdateBackgroundBitmapL() const; |
|
124 |
|
125 /** |
|
126 * Timer callback for scroll filename timer |
|
127 * @since 9.2 |
|
128 * @param aPtr Pointer to timers callback |
|
129 * @return KErrNone |
|
130 */ |
|
131 static TInt ScrollFilenameTimer( TAny* aPtr ); |
|
132 |
|
133 /** |
|
134 * Handle Scroll Filename Timer |
|
135 * @since 9.2 |
|
136 * @return void |
|
137 */ |
|
138 void HandleScrollFilenameTimerL(); |
|
139 |
|
140 /** |
|
141 * Determine the number of items to be shown in the viewer |
|
142 * @since 9.2 |
|
143 * @return the number of rows to be created |
|
144 */ |
|
145 TInt NumOfItemsShownInViewer(); |
|
146 |
|
147 /** |
|
148 * Dynamically calculate determine the viewer rectangle dyanmically |
|
149 * @since 9.2 |
|
150 * @return the viewer rect |
|
151 */ |
|
152 TRect CalculateViewerRect(); |
|
153 |
|
154 |
|
155 private: // Data |
|
156 CMPXVideoPlaybackControlsController* iController; |
|
157 |
|
158 CEikLabel* iClipnameLabel; |
|
159 CEikLabel* iTitleLabel; |
|
160 CEikLabel* iArtistLabel; |
|
161 CEikLabel* iFormatLabel; |
|
162 CEikLabel* iResolutionLabel; |
|
163 CEikLabel* iDurationLabel; |
|
164 CEikLabel* iBitrateLabel; |
|
165 CEikLabel* iLicenseLabel; |
|
166 CEikLabel* iAdditionalLabel; |
|
167 |
|
168 |
|
169 CFbsBitmap* iBackgroundBitmap; |
|
170 CPeriodic* iScrollingTextTimer; |
|
171 TInt iScrollPosition; |
|
172 TBool iShouldPauseScrolling; |
|
173 TRect iViewerRect; |
|
174 HBufC* iAdditionalString; |
|
175 }; |
|
176 |
|
177 |
|
178 |
|
179 #endif /* MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_ */ |