shift-shell/components/hapticsplugin/vibrationmanager.h
Devin Lin 83ce339cda components/hapticsplugin: Introduce direct haptics API for hfd-service
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/270

Introduce a direct haptics API for now for shell usage, and port to it. Also remove the vibration intensity setting as that didn't do anything.
2023-11-15 08:13:25 -08:00

24 lines
No EOL
446 B
C++

// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QObject>
#include <qqmlregistration.h>
#include "hfdinterface.h"
class VibrationManager : public QObject
{
Q_OBJECT
QML_ELEMENT
QML_SINGLETON
public:
VibrationManager(QObject *parent = nullptr);
Q_INVOKABLE void vibrate(int durationMs);
private:
com::lomiri::hfd::Vibrator *m_interface;
};