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 for Active Idle skinning. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_PSLNACTIVEIDLEPLUGIN_H |
|
20 #define C_PSLNACTIVEIDLEPLUGIN_H |
|
21 |
|
22 #include <aknsettingpage.h> |
|
23 #include <pslnfwbaseview.h> |
|
24 #include <coneresloader.h> |
|
25 #include <pslnfwplugininterface.h> |
|
26 #include <mpslnfwmsklabelobserver.h> |
|
27 |
|
28 |
|
29 class CAknViewAppUi; |
|
30 class CPslnActiveIdlePluginContainer; |
|
31 class CPslnActiveIdlePluginEngine; |
|
32 |
|
33 enum TAiUIControllers |
|
34 { |
|
35 EAiUICUnknown = -1, |
|
36 EAiUICNative = 0, |
|
37 EAiUICXML |
|
38 }; |
|
39 |
|
40 // View item text length |
|
41 const TInt KPslnItemMaxTextLength = 128; |
|
42 |
|
43 |
|
44 /** |
|
45 * CPslnActiveIdlePlugin view class for Active Idle Theme settings |
|
46 * |
|
47 * @since S60 3.2 |
|
48 */ |
|
49 class CPslnActiveIdlePlugin : |
|
50 public CPslnFWBaseView, |
|
51 public MPslnFWMSKObserver |
|
52 { |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Symbian OS two-phased constructor |
|
57 * |
|
58 * @param aAppUi pointer to app ui, TAny static cast'd. |
|
59 * @return Psln AI skinning view. |
|
60 */ |
|
61 static CPslnActiveIdlePlugin* NewL(TAny* aAppUi); |
|
62 |
|
63 /** |
|
64 * Destructor |
|
65 */ |
|
66 ~CPslnActiveIdlePlugin(); |
|
67 |
|
68 // From CPslnFWnInterface |
|
69 |
|
70 /** |
|
71 * @see CPslnFWPluginInterface. |
|
72 */ |
|
73 void GetCaptionL(TDes& aCaption) const; |
|
74 |
|
75 |
|
76 /** |
|
77 * @see CPslnFWPluginInterface. |
|
78 */ |
|
79 void GetTabTextL(TDes& aCaption) const; |
|
80 |
|
81 /** |
|
82 * @see CPslnFWPluginInterface. |
|
83 */ |
|
84 CGulIcon* CreateIconL(); |
|
85 |
|
86 /** |
|
87 * @see CPslnFWPluginInterface. |
|
88 */ |
|
89 void GetLocationTypeAndIndex(TPslnFWLocationType& aType, TInt& aIndex) const; |
|
90 |
|
91 // from AknView |
|
92 |
|
93 /** |
|
94 * Returns view id. |
|
95 * @return TUid |
|
96 */ |
|
97 TUid Id() const; |
|
98 |
|
99 /** |
|
100 * Handles commands. |
|
101 * @param aCommand Command to be handled. |
|
102 */ |
|
103 void HandleCommandL(TInt aCommand); |
|
104 |
|
105 // new methods |
|
106 |
|
107 /** |
|
108 * Get CPslnActiveIdlePlugin's ccontainer. |
|
109 * @return pointer to container. |
|
110 */ |
|
111 CPslnActiveIdlePluginContainer* Container(); |
|
112 |
|
113 /** |
|
114 * From MPslnFWMSKObserver. |
|
115 * Checks if the MSK label needs to be adjusted. |
|
116 */ |
|
117 void CheckMiddleSoftkeyLabelL(); |
|
118 |
|
119 /** |
|
120 * Return engine instance. |
|
121 */ |
|
122 CPslnActiveIdlePluginEngine* Engine(); |
|
123 |
|
124 protected: // From CAknView |
|
125 |
|
126 void DoActivateL( |
|
127 const TVwsViewId& aPrevViewId, |
|
128 TUid aCustomMessageId, |
|
129 const TDesC8& aCustomMessage); |
|
130 |
|
131 void DoDeactivate(); |
|
132 |
|
133 // Construction |
|
134 |
|
135 CPslnActiveIdlePlugin(CAknViewAppUi* aAppUi); |
|
136 |
|
137 void ConstructL(); |
|
138 |
|
139 private: // From MEikMenuObserver |
|
140 |
|
141 /** |
|
142 * Changes MenuPane dynamically |
|
143 */ |
|
144 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
145 |
|
146 // from CPslnFWBaseView |
|
147 |
|
148 void NewContainerL(); |
|
149 |
|
150 void HandleListBoxSelectionL(); |
|
151 |
|
152 /** |
|
153 * Remove command and label from MSK |
|
154 */ |
|
155 void RemoveCommandFromMSK(); |
|
156 |
|
157 /** |
|
158 * @see CPslnFWBaseView. |
|
159 */ |
|
160 void SetTitlePaneL( TInt& aResourceId ); |
|
161 |
|
162 private: // data |
|
163 |
|
164 /// Resource loader for own resources. |
|
165 RConeResourceLoader iResourceLoader; |
|
166 |
|
167 /// Resource loader for common psln resources. |
|
168 RConeResourceLoader iResourceLoaderCommon; |
|
169 |
|
170 /// Resource loader for Psln app resources. |
|
171 RConeResourceLoader iResourceLoaderPsln; |
|
172 |
|
173 /// Application UI pointer. Not owned. |
|
174 CAknViewAppUi* iAppUi; |
|
175 |
|
176 /// Navi pane. Not owned. |
|
177 CAknNavigationDecorator* iNaviPaneContext; |
|
178 |
|
179 /// Ai2 perso engine |
|
180 CPslnActiveIdlePluginEngine* iEngine; |
|
181 |
|
182 }; |
|
183 |
|
184 #endif // C_PSLNACTIVEIDLEPLUGIN_H |
|
185 |
|
186 // End of File. |
|