Solid

upowergenericinterface.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Pino Toscano <pino@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#include "upowergenericinterface.h"
8
9#include "upowerdevice.h"
10
11using namespace Solid::Backends::UPower;
12
13GenericInterface::GenericInterface(UPowerDevice *device)
14 : DeviceInterface(device)
15{
16 connect(device, &UPowerDevice::propertyChanged,
17 this, &GenericInterface::propertyChanged);
18#if 0 // not used/implemented
19 connect(device, &UPowerDevice::conditionRaised,
20 this, &UPowerDevice::conditionRaised);
21#endif
22}
23
24GenericInterface::~GenericInterface()
25{
26}
27
28QVariant GenericInterface::property(const QString &key) const
29{
30 return m_device.data()->prop(key);
31}
32
33QMap<QString, QVariant> GenericInterface::allProperties() const
34{
35 return m_device.data()->allProperties();
36}
37
38bool GenericInterface::propertyExists(const QString &key) const
39{
40 return m_device.data()->propertyExists(key);
41}
42
43#include "moc_upowergenericinterface.cpp"
T * data() const const
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.