File indexing completed on 2024-04-14 04:51:48

0001 /**
0002  * SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #pragma once
0008 
0009 #include <QObject>
0010 #include <QPointer>
0011 #include <QTimer>
0012 
0013 #include <core/kdeconnectplugin.h>
0014 
0015 #define PACKET_TYPE_PRESENTER QStringLiteral("kdeconnect.presenter")
0016 
0017 class PresenterView;
0018 
0019 class PresenterPlugin : public KdeConnectPlugin
0020 {
0021     Q_OBJECT
0022     Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.presenter")
0023 
0024 public:
0025     explicit PresenterPlugin(QObject *parent, const QVariantList &args);
0026     void receivePacket(const NetworkPacket &np) override;
0027 
0028 private:
0029     QPointer<PresenterView> m_view;
0030     QTimer *m_timer;
0031     float m_xPos, m_yPos;
0032 };