15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "logsmainwindow.h" |
18 #include "logsmainwindow.h" |
19 #include "logslogger.h" |
19 #include "logslogger.h" |
20 #include "logsforegroundwatcher.h" |
|
21 #include <QKeyEvent> |
20 #include <QKeyEvent> |
22 #include <xqserviceutil.h> |
21 #include <xqserviceutil.h> |
23 |
22 |
24 // ----------------------------------------------------------------------------- |
23 // ----------------------------------------------------------------------------- |
25 // LogsMainWindow::LogsMainWindow |
24 // LogsMainWindow::LogsMainWindow |
26 // ----------------------------------------------------------------------------- |
25 // ----------------------------------------------------------------------------- |
27 // |
26 // |
28 LogsMainWindow::LogsMainWindow() : HbMainWindow(), mForeground(false) |
27 LogsMainWindow::LogsMainWindow() : HbMainWindow(), mForeground(false) |
29 { |
28 { |
30 if ( viewport() ){ |
|
31 viewport()->grabGesture(Qt::SwipeGesture); |
|
32 } |
|
33 mWatcher = new LogsForegroundWatcher(this); |
|
34 connect( mWatcher, SIGNAL(losingForeground()), this, SIGNAL(appFocusLost()) ); |
|
35 connect( mWatcher, SIGNAL(gainingForeground()), this, SIGNAL(appFocusGained()) ); |
|
36 } |
29 } |
37 |
30 |
38 // ----------------------------------------------------------------------------- |
31 // ----------------------------------------------------------------------------- |
39 // LogsMainWindow::~LogsMainWindow |
32 // LogsMainWindow::~LogsMainWindow |
40 // ----------------------------------------------------------------------------- |
33 // ----------------------------------------------------------------------------- |
41 // |
34 // |
42 LogsMainWindow::~LogsMainWindow() |
35 LogsMainWindow::~LogsMainWindow() |
43 { |
36 { |
44 if ( viewport() ){ |
|
45 viewport()->ungrabGesture(Qt::SwipeGesture); |
|
46 } |
|
47 } |
37 } |
48 |
38 |
49 // ----------------------------------------------------------------------------- |
39 // ----------------------------------------------------------------------------- |
50 // LogsMainWindow::sendAppToBackground |
40 // LogsMainWindow::sendAppToBackground |
51 // ----------------------------------------------------------------------------- |
41 // ----------------------------------------------------------------------------- |