|
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: Wallpaper view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPSLNWALLPAPERVIEW_H |
|
21 #define CPSLNWALLPAPERVIEW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "PslnBaseView.h" |
|
25 #include <cenrepnotifyhandler.h> |
|
26 #include <mpslnfwmsklabelobserver.h> |
|
27 |
|
28 class CRepository; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Wallpaper view within personalization application. |
|
34 * Possible to define current Idle background image. |
|
35 * |
|
36 * @since S60 v3.1 |
|
37 */ |
|
38 class CPslnWallpaperView : public CPslnBaseView, |
|
39 public MCenRepNotifyHandlerCallback, |
|
40 public MPslnFWMSKObserver |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * @return new instance of CPslnWallpaperView. |
|
47 */ |
|
48 static CPslnWallpaperView* NewLC(); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CPslnWallpaperView(); |
|
54 |
|
55 /** |
|
56 * From CAknView. |
|
57 * Returns view id. |
|
58 * @return An unsigned integer (view id). |
|
59 */ |
|
60 TUid Id() const; |
|
61 |
|
62 /** |
|
63 * From MEikCommandObserver. |
|
64 * Handles commands. |
|
65 * @param aCommand Command to be handled. |
|
66 */ |
|
67 void HandleCommandL( TInt aCommand ); |
|
68 |
|
69 /** |
|
70 * From MPslnFWMSKObserver. |
|
71 * Checks if the MSK label needs to be adjusted. |
|
72 */ |
|
73 void CheckMiddleSoftkeyLabelL(); |
|
74 |
|
75 private: |
|
76 |
|
77 /* From MCenRepNotifyHandlerCallback. */ |
|
78 void HandleNotifyInt( TUint32 aId, TInt aNewValue ); |
|
79 |
|
80 /* From MCenRepNotifyHandlerCallback. */ |
|
81 void HandleNotifyGeneric( TUint32 aId ); |
|
82 |
|
83 /* From MCenRepNotifyHandlerCallback. */ |
|
84 void HandleNotifyError( |
|
85 TUint32 aId, |
|
86 TInt aError, |
|
87 CCenRepNotifyHandler* aHandler ); |
|
88 |
|
89 /* From CAknView. */ |
|
90 void DoActivateL( |
|
91 const TVwsViewId& aPrevViewId, |
|
92 TUid aCustomMessageId, |
|
93 const TDesC8& aCustomMessage ); |
|
94 |
|
95 /** |
|
96 * From MEikMenuObserver. |
|
97 * Changes MenuPane dynamically. |
|
98 */ |
|
99 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
100 |
|
101 /* From CPslnBaseView. */ |
|
102 void HandleListBoxSelectionL(); |
|
103 |
|
104 /** |
|
105 * From CPslnBaseView. |
|
106 */ |
|
107 void HandleListBoxItemHighlightL(); |
|
108 |
|
109 /* From CPslnBaseView. */ |
|
110 void NewContainerL(); |
|
111 |
|
112 /* From CPslnBaseView. */ |
|
113 void SetTitlePaneL( TInt& aResourceId ); |
|
114 |
|
115 /* From CPslnBaseView. */ |
|
116 TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId ); |
|
117 |
|
118 /** |
|
119 * C++ default constructor. |
|
120 */ |
|
121 CPslnWallpaperView(); |
|
122 |
|
123 /** |
|
124 * By default Symbian 2nd phase constructor is private. |
|
125 */ |
|
126 void ConstructL(); |
|
127 |
|
128 /* Shows MGFetch query */ |
|
129 TBool ShowBackgroundImageListL(); |
|
130 |
|
131 /* Request container to update itself. */ |
|
132 void UpdateContainer(); |
|
133 |
|
134 /* Remove command and label from MSK */ |
|
135 void RemoveCommandFromMSK(); |
|
136 |
|
137 /* Updates current item. */ |
|
138 TInt UpdateCurrentItem(); |
|
139 |
|
140 private: // data |
|
141 |
|
142 /** |
|
143 * Personalization repository that contains wallpaper image path. |
|
144 * Own. |
|
145 */ |
|
146 CRepository* iWallpaperRepository; |
|
147 |
|
148 /** |
|
149 * Notifier for changes in the above repository. |
|
150 * Own. |
|
151 */ |
|
152 CCenRepNotifyHandler* iWallpaperNotifier; |
|
153 |
|
154 // Currently active wallpaper type. |
|
155 TInt iActiveWallpaper; |
|
156 |
|
157 /** |
|
158 * Ture if Wallpaper Setting Dialog is Running. |
|
159 */ |
|
160 TBool iWpDlgRunnig; |
|
161 }; |
|
162 |
|
163 #endif // CPSLNWALLPAPERVIEW_H |
|
164 |
|
165 // End of File |