|
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 #include <AknDialog.h> |
|
25 #include <eiklbo.h> |
|
26 #include "VRUtils.h" |
|
27 |
|
28 #include <aknsettingitemlist.h> |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * This class defines a settings dialog for the Voice Recorder application. |
|
34 */ |
|
35 class CVRSettingsDialog |
|
36 : public CAknDialog, |
|
37 public MEikListBoxObserver |
|
38 { |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 ~CVRSettingsDialog(); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 */ |
|
50 static CVRSettingsDialog* NewL(); |
|
51 |
|
52 private: // Constructors |
|
53 |
|
54 /** |
|
55 * Default constructor. Inlined to save a few bytes. |
|
56 * Parameters to array: granularity, isnumered, 1st ordinal |
|
57 */ |
|
58 inline CVRSettingsDialog() : iSettingItemArray( 1, EFalse, 1 ) {} |
|
59 |
|
60 protected: // from CEikDialog |
|
61 |
|
62 /** |
|
63 * Tests if it is OK to exit the dialog. |
|
64 * @param aButtonId The ID of the button that was activated. |
|
65 * @return ETrue to validate and exit the dialog, |
|
66 * EFalse to keep the dialog active. |
|
67 */ |
|
68 TBool OkToExitL( TInt aButtonId ); |
|
69 |
|
70 /** |
|
71 * Pre-layout dialog initialisation. |
|
72 */ |
|
73 void PreLayoutDynInitL(); |
|
74 |
|
75 void ProcessCommandL( TInt aCommandId ); |
|
76 |
|
77 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
78 |
|
79 public: // From MEikListBoxObserver |
|
80 |
|
81 /** |
|
82 * Handles list box events. |
|
83 * This is invoked by CEikListBox to notify the observer of |
|
84 * list box events. |
|
85 * @param aListBox The originating list box. |
|
86 * @param aEventType A code for the event. |
|
87 */ |
|
88 void HandleListBoxEventL( CEikListBox* aListBox, |
|
89 TListBoxEvent aEventType ); |
|
90 |
|
91 private: // data |
|
92 |
|
93 /** |
|
94 * Array of setting items contained in the listbox. Owned. |
|
95 */ |
|
96 CAknSettingItemArray iSettingItemArray; |
|
97 |
|
98 TVRQuality iQuality; |
|
99 }; |
|
100 |
|
101 #endif // __CVRSETTINGSDIALOG_H__ |