2 * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "inputeventdistributor.h"
20 InputEventDistributor::InputEventDistributor(QObject *parent) :
22 mp_inputEventAdaptor(0)
24 // publish dbus popup interface
25 mp_inputEventAdaptor = new InputeventAdaptor((QObject*)this);
26 QDBusConnection dbus = QDBusConnection::sessionBus();
27 dbus.registerObject("/InputEventDistributor", this);
28 dbus.registerService("org.agl.main");
31 InputEventDistributor::~InputEventDistributor()
33 delete mp_inputEventAdaptor;
36 void InputEventDistributor::keyEvent(int type, int zone, int key)
38 qDebug("InputEventDistributor::keyEvent type 0x%x, key 0x%x", type, key);
43 case SystemInputEvent::INPUTEVENTTYPE_KEY_PRESSED:
47 qDebug("InputEventDistributor::keyEvent: Type 0x%x undefined", type);