File indexing completed on 2024-05-19 16:31:41

0001 /*
0002     SPDX-FileCopyrightText: 2015 Bernhard Friedreich <friesoft@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "timerplugin.h"
0008 #include "timer.h"
0009 
0010 // Qt
0011 #include <QQmlEngine>
0012 
0013 static QObject *timer_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
0014 {
0015     Q_UNUSED(engine)
0016     Q_UNUSED(scriptEngine)
0017 
0018     return new Timer();
0019 }
0020 
0021 void TimerPlugin::registerTypes(const char *uri)
0022 {
0023     Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.timer"));
0024 
0025     qmlRegisterSingletonType<Timer>(uri, 0, 1, "Timer", timer_singletontype_provider);
0026 }