1 /* |
|
2 * Copyright (c) 2007-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: Declarition of CAcpProviderListContainer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ACPPROVIDERLISTCONTAINER_H |
|
20 #define ACPPROVIDERLISTCONTAINER_H |
|
21 |
|
22 #include <coecntrl.h> |
|
23 |
|
24 class CFbsBitmap; |
|
25 class CAcpController; |
|
26 class CAknSettingStyleListBox; |
|
27 |
|
28 /** |
|
29 * CAcpProviderListContainer class |
|
30 * Declarition of CAcpProviderListContainer. |
|
31 * |
|
32 * @lib accountcreationplugin.lib |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CAcpProviderListContainer ) : public CCoeControl |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * |
|
42 * @param aController Plugins controller |
|
43 * @param aRect Rectangle |
|
44 */ |
|
45 static CAcpProviderListContainer* NewL( CAcpController& aController, |
|
46 const TRect& aRect ); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * |
|
51 * @param aController Plugins controller |
|
52 * @param aRect Rectangle |
|
53 */ |
|
54 static CAcpProviderListContainer* NewLC( CAcpController& aController, |
|
55 const TRect& aRect ); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 virtual ~CAcpProviderListContainer(); |
|
61 |
|
62 /** |
|
63 * Adds and updates listbox with providers. |
|
64 * |
|
65 * @since S60 v3.2 |
|
66 */ |
|
67 void AddProvidersToListboxL(); |
|
68 |
|
69 /** |
|
70 * Returns handle to the listbox. |
|
71 * |
|
72 * @since S60 v3.2 |
|
73 * @return handle to the listbox |
|
74 */ |
|
75 CAknSingleLargeStyleListBox* ListBox(); |
|
76 |
|
77 /** |
|
78 * Returns index of selected listbox item. |
|
79 * |
|
80 * @since S60 v3.2 |
|
81 * @return index of selected listbox item |
|
82 */ |
|
83 TInt CurrentItemIndex() const; |
|
84 |
|
85 /** |
|
86 * Loads provider icons. |
|
87 * |
|
88 * @since S60 v3.2 |
|
89 * @param aCount amount of providers |
|
90 */ |
|
91 void LoadProviderIconsL( TInt aCount ); |
|
92 |
|
93 /** |
|
94 * Resets listbox. |
|
95 * |
|
96 * @since S60 v3.2 |
|
97 */ |
|
98 void ResetListBox(); |
|
99 |
|
100 // from base class CCoeControl |
|
101 |
|
102 /** |
|
103 * From CCoeControl. |
|
104 */ |
|
105 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
106 |
|
107 /** |
|
108 * From CCoeControl. |
|
109 */ |
|
110 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
111 TEventCode aType ); |
|
112 |
|
113 private: |
|
114 |
|
115 CAcpProviderListContainer( CAcpController& aController ); |
|
116 void ConstructL( const TRect& aRect ); |
|
117 |
|
118 /** |
|
119 * Creates listbox item for provider list items. |
|
120 * |
|
121 * @since S60 v3.2 |
|
122 */ |
|
123 void ConstructListBoxL(); |
|
124 |
|
125 /** |
|
126 * Loads default icons. |
|
127 * |
|
128 * @since S60 v3.2 |
|
129 * @param aIconArray for icons |
|
130 */ |
|
131 void LoadDefaultIconsL( CArrayPtr<CGulIcon>* aIconArray ); |
|
132 |
|
133 // from base class CCoeControl |
|
134 |
|
135 /** |
|
136 * From CCoeControl. |
|
137 * Returns number of component controls. |
|
138 * |
|
139 * @since S60 v3.2 |
|
140 * @return Number of component controls. |
|
141 */ |
|
142 virtual TInt CountComponentControls() const; |
|
143 |
|
144 /** |
|
145 * From CCoeControl. |
|
146 * Informs that size has been changed. |
|
147 * |
|
148 * @since S60 v3.2 |
|
149 */ |
|
150 virtual void SizeChanged(); |
|
151 |
|
152 /** |
|
153 * From CoeControl. |
|
154 * Notifies that focus has been changed. |
|
155 * |
|
156 * @since S60 v3.2 |
|
157 * @param aDrawNow Tells if the window must be redrawn. |
|
158 */ |
|
159 virtual void FocusChanged( TDrawNow aDrawNow ); |
|
160 |
|
161 |
|
162 /** |
|
163 * From CoeControl. |
|
164 * Handles resource change. |
|
165 * Called by framework when the view layout is changed. |
|
166 * |
|
167 * @since S60 v3.2 |
|
168 * @param aType Type of resource. |
|
169 */ |
|
170 virtual void HandleResourceChange( TInt aType ); |
|
171 |
|
172 private: // data |
|
173 |
|
174 /** |
|
175 * Reference to plugins controller. |
|
176 */ |
|
177 CAcpController& iController; |
|
178 |
|
179 /** |
|
180 * Listbox for main view setting page items. |
|
181 * Own. |
|
182 */ |
|
183 CAknSingleLargeStyleListBox* iListBox; |
|
184 }; |
|
185 |
|
186 #endif // ACPPROVIDERLISTCONTAINER_H |
|
187 |
|
188 // End of file. |
|