1 #include "pirapplication.h"
8 PIRApplication::PIRApplication(
11 : QApplication(argc, argv)
16 void PIRApplication::setupRockerSwitch(QWidget *window)
18 // free the rocker switch from the volume controls:
19 unsigned long val = 1;
21 Atom atom = XInternAtom(QX11Info::display(), "_HILDON_ZOOM_KEY_ATOM", 0);
30 (unsigned char *) &val,
35 bool PIRApplication::x11EventFilter(
38 // Return true means we will consume the event here; return false means
39 // letting the event continue to be passed up the chain.
41 if (event->type == KeyPress)
43 // Check for function key 7 (keycode 73) or for "Zoom Out" button:
45 event->xkey.keycode == 73 ||
46 event->xkey.keycode == QKeySequence::ZoomOut)
48 emit decreaseRockerPressed();
52 event->xkey.keycode == 74 ||
53 event->xkey.keycode == QKeySequence::ZoomIn)
55 emit increaseRockerPressed();