1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
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 <QtGui/qgenericplugin.h> |
5 | #include <QtInputSupport/private/qevdevmousemanager_p.h> |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | class QEvdevMousePlugin : public QGenericPlugin |
10 | { |
11 | Q_OBJECT |
12 | Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "evdevmouse.json") |
13 | |
14 | public: |
15 | QEvdevMousePlugin(); |
16 | |
17 | QObject* create(const QString &key, const QString &specification) override; |
18 | }; |
19 | |
20 | QEvdevMousePlugin::QEvdevMousePlugin() |
21 | : QGenericPlugin() |
22 | { |
23 | } |
24 | |
25 | QObject* QEvdevMousePlugin::create(const QString &key, |
26 | const QString &specification) |
27 | { |
28 | if (!key.compare(other: QLatin1String("EvdevMouse"), cs: Qt::CaseInsensitive)) |
29 | return new QEvdevMouseManager(key, specification); |
30 | |
31 | return nullptr; |
32 | } |
33 | |
34 | QT_END_NAMESPACE |
35 | |
36 | #include "main.moc" |
37 |