|
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: Query that is used in asking call type (confirmation) |
|
15 * from user. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDES |
|
23 #include "CaUiQuery.h" |
|
24 |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CCaUiCreateListQuery::CCaUiListQuery |
|
28 // |
|
29 // C++ constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CCaUiCreateListQuery::CCaUiCreateListQuery( TInt* aIndex ) |
|
34 : CAknListQueryDialog( aIndex ) |
|
35 { |
|
36 } |
|
37 |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // CCaUiCreateListQuery::~CCaUiCreateListQuery |
|
41 // |
|
42 // Destructor. |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 CCaUiCreateListQuery::~CCaUiCreateListQuery() |
|
46 { |
|
47 } |
|
48 |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CCaUiCreateListQuery::OfferKeyEventL |
|
52 // |
|
53 // |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 TKeyResponse CCaUiCreateListQuery::OfferKeyEventL( |
|
57 const TKeyEvent& aKeyEvent, |
|
58 TEventCode aType ) |
|
59 { |
|
60 TKeyResponse response = EKeyWasConsumed; |
|
61 |
|
62 if ( aType == EEventKeyDown ) |
|
63 { |
|
64 // The first key event received will be a partial one, and will therefore be ignored. |
|
65 iValidKeyEvent = ETrue; |
|
66 } |
|
67 |
|
68 if ( iValidKeyEvent && aKeyEvent.iScanCode == EStdKeyYes ) |
|
69 { |
|
70 if ( aType == EEventKey ) |
|
71 { |
|
72 // The send key is specified to act (in Video Telephony UI specification) so that it |
|
73 // initiates the call. This means that the event is modified and faked to be a select |
|
74 // key event, so that the list box can handle it correctly. |
|
75 TKeyEvent keyEvent = aKeyEvent; |
|
76 keyEvent.iCode = EKeyOK; |
|
77 keyEvent.iScanCode = EStdKeyDevice3; |
|
78 response = CAknListQueryDialog::OfferKeyEventL( keyEvent, EEventKey ); |
|
79 } |
|
80 } |
|
81 else |
|
82 { |
|
83 response = CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType ); |
|
84 } |
|
85 |
|
86 return response; |
|
87 } |
|
88 |
|
89 |
|
90 // End of File |