Solid

frontend/genericinterface.cpp
1/*
2 SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <ervin@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 "genericinterface.h"
8#include "genericinterface_p.h"
9#include "soliddefs_p.h"
10
11#include <solid/devices/ifaces/genericinterface.h>
12
13Solid::GenericInterface::GenericInterface(QObject *backendObject)
14 : DeviceInterface(*new GenericInterfacePrivate(), backendObject)
15{
16 if (backendObject) {
17 connect(backendObject, SIGNAL(propertyChanged(QMap<QString, int>)), this, SIGNAL(propertyChanged(QMap<QString, int>)));
18 connect(backendObject, SIGNAL(conditionRaised(QString, QString)), this, SIGNAL(conditionRaised(QString, QString)));
19 }
20}
21
25
27{
28 Q_D(const GenericInterface);
29 return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariant(), property(key));
30}
31
33{
34 Q_D(const GenericInterface);
35 return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariantMap(), allProperties());
36}
37
39{
40 Q_D(const GenericInterface);
41 return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), false, propertyExists(key));
42}
43
44#include "moc_genericinterface.cpp"
Generic interface to deal with a device.
QVariant property(const QString &key) const
Retrieves a property of the device.
bool propertyExists(const QString &key) const
Tests if a property exist in the device.
~GenericInterface() override
Destroys a Processor object.
QMap< QString, QVariant > allProperties() const
Retrieves a key/value map of all the known properties for the device.
Generic interface to deal with a device.
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:22 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.