|
1 /* |
|
2 * Copyright (c) 2005-2007 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: View class for general themes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_PSLNGENERALTHEMEVIEW_H |
|
21 #define C_PSLNGENERALTHEMEVIEW_H |
|
22 |
|
23 #include "PslnBaseView.h" |
|
24 #include <mpslnfwmsklabelobserver.h> |
|
25 #include "PslnGeneralThemeContainer.h" |
|
26 #include <ConeResLoader.h> |
|
27 |
|
28 /** |
|
29 * View class for general themes. |
|
30 * |
|
31 * @since S60 v3.1 |
|
32 */ |
|
33 class CPslnGeneralThemeView : public CPslnBaseView, |
|
34 public MPslnFWMSKObserver, |
|
35 public MPslnThemePreviewObserver |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @return new instance of CPslnGeneralThemeView. |
|
42 */ |
|
43 static CPslnGeneralThemeView* NewLC(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CPslnGeneralThemeView(); |
|
49 |
|
50 /** |
|
51 * From CAknView. |
|
52 * Returns view id. |
|
53 * @return An unsigned integer (view id). |
|
54 */ |
|
55 TUid Id() const; |
|
56 |
|
57 /** |
|
58 * From MEikCommandObserver. |
|
59 * Handles commands. |
|
60 * @param aCommand Command to be handled. |
|
61 */ |
|
62 void HandleCommandL( TInt aCommand ); |
|
63 |
|
64 /** |
|
65 * Requests container to update skin data. |
|
66 * @param aCurrentIndex Current item index. If -1, remain old index. |
|
67 */ |
|
68 void UpdateSkinListItemsL( TInt aCurrentIndex = KErrNotFound ); |
|
69 |
|
70 /** |
|
71 * hightlight default skin. |
|
72 */ |
|
73 void HightlightDefaultSkin(); |
|
74 |
|
75 /** |
|
76 * From MPslnFWMSKObserver. |
|
77 * Checks if the MSK label needs to be adjusted. |
|
78 */ |
|
79 void CheckMiddleSoftkeyLabelL(); |
|
80 |
|
81 /** |
|
82 * Requests container to update skin data. |
|
83 */ |
|
84 void UpdateSkinListItemsDColumnOnlyL(); |
|
85 |
|
86 /** |
|
87 * From MPslnThemePreviewObserver. |
|
88 * New theme preview state available. |
|
89 */ |
|
90 void HandlePreviewStateChange( const TBool& aPreviewMode ); |
|
91 |
|
92 /** |
|
93 * Restart Quick Preview |
|
94 */ |
|
95 void RestartQuickPreviewL(); |
|
96 |
|
97 /** |
|
98 * Remove local skin items. |
|
99 */ |
|
100 void RemoveLocalSkinItems(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * From CAknView. |
|
106 */ |
|
107 void DoActivateL( |
|
108 const TVwsViewId& aPrevViewId, |
|
109 TUid aCustomMessageId, |
|
110 const TDesC8& aCustomMessage ); |
|
111 |
|
112 /** |
|
113 * From CAknView. |
|
114 */ |
|
115 void DoDeactivate(); |
|
116 |
|
117 /** |
|
118 * From MEikMenuObserver. |
|
119 * Changes MenuPane dynamically. |
|
120 */ |
|
121 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
122 |
|
123 /** |
|
124 * From CPslnBaseView. |
|
125 */ |
|
126 void HandleListBoxSelectionL(); |
|
127 |
|
128 /** |
|
129 * From CPslnBaseView. |
|
130 */ |
|
131 void HandleListBoxItemHighlightL(); |
|
132 |
|
133 /** |
|
134 * From CPslnBaseView. |
|
135 */ |
|
136 void NewContainerL(); |
|
137 |
|
138 /** |
|
139 * From CPslnBaseView. |
|
140 */ |
|
141 void SetTitlePaneL( TInt& aResourceId ); |
|
142 |
|
143 /* Remove command and label from MSK */ |
|
144 void RemoveCommandFromMSK(); |
|
145 |
|
146 /** |
|
147 * C++ default constructor. |
|
148 */ |
|
149 CPslnGeneralThemeView(); |
|
150 |
|
151 /** |
|
152 * By default Symbian 2nd phase constructor is private. |
|
153 */ |
|
154 void ConstructL(); |
|
155 |
|
156 /** |
|
157 * From CPslnBaseView. |
|
158 */ |
|
159 void HandleListBoxStylusDown(); |
|
160 |
|
161 /** |
|
162 * From CPslnBaseView. |
|
163 */ |
|
164 void HandleListBoxStylusDrag(); |
|
165 |
|
166 |
|
167 private: // Data |
|
168 |
|
169 /** |
|
170 * Resource loader for common psln resources. |
|
171 */ |
|
172 RConeResourceLoader iResourceLoaderCommon; |
|
173 |
|
174 /** |
|
175 * Download item index. |
|
176 */ |
|
177 TInt iDownloadItemIndex; |
|
178 |
|
179 /** |
|
180 * What is current skin preview mode. |
|
181 * ETrue - preview is occuring. |
|
182 * EFalse - preview is ready / no skin preview active. |
|
183 */ |
|
184 TBool iPreviewMode; |
|
185 |
|
186 /** |
|
187 * Is delayed skin activation ongoing. |
|
188 * If user highlights a skin and immediately activates it, |
|
189 * preview is first done completely AND then skin activation |
|
190 * is handled. |
|
191 */ |
|
192 TBool iDelayedSkinActivation; |
|
193 |
|
194 /** |
|
195 * Index to be used when skin is activated AFTER skin preview. |
|
196 * This is needed due to that user might highlight some other skin |
|
197 * after having selected previous skin for activation. |
|
198 */ |
|
199 TInt iToBeActivatedSkinIndex; |
|
200 |
|
201 }; |
|
202 |
|
203 #endif // C_PSLNGENERALTHEMEVIEW_H |
|
204 |
|
205 // End of File |