mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
26 lines
680 B
C++
26 lines
680 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2026 Alexander Wilms <f.alexander.wilms@outlook.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
*/
|
|
|
|
#include "mousemoduledata.h"
|
|
|
|
#include "inputbackend.h"
|
|
|
|
MouseModuleData::MouseModuleData(QObject *parent)
|
|
: KCModuleData(parent)
|
|
{
|
|
m_backend = std::make_unique<InputBackend>();
|
|
connect(m_backend.get(), &InputBackend::inputDevicesChanged, this, &MouseModuleData::updateRelevance);
|
|
updateRelevance();
|
|
}
|
|
|
|
void MouseModuleData::updateRelevance()
|
|
{
|
|
Q_ASSERT(m_backend);
|
|
bool relevant = m_backend->deviceCount() > 0;
|
|
setRelevant(relevant);
|
|
}
|
|
|
|
#include "moc_mousemoduledata.cpp"
|