mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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.
16 lines
482 B
C++
16 lines
482 B
C++
// SPDX-FileCopyrightText: 2023 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "vibrationmanager.h"
|
|
|
|
VibrationManager::VibrationManager(QObject *parent)
|
|
: QObject{parent}
|
|
{
|
|
const auto objectPath = QStringLiteral("/com/lomiri/hfd");
|
|
m_interface = new com::lomiri::hfd::Vibrator("com.lomiri.hfd", objectPath, QDBusConnection::systemBus(), this);
|
|
}
|
|
|
|
void VibrationManager::vibrate(int durationMs)
|
|
{
|
|
m_interface->vibrate(durationMs);
|
|
}
|