33
|
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: Query dialog for handling key events.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// INCLUDE FILES
|
|
20 |
#include "psuiquerydialog.h"
|
|
21 |
|
|
22 |
// ================= MEMBER FUNCTIONS =======================
|
|
23 |
|
|
24 |
// C++ default constructor can NOT contain any code, that
|
|
25 |
// might leave.
|
|
26 |
//
|
|
27 |
CPsuiQueryDialog::CPsuiQueryDialog( CAknQueryDialog::TTone aTone ) :
|
|
28 |
CAknQueryDialog( aTone )
|
|
29 |
{
|
|
30 |
}
|
|
31 |
|
|
32 |
// ---------------------------------------------------------------------------
|
|
33 |
// Symbian OS two-phased constructor.
|
|
34 |
// ---------------------------------------------------------------------------
|
|
35 |
CPsuiQueryDialog* CPsuiQueryDialog::NewL( CAknQueryDialog::TTone aTone )
|
|
36 |
{
|
|
37 |
CPsuiQueryDialog* self = new( ELeave )CPsuiQueryDialog( aTone );
|
|
38 |
return self;
|
|
39 |
}
|
|
40 |
|
|
41 |
// ---------------------------------------------------------------------------
|
|
42 |
// Destructor
|
|
43 |
// ---------------------------------------------------------------------------
|
|
44 |
//
|
|
45 |
CPsuiQueryDialog::~CPsuiQueryDialog()
|
|
46 |
{
|
|
47 |
}
|
|
48 |
|
|
49 |
// ---------------------------------------------------------------------------
|
|
50 |
// CPsuiQueryDialog::OfferKeyEventL
|
|
51 |
// ---------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
TKeyResponse CPsuiQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
|
|
54 |
TEventCode aType )
|
|
55 |
{
|
|
56 |
if ( ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo ) &&
|
|
57 |
aType == EEventKeyUp )
|
|
58 |
{
|
|
59 |
// End -key was pressed, so exit this query dialog
|
|
60 |
TryExitL( EKeyNo );
|
|
61 |
}
|
|
62 |
|
|
63 |
return EKeyWasNotConsumed;
|
|
64 |
}
|
|
65 |
|
|
66 |
// ---------------------------------------------------------------------------
|
|
67 |
// CPsuiQueryDialog::OkToExitL
|
|
68 |
// ---------------------------------------------------------------------------
|
|
69 |
//
|
|
70 |
TBool CPsuiQueryDialog::OkToExitL( TInt /*aCommand*/ )
|
|
71 |
{
|
|
72 |
// Dismiss query
|
|
73 |
return ETrue;
|
|
74 |
}
|
|
75 |
|
|
76 |
// End of File
|