|
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 #ifndef CONNECTIONMONITORUIDETAILSCONTAINER_H |
|
20 #define CONNECTIONMONITORUIDETAILSCONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknlists.h> |
|
24 #include "ConnectionMonitorUiAppUi.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CConnectionArray; |
|
28 class CAknNavigationDecorator; |
|
29 class CAknNavigationControlContainer; |
|
30 class CConnectionMonitorUiDetailsView; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /** |
|
34 * CConnectionMonitorUiDetailsContainer container control class. |
|
35 */ |
|
36 class CConnectionMonitorUiDetailsContainer : |
|
37 public CCoeControl, |
|
38 public MActiveEventObserverInterface, |
|
39 public MAknNaviDecoratorObserver |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * Constructor |
|
44 * @param aConnectionArray array containing connection list |
|
45 */ |
|
46 CConnectionMonitorUiDetailsContainer( |
|
47 const CConnectionArray* const aConnectionArray ); |
|
48 |
|
49 /** |
|
50 * EPOC second-phase constructor. |
|
51 * @param aRect Frame rectangle for container. |
|
52 * @param aParentView ParentView of the container |
|
53 */ |
|
54 void ConstructL( const TRect& aRect, |
|
55 CConnectionMonitorUiDetailsView* aParentView ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CConnectionMonitorUiDetailsContainer(); |
|
61 |
|
62 public: // New functions |
|
63 /** |
|
64 * Sets iConnectionInfo and iConnectionId to the selected |
|
65 * connection |
|
66 * @param aConnectionIndex the index of selected connection |
|
67 */ |
|
68 void SetSelectedConnectionL( TUint aConnectionIndex ); |
|
69 |
|
70 /** |
|
71 * Returns pointer to the listbox. |
|
72 * @return pointer to the listbox. |
|
73 */ |
|
74 CAknSingleHeadingStyleListBox* ListBox() const; |
|
75 |
|
76 /** |
|
77 * Refresh the content of Navi pane and |
|
78 * Push it to stack. Called by View DoActivateL() |
|
79 */ |
|
80 void PushAndRefreshNaviPaneL(); |
|
81 |
|
82 /** |
|
83 * Pop the NaviPane from stack. Called by View DoDeactivateL() |
|
84 */ |
|
85 void PopNaviPane(); |
|
86 |
|
87 |
|
88 public: |
|
89 /** |
|
90 * Handler for pointer events, when the Navi Pane arrows have been tapped (from MAknNaviDecoratorObserver) |
|
91 * |
|
92 * @param aEventID The enum indicating wether right or left arrow was tapped |
|
93 */ |
|
94 void HandleNaviDecoratorEventL( TInt aEventID ); |
|
95 |
|
96 /** |
|
97 * from MActiveEventObserverInterface |
|
98 */ |
|
99 virtual void OnEventL( const CConnMonEventBase& aConnMonEvent, |
|
100 const TInt aIndex ); |
|
101 |
|
102 /** |
|
103 * from MActiveEventObserverInterface |
|
104 */ |
|
105 void OnTimerEventL(); |
|
106 |
|
107 /** |
|
108 * From CCoeControl |
|
109 */ |
|
110 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
111 TEventCode aType ); |
|
112 |
|
113 /** |
|
114 * Called by HandleForegroundEventL, draw all item of list box. |
|
115 */ |
|
116 void DrawFirstAllListBoxItem(); |
|
117 |
|
118 /** |
|
119 * From CCoeControl,ComponentControl. |
|
120 */ |
|
121 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
122 |
|
123 /** |
|
124 * From CCoeControl, used for sclable ui and landscape support. |
|
125 */ |
|
126 void HandleResourceChange( TInt aType ); |
|
127 |
|
128 /** |
|
129 * Gets index of the selected item |
|
130 * @return the index of selected item |
|
131 */ |
|
132 TInt GetIndexOfSelectedItem(); |
|
133 |
|
134 /** |
|
135 * Gets iConnectionInfo of the selected connection |
|
136 * @return CConnectionInfoBase* pointer to the connection info object |
|
137 */ |
|
138 CConnectionInfoBase* GetSelectedConnectionInfo() const; |
|
139 |
|
140 protected: |
|
141 /** |
|
142 * Gets the title panes. |
|
143 */ |
|
144 void GetPanesL(); |
|
145 |
|
146 private: // Functions from base classes |
|
147 /** |
|
148 * From CoeControl,SizeChanged. |
|
149 */ |
|
150 void SizeChanged(); |
|
151 |
|
152 /** |
|
153 * From CoeControl,CountComponentControls. |
|
154 */ |
|
155 TInt CountComponentControls() const; |
|
156 |
|
157 /** |
|
158 * From CoeControl,SizeChanged. |
|
159 */ |
|
160 virtual void FocusChanged(TDrawNow aDrawNow); |
|
161 |
|
162 protected: // data |
|
163 /** |
|
164 * Listbox contains details a connection |
|
165 */ |
|
166 CAknSingleHeadingStyleListBox* iListBox; |
|
167 |
|
168 /** |
|
169 * Refers to the current selected connection |
|
170 */ |
|
171 CConnectionInfoBase* iConnectionInfo; // Not Owned. |
|
172 |
|
173 /** |
|
174 * The index of selected connection |
|
175 */ |
|
176 TUint iConnectionIndex; |
|
177 |
|
178 /** |
|
179 * A pointer to connections array |
|
180 */ |
|
181 const CConnectionArray* const iConnectionArray; // Not Owned. |
|
182 |
|
183 /** |
|
184 * Owned. For NaviPane. |
|
185 */ |
|
186 CAknNavigationDecorator* iNaviDecorator; |
|
187 |
|
188 /** |
|
189 * Not Owned. For NaviPane. |
|
190 */ |
|
191 CAknNavigationControlContainer* iNaviPane; |
|
192 |
|
193 /** |
|
194 * Not Owned. A pointer to DetailsView |
|
195 */ |
|
196 CConnectionMonitorUiDetailsView* iParentView; // Not Owned. |
|
197 }; |
|
198 |
|
199 #endif |
|
200 |
|
201 // End of File |