|
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 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 * @return new instance of CPslnGeneralThemeView. |
|
41 */ |
|
42 static CPslnGeneralThemeView* NewLC(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CPslnGeneralThemeView(); |
|
48 |
|
49 /** |
|
50 * From CAknView. |
|
51 * Returns view id. |
|
52 * @return An unsigned integer (view id). |
|
53 */ |
|
54 TUid Id() const; |
|
55 |
|
56 /** |
|
57 * From MEikCommandObserver. |
|
58 * Handles commands. |
|
59 * @param aCommand Command to be handled. |
|
60 */ |
|
61 void HandleCommandL( TInt aCommand ); |
|
62 |
|
63 /** |
|
64 * Requests container to update skin data. |
|
65 * @param aCurrentIndex Current item index. If -1, remain old index. |
|
66 */ |
|
67 void UpdateSkinListItemsL( TInt aCurrentIndex = KErrNotFound ); |
|
68 |
|
69 /** |
|
70 * hightlight default skin. |
|
71 */ |
|
72 void HightlightDefaultSkin(); |
|
73 |
|
74 /** |
|
75 * From MPslnFWMSKObserver. |
|
76 * Checks if the MSK label needs to be adjusted. |
|
77 */ |
|
78 void CheckMiddleSoftkeyLabelL(); |
|
79 |
|
80 /** |
|
81 * Requests container to update skin data. |
|
82 */ |
|
83 void UpdateSkinListItemsDColumnOnlyL(); |
|
84 |
|
85 private: |
|
86 |
|
87 /** |
|
88 * From CAknView. |
|
89 */ |
|
90 void DoActivateL( |
|
91 const TVwsViewId& aPrevViewId, |
|
92 TUid aCustomMessageId, |
|
93 const TDesC8& aCustomMessage ); |
|
94 |
|
95 /** |
|
96 * From CAknView. |
|
97 */ |
|
98 void DoDeactivate(); |
|
99 |
|
100 /** |
|
101 * From MEikMenuObserver. |
|
102 * Changes MenuPane dynamically. |
|
103 */ |
|
104 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
105 |
|
106 /** |
|
107 * From CPslnBaseView. |
|
108 */ |
|
109 void HandleListBoxSelectionL(); |
|
110 |
|
111 /** |
|
112 * From CPslnBaseView. |
|
113 */ |
|
114 void NewContainerL(); |
|
115 |
|
116 /** |
|
117 * From CPslnBaseView. |
|
118 */ |
|
119 void SetTitlePaneL( TInt& aResourceId ); |
|
120 |
|
121 /* Remove command and label from MSK */ |
|
122 void RemoveCommandFromMSK(); |
|
123 |
|
124 /** |
|
125 * C++ default constructor. |
|
126 */ |
|
127 CPslnGeneralThemeView(); |
|
128 |
|
129 /** |
|
130 * By default Symbian 2nd phase constructor is private. |
|
131 */ |
|
132 void ConstructL(); |
|
133 |
|
134 |
|
135 private: // Data |
|
136 |
|
137 /** |
|
138 * Resource loader for common psln resources. |
|
139 */ |
|
140 RConeResourceLoader iResourceLoaderCommon; |
|
141 |
|
142 /** |
|
143 * Download item index. |
|
144 */ |
|
145 TInt iDownloadItemIndex; |
|
146 |
|
147 /** |
|
148 * Index to be used when skin is activated AFTER skin preview. |
|
149 * This is needed due to that user might highlight some other skin |
|
150 * after having selected previous skin for activation. |
|
151 */ |
|
152 TInt iToBeActivatedSkinIndex; |
|
153 |
|
154 }; |
|
155 |
|
156 #endif // C_PSLNGENERALTHEMEVIEW_H |
|
157 |
|
158 // End of File |