File indexing completed on 2024-05-26 04:05:38
0001 /* 0002 SPDX-FileCopyrightText: 2009 Pino Toscano <pino@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "upowergenericinterface.h" 0008 0009 #include "upowerdevice.h" 0010 0011 using namespace Solid::Backends::UPower; 0012 0013 GenericInterface::GenericInterface(UPowerDevice *device) 0014 : DeviceInterface(device) 0015 { 0016 connect(device, &UPowerDevice::propertyChanged, 0017 this, &GenericInterface::propertyChanged); 0018 #if 0 // not used/implemented 0019 connect(device, &UPowerDevice::conditionRaised, 0020 this, &UPowerDevice::conditionRaised); 0021 #endif 0022 } 0023 0024 GenericInterface::~GenericInterface() 0025 { 0026 } 0027 0028 QVariant GenericInterface::property(const QString &key) const 0029 { 0030 return m_device.data()->prop(key); 0031 } 0032 0033 QMap<QString, QVariant> GenericInterface::allProperties() const 0034 { 0035 return m_device.data()->allProperties(); 0036 } 0037 0038 bool GenericInterface::propertyExists(const QString &key) const 0039 { 0040 return m_device.data()->propertyExists(key); 0041 } 0042 0043 #include "moc_upowergenericinterface.cpp"