|
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 * A dialog for adding new and editing old service centres. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef SMUMSERVICECENTREITEMDIALOG_H |
|
22 #define SMUMSERVICECENTREITEMDIALOG_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <AknForm.h> // CAknDialog |
|
26 #include <eiklbo.h> // MEikListBoxObserver |
|
27 |
|
28 #include <bldvariant.hrh> |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // MACROS |
|
33 |
|
34 // DATA TYPES |
|
35 enum TSmumServiceCentreItemIndex |
|
36 { |
|
37 ESmumServiceCentreName = 0, |
|
38 ESmumServiceCentreNumber = 1 |
|
39 }; |
|
40 |
|
41 // FUNCTION PROTOTYPES |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 class CMuiuSettingsArray; |
|
45 class CEikTextListBox; |
|
46 class CSmsSettings; |
|
47 class CAknTitlePane; |
|
48 class CSmumSCArray; |
|
49 |
|
50 // CLASS DECLARATION |
|
51 |
|
52 /** |
|
53 * SMUM's main sms settings dialog. |
|
54 */ |
|
55 NONSHARABLE_CLASS( CSmumAddEditServiceCentreDialog ): |
|
56 public CAknDialog, |
|
57 public MEikListBoxObserver |
|
58 { |
|
59 public: // Constructors and destructor |
|
60 |
|
61 /** |
|
62 * Constructor. |
|
63 */ |
|
64 CSmumAddEditServiceCentreDialog( |
|
65 TDes& aName, |
|
66 TDes& aNumber, |
|
67 TInt& aExitCode, |
|
68 TBool aHelpFeatureSupported, |
|
69 CSmumSCArray* aSCDlgsAddressesList = NULL, |
|
70 TBool aSimSCsOnly = EFalse ); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 ~CSmumAddEditServiceCentreDialog(); |
|
76 |
|
77 protected: // Functions from base classes |
|
78 |
|
79 /** |
|
80 * From CAknDialog |
|
81 */ |
|
82 void ProcessCommandL(TInt aCommandId); |
|
83 |
|
84 /** |
|
85 * From CEikDialog |
|
86 */ |
|
87 void PreLayoutDynInitL(); |
|
88 |
|
89 /** |
|
90 * From CEikDialog |
|
91 */ |
|
92 TBool OkToExitL(TInt aButtonId); |
|
93 |
|
94 /** |
|
95 * From MEikListBoxObserver |
|
96 */ |
|
97 void HandleListBoxEventL( |
|
98 CEikListBox* aListBox, |
|
99 TListBoxEvent aEventType); |
|
100 |
|
101 /** |
|
102 * From CAknDialog |
|
103 */ |
|
104 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
105 |
|
106 /** |
|
107 * From CAknDialog |
|
108 */ |
|
109 void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane); |
|
110 |
|
111 /** |
|
112 * From CCoeControl, returns help context |
|
113 */ |
|
114 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
115 |
|
116 private: // New functions |
|
117 |
|
118 /** |
|
119 * Updating the array with new values from dialog's list boxes. |
|
120 * @param none |
|
121 * @return TBool |
|
122 */ |
|
123 TBool ClosingSCItemDialogL(); |
|
124 |
|
125 /** |
|
126 * Prepare to open needed setting page |
|
127 * @param TBool aEnterPressed |
|
128 * @return nothing |
|
129 */ |
|
130 void OpenSettingPageL(TBool aEnterPressed); |
|
131 |
|
132 /** |
|
133 * Open settingpage for editing name, update title if necessary |
|
134 * @param TBool aEnterPressed |
|
135 * @param TInt aIndex |
|
136 * @return nothing |
|
137 */ |
|
138 void ModifyScNameL(TBool aEnterPressed, TInt aIndex); |
|
139 |
|
140 /** |
|
141 * Open settingpage for editing number |
|
142 * @param TBool aEnterPressed |
|
143 * @param TInt aIndex |
|
144 * @return nothing |
|
145 */ |
|
146 void ModifyScNumberL(TBool aEnterPressed, TInt aIndex); |
|
147 |
|
148 /** |
|
149 * Replaces tab and enter characters by spaces using AknTextUtils::ReplaceCharacters |
|
150 */ |
|
151 void ReplaceCharacters( TDes& aText ); |
|
152 |
|
153 /** |
|
154 * Launches help application |
|
155 */ |
|
156 void LaunchHelpL(); |
|
157 |
|
158 private: // Data |
|
159 CMuiuSettingsArray* iSettingsArray; |
|
160 CEikTextListBox* iListBox; |
|
161 TDes& iName; |
|
162 TDes& iNumber; |
|
163 TInt& iExitCode; |
|
164 TBool iHelpFeatureSupported; |
|
165 CSmumSCArray* iSCDlgsAddressesList; |
|
166 CAknTitlePane* iTitlePane; |
|
167 HBufC* iPreviousTitleText; |
|
168 TBool iSimSCsOnly; |
|
169 }; |
|
170 #endif // SMUMSERVICECENTREITEMDIALOG_H |
|
171 |
|
172 // End of File |