|
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: |
|
15 * Mce delivery report view container control class implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __Mce_App_CMceDeliveryReportControlContainer_H__ |
|
22 #define __Mce_App_CMceDeliveryReportControlContainer_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <AknIconArray.h> |
|
26 #include <coecntrl.h> // CCoeControl |
|
27 |
|
28 #include <aknlists.h> // ListBox |
|
29 |
|
30 #include "MceDeliveryReportView.h" |
|
31 #include "MMceLogEngObserver.h" |
|
32 |
|
33 #include <bldvariant.hrh> |
|
34 #include <msvapi.h> |
|
35 |
|
36 |
|
37 //DATA TYPES |
|
38 enum TMceDeliveryReportsArrayIndexes |
|
39 { |
|
40 EMceDeliverySmsInfo = 0, |
|
41 EMceDeliveryMmsInfo |
|
42 }; |
|
43 |
|
44 |
|
45 // FORWARD DECLARATIONS |
|
46 |
|
47 class CAknTitlePane; |
|
48 class CEikStatusPane; |
|
49 class CAknContextPane; |
|
50 class CMceSessionHolder; |
|
51 |
|
52 // CLASS DECLARATION |
|
53 |
|
54 /** |
|
55 * Mce delivery report view container control class implementation. |
|
56 */ |
|
57 |
|
58 class CMceDeliveryReportControlContainer : public CCoeControl, |
|
59 public MCoeControlObserver, |
|
60 public MMceLogEngObserver |
|
61 { |
|
62 public: // interface |
|
63 /** |
|
64 * Standard creation function. |
|
65 * |
|
66 * @param aMceDeliveryReportView pointer to the owner of this object. |
|
67 * @return pointer to CMceDeliveryReportControlContainer instance. |
|
68 */ |
|
69 static CMceDeliveryReportControlContainer* NewL( |
|
70 CMceDeliveryReportView* aMceDeliveryReportView, |
|
71 CMceSessionHolder& aSessionHolder, |
|
72 const TRect& aRect ); |
|
73 |
|
74 /** |
|
75 * Destructor. |
|
76 */ |
|
77 ~CMceDeliveryReportControlContainer(); |
|
78 |
|
79 private: |
|
80 /** |
|
81 * Constructor. |
|
82 * |
|
83 * @param aMceDeliveryReportView pointer to the owner of this object. |
|
84 */ |
|
85 CMceDeliveryReportControlContainer( CMceDeliveryReportView* aMceDeliveryReportView, |
|
86 CMceSessionHolder& aSessionHolder ); |
|
87 |
|
88 /** |
|
89 * Second phase constructor. |
|
90 */ |
|
91 void ConstructL( const TRect& aRect ); |
|
92 |
|
93 public: |
|
94 /** |
|
95 * Returns ListBox control. |
|
96 * |
|
97 * @return Pointer to listbox control. |
|
98 */ |
|
99 CAknDoubleGraphicStyleListBox* ListBox() const; |
|
100 |
|
101 /** |
|
102 * Gets from the Shared Data the Current Call Meter value |
|
103 * |
|
104 * @return error code |
|
105 */ |
|
106 TInt LogDisabledL(); |
|
107 /** |
|
108 * Show 3.0 second long confirmation note to the user. |
|
109 */ |
|
110 void PopUpNoteL(); |
|
111 /** |
|
112 * Make the empty listbox text from the given resource text |
|
113 * |
|
114 * @param aListBox The listbox pointer on where to make the text |
|
115 * @param aResourceText The resource text |
|
116 */ |
|
117 void MakeEmptyTextListBoxL( CEikFormattedCellListBoxTypedef* aListBox, |
|
118 TInt aResourceText ); |
|
119 |
|
120 /** |
|
121 * From CAknAppUi |
|
122 */ |
|
123 void HandleResourceChange( TInt aType ); |
|
124 |
|
125 |
|
126 protected: // from CCoeControl |
|
127 /** |
|
128 * Handles this application view's command keys. Forwards other keys to |
|
129 * child control(s). |
|
130 * |
|
131 * @return EKeyWasConsumed if the keyboard event was consumed or |
|
132 * EKeyWasNotConsumed otherwise. |
|
133 */ |
|
134 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
135 TEventCode aType ); |
|
136 |
|
137 /** |
|
138 * Returns the count of child controls. |
|
139 * |
|
140 * @return number of the subcontrols. |
|
141 */ |
|
142 TInt CountComponentControls() const; |
|
143 |
|
144 /** |
|
145 * Returns the child controls at aIndex. |
|
146 * |
|
147 * @param aIndex index of the control |
|
148 * |
|
149 * @return Sub control from the aIndex. |
|
150 */ |
|
151 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
152 |
|
153 /** |
|
154 * Called when control's size changed. |
|
155 */ |
|
156 void SizeChanged(); |
|
157 |
|
158 /** |
|
159 * Draw the control's contents |
|
160 * |
|
161 * @param aRect Drawable area |
|
162 */ |
|
163 void Draw( const TRect& aRect ) const; |
|
164 |
|
165 |
|
166 /** |
|
167 * From CCoeControl |
|
168 */ |
|
169 void FocusChanged(TDrawNow aDrawNow); |
|
170 |
|
171 |
|
172 |
|
173 protected: // MCoeControlObserver |
|
174 /** |
|
175 * Handles event from observed control. |
|
176 * |
|
177 * @param aControl The control that sent the event. |
|
178 * @param aEventType The event type. |
|
179 */ |
|
180 void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType); |
|
181 |
|
182 private: // operations |
|
183 |
|
184 /** |
|
185 * Append icon to icon array. |
|
186 * |
|
187 * @param aId Icon id |
|
188 * @param aIcons Icon array |
|
189 * @param aIconFileWithPath Icon file name with path |
|
190 * @param aIconGraphicsIndex Picture index. |
|
191 * @param aIconGraphicsMaskIndex Mask index. |
|
192 */ |
|
193 void AddIconL( TAknsItemID aId, CAknIconArray* aIcons, |
|
194 const TDesC& aIconFileWithPath, |
|
195 TInt aIconGraphicsIndex, |
|
196 TInt aIconGraphicsMaskIndex ); |
|
197 |
|
198 private: // Commands |
|
199 |
|
200 |
|
201 |
|
202 /** |
|
203 * Change bitmaps when skin changes. |
|
204 */ |
|
205 void SkinBitmapChangesL( ); |
|
206 |
|
207 public: // From MMceLogEngObserver |
|
208 /** |
|
209 * Application's log engine calls this method when the listbox state has changed |
|
210 */ |
|
211 void MceLogEngineListBoxStateHasChangedL(); |
|
212 |
|
213 /** |
|
214 * From CCoeControl |
|
215 */ |
|
216 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
217 |
|
218 private: // data |
|
219 // Own: ListBox control |
|
220 CAknDoubleGraphicStyleListBox* iListBox; |
|
221 /// Ref: Pointer to the detail view. |
|
222 CMceDeliveryReportView* iMceDeliveryReportView; |
|
223 |
|
224 // security data caging |
|
225 TFileName iFilenameMuiu; |
|
226 TFileName iFilenameLog; |
|
227 CMceSessionHolder& iSessionHolder; |
|
228 }; |
|
229 |
|
230 #endif // __Mce_App_CMceDeliveryReportControlContainer_H__ |
|
231 |
|
232 // End of File |