|
1 /* |
|
2 * Copyright (c) 2005 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: PhoneUI ListQueryDialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHONELISTQUERYDIALOG_H |
|
20 #define CPHONELISTQUERYDIALOG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknlistquerydialog.h> |
|
24 |
|
25 |
|
26 // CLASS DECLARATION |
|
27 class MPhoneQueryObserver; |
|
28 |
|
29 /** |
|
30 * This is a dialog, which can be initialized with selected items. |
|
31 */ |
|
32 class CPhoneListQueryDialog : public CAknListQueryDialog |
|
33 { |
|
34 public: // Constructors and destructor |
|
35 |
|
36 /** |
|
37 * C++ constructor. |
|
38 * |
|
39 * @param aCommandObserver callback observer |
|
40 * |
|
41 */ |
|
42 CPhoneListQueryDialog( MEikCommandObserver& aCommandObserver, |
|
43 MPhoneQueryObserver& aQueryObserver, |
|
44 const RArray<TInt>& aCommands ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CPhoneListQueryDialog(); |
|
50 |
|
51 |
|
52 private: // From CEikDialog |
|
53 |
|
54 /** |
|
55 * Sets selection indexes to list box. |
|
56 */ |
|
57 void PostLayoutDynInitL(); |
|
58 |
|
59 /** |
|
60 * If the user has pushed Ok, the dialog Stores the selected |
|
61 * values in to the server. |
|
62 * |
|
63 * @param aKeyCode key code |
|
64 * @return ETrue if dialog is closed |
|
65 */ |
|
66 TBool OkToExitL( TInt aKeycode ); |
|
67 |
|
68 |
|
69 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
70 TEventCode aType ); |
|
71 |
|
72 private: // Data |
|
73 |
|
74 // contains selected index |
|
75 TInt iIndex; |
|
76 |
|
77 MEikCommandObserver& iCommandObserver; |
|
78 |
|
79 MPhoneQueryObserver& iQueryObserver; |
|
80 |
|
81 RArray<TInt> iCommands; |
|
82 |
|
83 }; |
|
84 |
|
85 #endif // CPHONELISTQUERYDIALOG_H |
|
86 |
|
87 // End of File |