File indexing completed on 2024-04-28 16:52:19

0001 /*
0002     SPDX-FileCopyrightText: 2020 Carson Black <uhhadd@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include <QObject>
0008 #include <QtPlugin>
0009 #include <qpa/qplatforminputcontextplugin_p.h>
0010 
0011 #include "plasmaimcontext.h"
0012 
0013 QT_BEGIN_NAMESPACE
0014 
0015 class PlasmaIM : public QPlatformInputContextPlugin
0016 {
0017     Q_OBJECT
0018     Q_PLUGIN_METADATA(IID QPlatformInputContextFactoryInterface_iid FILE "plasmaim.json")
0019 
0020 public:
0021     QPlatformInputContext *create(const QString &, const QStringList &) override;
0022 };
0023 
0024 QPlatformInputContext *PlasmaIM::create(const QString &system, const QStringList &)
0025 {
0026     if (system == QLatin1String("plasmaim")) {
0027         return new PlasmaIMContext;
0028     }
0029 
0030     return nullptr;
0031 }
0032 
0033 QT_END_NAMESPACE
0034 
0035 #include "main.moc"