1 /* |
|
2 * Copyright (c) 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: Implementation of CVmListQueryDialog class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <aknlistquerydialog.h> |
|
21 #include "vmlist.h" |
|
22 #include <vmbx.rsg> |
|
23 |
|
24 // MEMBER FUNCTIONS |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CVmListQueryDialog::CVmListQueryDialog() |
|
28 // ----------------------------------------------------------------------------- |
|
29 CVmListQueryDialog::CVmListQueryDialog( TInt* aIndex ):CAknListQueryDialog( aIndex ) |
|
30 { |
|
31 iOkToExit = EFalse; |
|
32 } |
|
33 |
|
34 // ----------------------------------------------------------------------------- |
|
35 // CVmListQueryDialog::~CVmListQueryDialog() |
|
36 // ----------------------------------------------------------------------------- |
|
37 CVmListQueryDialog::~CVmListQueryDialog() |
|
38 { |
|
39 } |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CVmListQueryDialog::NewL() |
|
43 // ----------------------------------------------------------------------------- |
|
44 CVmListQueryDialog* CVmListQueryDialog::NewL( /*const TDesC& aPrompt,*/ TInt* aIndex ) |
|
45 { |
|
46 CVmListQueryDialog* query = new( ELeave ) CVmListQueryDialog( aIndex ); |
|
47 return query; |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CVmListQueryDialog::OfferKeyEventL() |
|
52 // ----------------------------------------------------------------------------- |
|
53 TKeyResponse CVmListQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
|
54 { |
|
55 RDebug::Print( _L("CVmListQueryDialog::OfferKeyEventL: %d" ), aType); |
|
56 RDebug::Print( _L("CVmListQueryDialog::KeyCode: %d" ), aKeyEvent.iCode); |
|
57 RDebug::Print( _L("CVmListQueryDialog::KeyCode: %d" ), aKeyEvent.iScanCode); |
|
58 if( aKeyEvent.iCode == EKeyNo && aType == KErrNone ) |
|
59 { |
|
60 iOkToExit = ETrue; |
|
61 RDebug::Print( _L("CVmListQueryDialog::OfferKeyEventL" )); |
|
62 DismissQueryL(); |
|
63 return EKeyWasConsumed; |
|
64 } |
|
65 return CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType ); |
|
66 } |
|
67 |
|
68 TBool CVmListQueryDialog::OkToExitL(TInt aButtonId) |
|
69 { |
|
70 RDebug::Print( _L("CVmListQueryDialog::OkToExitL: %d" ), aButtonId); |
|
71 if( iOkToExit ) |
|
72 { |
|
73 return ETrue; |
|
74 } |
|
75 return CAknListQueryDialog::OkToExitL(aButtonId); |
|
76 } |
|
77 // End of File |
|