|
1 /* |
|
2 * Copyright (c) 2005-2007 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: XDM GS plugin, Setting List class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CXDMPLUGINSETTINGLIST_H |
|
22 #define CXDMPLUGINSETTINGLIST_H |
|
23 |
|
24 // INCLUDE FILES |
|
25 #include <coecntrl.h> |
|
26 #include <aknsettingitemlist.h> |
|
27 #include <agentdialog.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CSettingsData; |
|
31 |
|
32 /** |
|
33 * CXDMPluginSettinglist derived from CAknSettingItemList |
|
34 */ |
|
35 class CXDMPluginSettinglist : public CAknSettingItemList |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Symbian OS two-phased constructor |
|
42 * @param reference to CSettingsData from which data to be displayed |
|
43 */ |
|
44 static CXDMPluginSettinglist* NewL(CSettingsData &aData); |
|
45 |
|
46 /** |
|
47 * Symbian OS two-phased constructor, leave pointer to stack |
|
48 * @param reference to CSettingsData from which data to be displayed |
|
49 */ |
|
50 static CXDMPluginSettinglist* NewLC(CSettingsData &aData); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CXDMPluginSettinglist(); |
|
56 |
|
57 /** |
|
58 * Inherited from base classes. See CCoeControl |
|
59 */ |
|
60 void SizeChanged(); |
|
61 |
|
62 /** |
|
63 * Edit the indexed item. This probably came as a result of UI command |
|
64 * @param aIndex index to the item |
|
65 * aCalledFromMenu ETrue of this call resulted from UI command |
|
66 */ |
|
67 void EditItemL (TInt aIndex, TBool aCalledFromMenu); |
|
68 |
|
69 /** |
|
70 * Actual editing of item done here, from whereever the call is made from |
|
71 */ |
|
72 void EditCurrentItemL(); |
|
73 |
|
74 /** |
|
75 * Gets the Access point name |
|
76 * @param aAP Access point number as integer |
|
77 * aAccessPoint reference to TDes, doesnt change if AP not found |
|
78 * otherwise access point name returns here |
|
79 */ |
|
80 void GetAccessPointNameL(TInt32 aAP, TDes& aAccessPoint); |
|
81 |
|
82 /** |
|
83 * Sets the focus to the first item of the settings list |
|
84 */ |
|
85 void ResetItemIndex(); |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * C++ constructor |
|
91 * @param reference to CSettingsData |
|
92 */ |
|
93 CXDMPluginSettinglist(CSettingsData &aData); |
|
94 |
|
95 /** |
|
96 * See CAknSettingItemList |
|
97 */ |
|
98 CAknSettingItem* CreateSettingItemL (TInt aSettingId); |
|
99 |
|
100 /** |
|
101 * Edit the AccessPoint, We edit the access point differently than other |
|
102 * settings. We bypass the list's text editor and open the S60 standard |
|
103 * access point editor |
|
104 */ |
|
105 void EditAccessPointL(); |
|
106 |
|
107 /** |
|
108 * Saves the changed settings to the list's data |
|
109 * @param aIndex index of the setting to be saved |
|
110 */ |
|
111 void SaveSettingL(TInt aIndex); |
|
112 |
|
113 /** |
|
114 * Sets the title pane text with given discriptor |
|
115 * @param aTitleText text to be shown on title pane |
|
116 */ |
|
117 void SetTitlePaneTextL( const TDesC& aTitleText ) const; |
|
118 |
|
119 private: |
|
120 |
|
121 // Reference to the data owned by container |
|
122 CSettingsData& iSettingsData; |
|
123 |
|
124 }; |
|
125 |
|
126 #endif // CXDMPLUGINSETTINGLIST_H |