2 * Copyright 2015 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include "qinputdeviceinfo_mock_p.h"
22QInputDeviceManagerPrivate::QInputDeviceManagerPrivate(QObject *parent) :
24 currentFilter(QInputDevice::Unknown)
26 QTimer::singleShot(1, this, SIGNAL(ready()));
29QInputDeviceManagerPrivate::~QInputDeviceManagerPrivate()
33QInputDevice *QInputDeviceManagerPrivate::addMockDevice(const QString &devicePath, QInputDevice::InputType type)
35 QInputDevice *inputDevice = new QInputDevice(this);
36 inputDevice->setDevicePath(devicePath);
37 inputDevice->setName("Mock Device " + devicePath);
38 inputDevice->setType(type);
39 deviceMap.insert(devicePath, inputDevice);
40 Q_EMIT deviceAdded(devicePath);
44void QInputDeviceManagerPrivate::removeDevice(const QString &path)
46 auto it = deviceMap.begin();
47 while (it != deviceMap.end()) {
48 const QString devicePath = it.key();
49 if (devicePath.contains(path)) {
50 it = deviceMap.erase(it);
51 Q_EMIT deviceRemoved(devicePath);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list