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 * This class defines a settings dialog for the Voice Recorder application. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CVRSETTINGSDIALOG_H__ |
|
21 #define __CVRSETTINGSDIALOG_H__ |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <AknDialog.h> |
|
26 #include <eiklbo.h> |
|
27 #include "VRUtils.h" |
|
28 #include "CVRSettingItem.h" |
|
29 |
|
30 |
|
31 #include <CAknMemorySelectionDialog.h> |
|
32 #include <aknsettingitemlist.h> |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * This class defines a settings dialog for the Voice Recorder application. |
|
38 */ |
|
39 class CVRSettingsDialog |
|
40 : public CAknDialog, |
|
41 public MEikListBoxObserver |
|
42 { |
|
43 |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CVRSettingsDialog(); |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static CVRSettingsDialog* NewL(); |
|
55 |
|
56 private: // Constructors |
|
57 |
|
58 /** |
|
59 * Default constructor. Inlined to save a few bytes. |
|
60 * Parameters to array: granularity, isnumered, 1st ordinal |
|
61 */ |
|
62 |
|
63 inline CVRSettingsDialog() : iSettingItemArray( 1, EFalse, 1 ){} |
|
64 |
|
65 protected: // from CEikDialog |
|
66 |
|
67 /** |
|
68 * Tests if it is OK to exit the dialog. |
|
69 * @param aButtonId The ID of the button that was activated. |
|
70 * @return ETrue to validate and exit the dialog, |
|
71 * EFalse to keep the dialog active. |
|
72 */ |
|
73 TBool OkToExitL( TInt aButtonId ); |
|
74 |
|
75 /** |
|
76 * Pre-layout dialog initialisation. |
|
77 */ |
|
78 void PreLayoutDynInitL(); |
|
79 |
|
80 void ProcessCommandL( TInt aCommandId ); |
|
81 |
|
82 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
83 |
|
84 public: // From MEikListBoxObserver |
|
85 |
|
86 |
|
87 /** |
|
88 * Handles list box events. |
|
89 * This is invoked by CEikListBox to notify the observer of |
|
90 * list box events. |
|
91 * @param aListBox The originating list box. |
|
92 * @param aEventType A code for the event. |
|
93 */ |
|
94 void HandleListBoxEventL( CEikListBox* aListBox, |
|
95 TListBoxEvent aEventType ); |
|
96 |
|
97 private: //new methods |
|
98 |
|
99 /** |
|
100 * Stores all settings to Central Repository when called |
|
101 */ |
|
102 void StoreAllSettingsL(); |
|
103 |
|
104 private: // data |
|
105 |
|
106 /** |
|
107 * Array of setting items contained in the listbox. Owned. |
|
108 */ |
|
109 |
|
110 CAknSettingItemArray iSettingItemArray; |
|
111 |
|
112 /** |
|
113 * Selected memo store |
|
114 */ |
|
115 CAknMemorySelectionDialog::TMemory iMemoStore; |
|
116 |
|
117 /** |
|
118 * Selected memo quality |
|
119 */ |
|
120 TVRQuality iQuality; |
|
121 |
|
122 /** |
|
123 * Multiple drives |
|
124 */ |
|
125 TDriveNumber iDrive; |
|
126 |
|
127 |
|
128 }; |
|
129 |
|
130 #endif // __CVRSETTINGSDIALOG_H__ |
|