telutils/dialpad/src/dialpadkeyhandler.cpp
author hgs
Fri, 17 Sep 2010 17:09:13 +0300
changeset 48 78df25012fda
parent 32 1f002146abb4
permissions -rw-r--r--
201037
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*!
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description: Custom button
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include <hbmainwindow.h>
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    19
#ifdef Q_OS_SYMBIAN
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    20
#include <featmgr.h>
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    21
#endif // Q_OS_SYMBIAN
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    22
#include "dialpad.h"
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include "dialpadkeyhandler.h"
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include "dialpadvoicemailboxeventfilter.h"
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    25
#include "dialpadvideomailboxeventfilter.h"
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include "dialpadbluetootheventfilter.h"
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    27
#include "dialpadkeysequenceeventfilter.h"
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    28
#include "dialpademergencycalleventfilter.h"
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    29
#include "dialpadhasheventfilter.h"
48
hgs
parents: 32
diff changeset
    30
#ifdef _DEBUG
hgs
parents: 32
diff changeset
    31
 #ifdef __WINSCW__
hgs
parents: 32
diff changeset
    32
  #include "dialpadinternaleventfilter.h"
hgs
parents: 32
diff changeset
    33
 #endif
hgs
parents: 32
diff changeset
    34
#endif
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
#include "qtphonesrvlog.h"
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    37
DialpadKeyHandler::DialpadKeyHandler(
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    38
    Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) 
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    39
    : 
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    40
    QObject(parent),
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    41
	mMainWindow(mainWindow),
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    42
	mVmbxFilter(0),
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    43
	mVideoVmbxFilter(0),
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    44
	mBtFilter(0),
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    45
	mKeySequenceFilter(0),
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    46
	mEmergencyCallFilter(0),
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    47
	mHashFilter(0)
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
{
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
    PHONE_TRACE;
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    50
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    51
    // Variations
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    52
    bool isVideoMailboxSupported = false;
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    53
#ifdef Q_OS_SYMBIAN
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    54
    isVideoMailboxSupported = FeatureManager::FeatureSupported(KFeatureIdCsVideoTelephony);
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    55
#endif // Q_OS_SYMBIAN
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    56
    
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    57
    mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad));
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    58
    if (isVideoMailboxSupported) {
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    59
        mVideoVmbxFilter.reset(new DialpadVideoMailboxEventFilter(dialPad));
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    60
    }
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    61
    mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad));
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    62
    mKeySequenceFilter.reset(new DialpadKeySequenceEventFilter(dialPad));
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    63
    mHashFilter.reset(new DialpadHashEventFilter(dialPad));
48
hgs
parents: 32
diff changeset
    64
    
hgs
parents: 32
diff changeset
    65
#ifdef _DEBUG
hgs
parents: 32
diff changeset
    66
 #ifdef __WINSCW__ 
hgs
parents: 32
diff changeset
    67
    mInternalFilter.reset(new DialpadInternalEventFilter);
hgs
parents: 32
diff changeset
    68
    mMainWindow.installEventFilter(mInternalFilter.data());
hgs
parents: 32
diff changeset
    69
 #endif
hgs
parents: 32
diff changeset
    70
#endif
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    71
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
    // Stack different event filters
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    73
    mMainWindow.installEventFilter(mVmbxFilter.data());
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    74
    if (isVideoMailboxSupported) {
23
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    75
        mMainWindow.installEventFilter(mVideoVmbxFilter.data());    
427125ac6cb8 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 19
diff changeset
    76
    }
19
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    77
    mMainWindow.installEventFilter(mBtFilter.data());
e44a8c097b15 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 13
diff changeset
    78
    mMainWindow.installEventFilter(mKeySequenceFilter.data());
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    79
    mMainWindow.installEventFilter(mHashFilter.data());
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
}
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    82
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    83
DialpadKeyHandler::DialpadKeyHandler(
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    84
    Dialpad *dialPad, 
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    85
    DialpadKeyHandler::DialpadKeyEventFilters filters, 
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    86
    QObject *parent) 
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    87
    : 
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    88
    QObject(parent),
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    89
    mMainWindow(*(dialPad->mainWindow())),
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    90
    mVmbxFilter(0),
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    91
    mVideoVmbxFilter(0),
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    92
    mBtFilter(0),
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    93
    mKeySequenceFilter(0),
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    94
    mEmergencyCallFilter(0),
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
    95
    mHashFilter(0)
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    96
{
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    97
    PHONE_TRACE;
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    98
    
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
    99
    if (filters.testFlag(VoiceMailbox)) {
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   100
        mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad));
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   101
        mMainWindow.installEventFilter(mVmbxFilter.data());
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   102
    }
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   103
    
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   104
    if (filters.testFlag(VideoMailBox)) {
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   105
        mVideoVmbxFilter.reset(
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   106
            new DialpadVideoMailboxEventFilter(dialPad));
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   107
        mMainWindow.installEventFilter(mVideoVmbxFilter.data());
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   108
    }
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   109
    
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   110
    if (filters.testFlag(Bluetooth)) {
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   111
        mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad));
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   112
        mMainWindow.installEventFilter(mBtFilter.data());
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   113
    }
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   114
    
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   115
    if (filters.testFlag(KeySequence)) {
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   116
        mKeySequenceFilter.reset(
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   117
            new DialpadKeySequenceEventFilter(dialPad));
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   118
        mMainWindow.installEventFilter(mKeySequenceFilter.data());
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   119
    }
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   120
    
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   121
    if (filters.testFlag(EmergencyCall)) {
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   122
        mEmergencyCallFilter.reset(
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   123
            new DialpadEmergencyCallEventFilter(dialPad));
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   124
        mMainWindow.installEventFilter(mEmergencyCallFilter.data());
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   125
    }
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   126
    
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   127
    if (filters.testFlag(Hash)) {
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   128
        mHashFilter.reset(new DialpadHashEventFilter(dialPad));
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   129
        mMainWindow.installEventFilter(mHashFilter.data());
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   130
    }
27
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   131
}
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   132
7eb70891911c Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 23
diff changeset
   133
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
DialpadKeyHandler::~DialpadKeyHandler()
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   135
{
32
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   136
    mMainWindow.removeEventFilter(mVmbxFilter.data());
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   137
    mMainWindow.removeEventFilter(mVideoVmbxFilter.data());
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   138
    mMainWindow.removeEventFilter(mBtFilter.data());
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   139
    mMainWindow.removeEventFilter(mKeySequenceFilter.data());
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   140
    mMainWindow.removeEventFilter(mEmergencyCallFilter.data());
1f002146abb4 Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   141
    mMainWindow.removeEventFilter(mHashFilter.data());
48
hgs
parents: 32
diff changeset
   142
#ifdef _DEBUG
hgs
parents: 32
diff changeset
   143
 #ifdef __WINSCW__
hgs
parents: 32
diff changeset
   144
    mMainWindow.removeEventFilter(mInternalFilter.data());
hgs
parents: 32
diff changeset
   145
 #endif
hgs
parents: 32
diff changeset
   146
#endif
13
e32024264ebb Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
}