Plasma5Support
7#include "devicesignalmapper.h"
9DeviceSignalMapper::DeviceSignalMapper(
QObject *parent)
14DeviceSignalMapper::~DeviceSignalMapper()
18void DeviceSignalMapper::setMapping(
QObject *device,
const QString &udi)
20 signalmap[device] = udi;
23BatterySignalMapper::BatterySignalMapper(
QObject *parent)
24 : DeviceSignalMapper(parent)
28BatterySignalMapper::~BatterySignalMapper()
32void BatterySignalMapper::chargePercentChanged(
int value)
34 Q_EMIT deviceChanged(signalmap[
sender()], QStringLiteral(
"Charge Percent"), value);
37void BatterySignalMapper::chargeStateChanged(
int newState)
39 QStringList chargestate;
40 chargestate << QStringLiteral(
"Fully Charged") << QStringLiteral(
"Charging") << QStringLiteral(
"Discharging");
41 Q_EMIT deviceChanged(signalmap[
sender()], QStringLiteral(
"Charge State"), chargestate.
at(newState));
44void BatterySignalMapper::presentStateChanged(
bool newState)
46 Q_EMIT deviceChanged(signalmap[
sender()], QStringLiteral(
"Plugged In"), newState);
49StorageAccessSignalMapper::StorageAccessSignalMapper(
QObject *parent)
50 : DeviceSignalMapper(parent)
54StorageAccessSignalMapper::~StorageAccessSignalMapper()
58void StorageAccessSignalMapper::accessibilityChanged(
bool accessible)
60 Q_EMIT deviceChanged(signalmap[
sender()], QStringLiteral(
"Accessible"), accessible);
const_reference at(qsizetype i) const const
QObject * sender() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:07 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.