1 | // Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qinputdeviceintegrationfactory_p.h" |
5 | |
6 | #include <QtCore/QCoreApplication> |
7 | #include <QtCore/QDir> |
8 | |
9 | #include <Qt3DInput/private/qinputdeviceintegration_p.h> |
10 | #include <Qt3DInput/private/qinputdeviceplugin_p.h> |
11 | #include <QtCore/private/qfactoryloader_p.h> |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | namespace Qt3DInput { |
16 | |
17 | Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QInputDevicePlugin_iid, QLatin1String("/3dinputdevices"), Qt::CaseInsensitive)) |
18 | |
19 | QStringList QInputDeviceIntegrationFactory::keys() |
20 | { |
21 | return loader->keyMap().values(); |
22 | } |
23 | |
24 | QInputDeviceIntegration *QInputDeviceIntegrationFactory::create(const QString &name, const QStringList &args) |
25 | { |
26 | return qLoadPlugin<QInputDeviceIntegration, QInputDevicePlugin>(loader: loader(), key: name, args); |
27 | } |
28 | |
29 | } // Qt3DInput |
30 | |
31 | QT_END_NAMESPACE |
32 | |
33 |