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
13QT_BEGIN_NAMESPACE
14
15namespace Qt3DInput {
16
17Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QInputDevicePlugin_iid, QLatin1String("/3dinputdevices"), Qt::CaseInsensitive))
18
19QStringList QInputDeviceIntegrationFactory::keys()
20{
21 return loader->keyMap().values();
22}
23
24QInputDeviceIntegration *QInputDeviceIntegrationFactory::create(const QString &name, const QStringList &args)
25{
26 return qLoadPlugin<QInputDeviceIntegration, QInputDevicePlugin>(loader: loader(), key: name, args);
27}
28
29} // Qt3DInput
30
31QT_END_NAMESPACE
32
33

source code of qt3d/src/input/frontend/qinputdeviceintegrationfactory.cpp