|
1 /* |
|
2 * Copyright (c) 2004 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: See class definition below. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CTCSETTINGSDIALOG_H__ |
|
19 #define __CTCSETTINGSDIALOG_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #ifdef __SERIES60_ |
|
23 #include <aknform.h> |
|
24 #include <aknlists.h> |
|
25 #include <aknsettingitemlist.h> |
|
26 #include <eiklbo.h> |
|
27 #else |
|
28 #include <eikdialg.h> |
|
29 #endif |
|
30 |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class TTcSettings; |
|
34 class CTcIAPManager; |
|
35 |
|
36 // CLASS DEFINITION |
|
37 /** |
|
38 * CTcSettingsDialog implements a UI dialog component for changing |
|
39 * the application settings (e.g. connection type and log file name). |
|
40 * |
|
41 */ |
|
42 class CTcSettingsDialog |
|
43 |
|
44 #ifdef __SERIES60_ |
|
45 : public CAknDialog, |
|
46 public MEikListBoxObserver |
|
47 #else |
|
48 : public CEikDialog |
|
49 #endif |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 /** |
|
54 * Constructor. |
|
55 * |
|
56 * @param aSettings Reference to the application settings container. |
|
57 */ |
|
58 CTcSettingsDialog( TTcSettings& aSettings ); |
|
59 |
|
60 /// Destructor |
|
61 ~CTcSettingsDialog(); |
|
62 |
|
63 /// 2nd phase costructor. Must be public in dialogs. |
|
64 void ConstructL(); |
|
65 |
|
66 private: // Constructors and destructor |
|
67 |
|
68 // Default constructor, not implemented |
|
69 CTcSettingsDialog(); |
|
70 |
|
71 protected: // from CEikDialog |
|
72 |
|
73 void PreLayoutDynInitL(); |
|
74 TBool OkToExitL( TInt aKeycode ); |
|
75 |
|
76 #ifdef __SERIES60_ |
|
77 public: // from MEikListBoxObserver |
|
78 |
|
79 void HandleListBoxEventL( CEikListBox* aListBox, |
|
80 TListBoxEvent aEventType ); |
|
81 |
|
82 public: // From MEikCommandObserver |
|
83 |
|
84 void ProcessCommandL( TInt aCommandId ); |
|
85 |
|
86 public: // From CCoeControl |
|
87 |
|
88 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
89 TEventCode aType ); |
|
90 |
|
91 private: |
|
92 |
|
93 /** |
|
94 * This is an internal helper function used for changing |
|
95 * the application title pane text to "Settings" for the |
|
96 * lifetime of this dialog. |
|
97 * |
|
98 * @param aResourceId Resource file identifier for the title text. |
|
99 * aResourceId=-1 sets the title back to default. |
|
100 */ |
|
101 void SetTitleL( TInt aResourceId ) const; |
|
102 |
|
103 /// @return A pointer to the settings item listbox owned by the dialog |
|
104 CAknSettingStyleListBox* ListBoxL() const; |
|
105 #endif |
|
106 |
|
107 private: // Data |
|
108 |
|
109 /// Reference to the application settings container. Not owned. |
|
110 TTcSettings& iSettings; |
|
111 |
|
112 /// IAP Manager from TestClientNet. Owned. |
|
113 CTcIAPManager* iIAPManager; |
|
114 |
|
115 #ifdef __SERIES60_ |
|
116 /// Setting item array. Owned. |
|
117 CAknSettingItemArray iSettingItems; |
|
118 TBuf<40> iRemoteAddrText; |
|
119 #endif |
|
120 |
|
121 }; |
|
122 |
|
123 #endif // __CTCSETTINGSDIALOG_H__ |