1 /* |
|
2 * Copyright (c) 2002 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: container control class |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CONNECTIONMONITORUICONTAINER_H |
|
21 #define CONNECTIONMONITORUICONTAINER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <AknUtils.h> |
|
25 #include "ConnectionMonitorUiAppUi.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CConnectionArray; |
|
29 class RConnectionMonitor; |
|
30 class CAknNavigationDecorator; |
|
31 class CAknNavigationControlContainer; |
|
32 class CActiveWrapper; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * CConnectionMonitorUiContainer container control class. |
|
37 */ |
|
38 class CConnectionMonitorUiContainer : public CCoeControl, |
|
39 public MActiveEventObserverInterface |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * Constructor |
|
44 * @param aConnectionArray array contains connection infos |
|
45 * @param aMonitor to handlin connection details |
|
46 * @param aActiveWrapper the for refreshing |
|
47 */ |
|
48 CConnectionMonitorUiContainer( |
|
49 CConnectionArray* const aConnectionArray, |
|
50 RConnectionMonitor* aMonitor, |
|
51 CActiveWrapper* aActiveWrapper ); |
|
52 |
|
53 /** |
|
54 * Second phase constructor. |
|
55 * @param aSelectedItem index of selected item in the list |
|
56 * @param aRect Frame rectangle for container. |
|
57 */ |
|
58 void ConstructL( TInt aSelectedItem, const TRect& aRect ); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 ~CConnectionMonitorUiContainer(); |
|
64 |
|
65 public: // Functions from base classes |
|
66 |
|
67 /** |
|
68 * From CCoeControl, gets the control's help context. |
|
69 * @param aContext help context. |
|
70 */ |
|
71 virtual void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
72 |
|
73 /** |
|
74 * From CoeControl OfferKeyEventL. |
|
75 */ |
|
76 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
77 TEventCode aType ); |
|
78 |
|
79 /** |
|
80 * From CoeControl,CountComponentControls. |
|
81 */ |
|
82 TInt CountComponentControls() const; |
|
83 |
|
84 /** |
|
85 * From CCoeControl, ComponentControl. |
|
86 */ |
|
87 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
88 |
|
89 /** |
|
90 * From CCoeControl |
|
91 */ |
|
92 void HandleResourceChange( TInt aType ) ; |
|
93 |
|
94 public: |
|
95 /** |
|
96 * from MActiveEventObserverInterface |
|
97 */ |
|
98 void OnEventL( const CConnMonEventBase& aConnMonEvent, |
|
99 const TInt aIndex ); |
|
100 /** |
|
101 * from MActiveEventObserverInterface |
|
102 */ |
|
103 void OnTimerEventL(); |
|
104 |
|
105 /** |
|
106 * Returns the item index of selected connection |
|
107 * @return index of selected connection |
|
108 */ |
|
109 TInt SelectedConnection(); |
|
110 |
|
111 /** |
|
112 * Close the selected connection. |
|
113 */ |
|
114 void EndConnectionL(); |
|
115 |
|
116 /** |
|
117 * Close all connection |
|
118 */ |
|
119 void EndAllConnectionL(); |
|
120 |
|
121 /** |
|
122 * Returns pointer to the listbox. |
|
123 * @return pointer to the listbox. |
|
124 */ |
|
125 CAknDoubleGraphicStyleListBox* ListBox() const; |
|
126 |
|
127 /** |
|
128 * Refresh the content of Navi pane and |
|
129 * Push it to stack. Called by View DoActivateL() |
|
130 */ |
|
131 void PushAndRefreshNaviPaneL(); |
|
132 |
|
133 /** |
|
134 * Pop and destroy the NaviPane from stack. |
|
135 * Called by View DoDeactivateL() |
|
136 */ |
|
137 void PopNaviPane(); |
|
138 |
|
139 /** |
|
140 * Called by HandleForegroundEventL, draw all item of list box. |
|
141 */ |
|
142 void DrawFirstAllListBoxItem(); |
|
143 |
|
144 protected: |
|
145 /** |
|
146 * From CoeControl,SizeChanged. |
|
147 */ |
|
148 void SizeChanged(); |
|
149 |
|
150 /** |
|
151 * From CoeControl,SizeChanged. |
|
152 */ |
|
153 virtual void FocusChanged(TDrawNow aDrawNow); |
|
154 |
|
155 protected: // New functions |
|
156 /** |
|
157 * Sets the icons of listbox |
|
158 */ |
|
159 void SetIconsL(); |
|
160 |
|
161 /** |
|
162 * Gets the title panes. |
|
163 */ |
|
164 void GetPanesL(); |
|
165 |
|
166 protected: // data |
|
167 /** |
|
168 * List box contains connection items |
|
169 */ |
|
170 CAknDoubleGraphicStyleListBox* iListBox; |
|
171 |
|
172 /** |
|
173 * To handling details of connections |
|
174 */ |
|
175 RConnectionMonitor* iMonitor; |
|
176 |
|
177 /** |
|
178 * Contains connections info |
|
179 */ |
|
180 CConnectionArray* const iConnectionArray; |
|
181 |
|
182 /** |
|
183 * Owned. For NaviPane. |
|
184 */ |
|
185 CAknNavigationDecorator* iNaviDecorator; |
|
186 |
|
187 /** |
|
188 * Not Owned. For NaviPane. |
|
189 */ |
|
190 CAknNavigationControlContainer* iNaviPane; |
|
191 |
|
192 private: // data |
|
193 |
|
194 /** |
|
195 * ETrue if Wlan connection is supported, EFalse otherwise. |
|
196 */ |
|
197 TBool isWlanSupported; |
|
198 |
|
199 /** |
|
200 * The active object for info. refreshing. NOT Owned. |
|
201 */ |
|
202 CActiveWrapper* iActiveWrapper; |
|
203 |
|
204 /** |
|
205 * Connection count |
|
206 */ |
|
207 TInt iOldConnectionCount; |
|
208 |
|
209 /** |
|
210 * Set when main view list comes to focus |
|
211 */ |
|
212 TBool iFocusChanged; |
|
213 }; |
|
214 |
|
215 #endif // CONNECTIONMONITORUICONTAINER_H |
|
216 |
|
217 // End of File |
|