2019-07-05 16:58:46 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
|
2019-07-05 16:58:46 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2019-07-05 16:58:46 +01:00
|
|
|
*/
|
|
|
|
|
2023-07-21 19:22:59 +01:00
|
|
|
#pragma once
|
2019-07-05 16:58:46 +01:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPointer>
|
|
|
|
#include <QTimer>
|
|
|
|
|
|
|
|
#include <core/kdeconnectplugin.h>
|
|
|
|
|
|
|
|
#define PACKET_TYPE_PRESENTER QStringLiteral("kdeconnect.presenter")
|
|
|
|
|
|
|
|
class PresenterView;
|
|
|
|
|
2023-07-22 10:37:35 +01:00
|
|
|
class PresenterPlugin : public KdeConnectPlugin
|
2019-07-05 16:58:46 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_CLASSINFO("D-Bus Interface", "org.kde.kdeconnect.device.presenter")
|
|
|
|
|
|
|
|
public:
|
2022-09-10 22:23:52 +01:00
|
|
|
explicit PresenterPlugin(QObject *parent, const QVariantList &args);
|
2023-07-31 08:25:45 +01:00
|
|
|
void receivePacket(const NetworkPacket &np) override;
|
2019-07-05 16:58:46 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QPointer<PresenterView> m_view;
|
2022-09-10 22:23:52 +01:00
|
|
|
QTimer *m_timer;
|
2019-07-21 11:26:33 +01:00
|
|
|
float m_xPos, m_yPos;
|
2019-07-05 16:58:46 +01:00
|
|
|
};
|