17 |
17 |
18 #include <hbmainwindow.h> |
18 #include <hbmainwindow.h> |
19 #include "dialpadkeyhandler.h" |
19 #include "dialpadkeyhandler.h" |
20 #include "dialpadvoicemailboxeventfilter.h" |
20 #include "dialpadvoicemailboxeventfilter.h" |
21 #include "dialpadbluetootheventfilter.h" |
21 #include "dialpadbluetootheventfilter.h" |
|
22 #include "dialpadkeysequenceeventfilter.h" |
22 #include "qtphonesrvlog.h" |
23 #include "qtphonesrvlog.h" |
23 |
24 |
24 DialpadKeyHandler::DialpadKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) : QObject(parent), mMainWindow(mainWindow) |
25 DialpadKeyHandler::DialpadKeyHandler( |
|
26 Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) |
|
27 : |
|
28 QObject(parent), |
|
29 mMainWindow(mainWindow), |
|
30 mVmbxFilter(0), |
|
31 mBtFilter(0), |
|
32 mKeySequenceFilter(0) |
25 { |
33 { |
26 PHONE_TRACE; |
34 PHONE_TRACE; |
27 mVmbxFilter = new DialpadVoiceMailboxEventFilter(dialPad, this); |
35 |
28 Q_ASSERT(mVmbxFilter != NULL); |
36 mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad)); |
29 mBtFilter = new DialpadBluetoothEventFilter(dialPad, this); |
37 mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad)); |
30 Q_ASSERT(mBtFilter != NULL); |
38 mKeySequenceFilter.reset(new DialpadKeySequenceEventFilter(dialPad)); |
31 |
39 |
32 // Stack different event filters |
40 // Stack different event filters |
33 mMainWindow.installEventFilter(mVmbxFilter); |
41 mMainWindow.installEventFilter(mVmbxFilter.data()); |
34 mMainWindow.installEventFilter(mBtFilter); |
42 mMainWindow.installEventFilter(mBtFilter.data()); |
|
43 mMainWindow.installEventFilter(mKeySequenceFilter.data()); |
35 } |
44 } |
36 |
45 |
37 DialpadKeyHandler::~DialpadKeyHandler() |
46 DialpadKeyHandler::~DialpadKeyHandler() |
38 { |
47 { |
39 } |
48 } |