|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Setting page for non-multidrive memory selection setting page. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAKNCOMMONDIALOGSRADIOBUTTONSETTINGPAGE_H |
|
20 #define CAKNCOMMONDIALOGSRADIOBUTTONSETTINGPAGE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknradiobuttonsettingpage.h> |
|
24 #include "maknmemoryselectiondriveobserver.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MAknCommonDialogsEventObserver; |
|
28 class CEikButtonGroupContainer; |
|
29 class CAknMemorySelectionModel; |
|
30 // CLASS DEFINITION |
|
31 /** |
|
32 * A class derived from CAknRadioButtonSettingPage in order to catch events |
|
33 * and report them to the event handler. |
|
34 * |
|
35 * @lib CommonDialogs.lib |
|
36 * @since 1.2 |
|
37 */ |
|
38 NONSHARABLE_CLASS(CAknCommonDialogsRadioButtonSettingPage) : public CAknRadioButtonSettingPage, |
|
39 public MAknMemorySelectionDriveObserver |
|
40 { |
|
41 public: // Constructors and destructors |
|
42 |
|
43 /** |
|
44 * Constructor. |
|
45 * @param aResourceId A parameter for CAknRadioButtonSettingPage. |
|
46 * @param aCurrentSelectionIndex A reference to selected item. |
|
47 * @param aObserver An observer to which events are reported. |
|
48 * @param aModel for UpdateAndRedrawItem. |
|
49 */ |
|
50 CAknCommonDialogsRadioButtonSettingPage( |
|
51 TInt aResourceId, |
|
52 TInt& aCurrentSelectionItem, |
|
53 const MDesCArray* aItemArray, |
|
54 MAknCommonDialogsEventObserver& aObserver, |
|
55 CAknMemorySelectionModel* aModel ); |
|
56 |
|
57 ~CAknCommonDialogsRadioButtonSettingPage(); |
|
58 |
|
59 public: // Functions from base classes |
|
60 |
|
61 /** |
|
62 * From CAknSettingPage |
|
63 * A method for getting button group container pointer. |
|
64 */ |
|
65 CEikButtonGroupContainer* Cba() const; |
|
66 |
|
67 /** |
|
68 * From MAknMemoryCardInsertObserver |
|
69 * Update setting page with new memory names |
|
70 * @param aItemArray Memory names from memory selection model |
|
71 */ |
|
72 void NotifyDrivesChangedL(const MDesCArray* aItemArray); |
|
73 |
|
74 private: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * From CAknSettingPage |
|
78 * Overwritten method from CAknSettingPage in order to catch |
|
79 * a dialog close event. |
|
80 */ |
|
81 TBool OkToExitL( TBool aAccept ); |
|
82 |
|
83 /** |
|
84 * From CCoeControl |
|
85 */ |
|
86 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
87 |
|
88 /** |
|
89 * From MEikCommandObserver |
|
90 * |
|
91 * @param aCommandId Event Id from the soft-key |
|
92 */ |
|
93 void ProcessCommandL(TInt aCommandId); |
|
94 |
|
95 /** |
|
96 * For update item text |
|
97 */ |
|
98 void UpdateAndRedrawItemL(); |
|
99 private: // Data |
|
100 |
|
101 // Ref: observer. |
|
102 MAknCommonDialogsEventObserver& iObserver; |
|
103 CAknMemorySelectionModel* iModel; |
|
104 TBool iUpdateItem ; |
|
105 }; |
|
106 |
|
107 #endif // CAKNCOMMONDIALOGSRADIOBUTTONSETTINGPAGE_H |
|
108 |
|
109 // End of File |