|
1 /* |
|
2 * Copyright (c) 2006-2009 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: CSettingItemList implemets the settings list for Conntest |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "SettingItemList.h" |
|
20 #include "SettingData.h" |
|
21 #include "conntest.hrh" |
|
22 |
|
23 |
|
24 // ================= MEMBER FUNCTIONS ========================================= |
|
25 |
|
26 // ---------------------------------------------------------------------------- |
|
27 // CSettingItemList::CreateSettingItemL |
|
28 // Updates descripter array for list box |
|
29 // ---------------------------------------------------------------------------- |
|
30 // |
|
31 CAknSettingItem* CSettingItemList::CreateSettingItemL( TInt aIdentifier ) |
|
32 { |
|
33 CAknSettingItem* settingItem = NULL; |
|
34 |
|
35 switch (aIdentifier) |
|
36 { |
|
37 case EConnTestIpAddress: |
|
38 settingItem = new (ELeave) |
|
39 CAknTextSettingItem(aIdentifier, iData->iServerName ); |
|
40 break; |
|
41 case EConnTestPort: |
|
42 settingItem = new (ELeave) |
|
43 CAknIntegerEdwinSettingItem(aIdentifier, iData->iPort ); |
|
44 break; |
|
45 case EConnTestHttpPage: |
|
46 settingItem = new (ELeave) |
|
47 CAknTextSettingItem(aIdentifier, iData->iHttpPage); |
|
48 break; |
|
49 case EConnTestProtocol: |
|
50 settingItem = new (ELeave) CAknEnumeratedTextPopupSettingItem( |
|
51 aIdentifier, iData->iProtocol ); |
|
52 break; |
|
53 case EConnTestPacketSize: |
|
54 settingItem = new (ELeave) |
|
55 CAknIntegerEdwinSettingItem(aIdentifier, iData->iPacketSize ); |
|
56 break; |
|
57 case EConnTestPackets: |
|
58 settingItem = new (ELeave) |
|
59 CAknIntegerEdwinSettingItem(aIdentifier, iData->iPackets ); |
|
60 break; |
|
61 case EConnTestDelay: |
|
62 settingItem = new (ELeave) |
|
63 CAknIntegerEdwinSettingItem(aIdentifier, iData->iDelay ); |
|
64 break; |
|
65 case EConnTestRoaming: |
|
66 settingItem = new (ELeave) CAknEnumeratedTextPopupSettingItem( |
|
67 aIdentifier, iData->iRoaming ); |
|
68 break; |
|
69 default: |
|
70 break; |
|
71 } |
|
72 return settingItem; |
|
73 } |
|
74 |
|
75 // ---------------------------------------------------------------------------- |
|
76 // CSettingItemList::SetData |
|
77 // |
|
78 // ---------------------------------------------------------------------------- |
|
79 // |
|
80 void CSettingItemList::SetData(CSettingData* aData) |
|
81 { |
|
82 iData = aData; |
|
83 } |
|
84 |
|
85 // ---------------------------------------------------------------------------- |
|
86 // CSettingItemList::SizeChanged |
|
87 // Size changed handler |
|
88 // ---------------------------------------------------------------------------- |
|
89 // |
|
90 void CSettingItemList::SizeChanged() |
|
91 { |
|
92 if (ListBox()) |
|
93 { |
|
94 ListBox()->SetRect(Rect()); |
|
95 } |
|
96 } |
|
97 |
|
98 // End of File |