[OpenDocString] kdeconnect-kde (cpp)
remotecontrolplugin.cpp
RemoteControlPlugin::RemoteControlPlugin(QObject *parent, const QVariantList &args)
    : KdeConnectPlugin(parent, args)
{
}
Constructs a KdeConnectPlugin object and assigns its data to its parent object.
RemoteControlPlugin::~RemoteControlPlugin()
{
}
This removes the remote control plugin from the list of plugins.
void RemoteControlPlugin::moveCursor(const QPoint &p)
{
    NetworkPacket np(PACKET_TYPE_MOUSEPAD_REQUEST, {{QStringLiteral("dx"), p.x()}, {QStringLiteral("dy"), p.y()}});
    sendPacket(np);
}
Sends a MOUSEPAD_REQUEST packet to the controller and moves the cursor to the given point.
void RemoteControlPlugin::sendCommand(const QVariantMap &body)
{
    if (body.isEmpty())
        return;
    NetworkPacket np(PACKET_TYPE_MOUSEPAD_REQUEST, body);
    sendPacket(np);
}
This sends a MOUSEPAD_REQUEST network packet with the given body.
QString RemoteControlPlugin::dbusPath() const
{
    return QStringLiteral("/modules/kdeconnect/devices/") + device()->id() + QStringLiteral("/remotecontrol");
}
Returns the dbus path as a QString.