Solid

frontend/genericinterface.cpp
1 /*
2  SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <[email protected]>
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 
13 Solid::GenericInterface::GenericInterface(QObject *backendObject)
14  : DeviceInterface(*new GenericInterfacePrivate(), backendObject)
15 {
16  if (backendObject) {
17  connect(backendObject, SIGNAL(propertyChanged(QMap<QString,int>)),
18  this, SIGNAL(propertyChanged(QMap<QString,int>)));
19  connect(backendObject, SIGNAL(conditionRaised(QString,QString)),
20  this, SIGNAL(conditionRaised(QString,QString)));
21  }
22 }
23 
25 {
26 
27 }
28 
30 {
31  Q_D(const GenericInterface);
32  return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariant(), property(key));
33 }
34 
36 {
37  Q_D(const GenericInterface);
38  return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariantMap(), allProperties());
39 }
40 
42 {
43  Q_D(const GenericInterface);
44  return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), false, propertyExists(key));
45 }
46 
QVariant property(const char *name) const const
Generic interface to deal with a device.
Generic interface to deal with a device.
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual ~GenericInterface()
Destroys a Processor object.
bool propertyExists(const QString &key) const
Tests if a property exist in the device.
QVariant property(const QString &key) const
Retrieves a property of the device.
QMap< QString, QVariant > allProperties() const
Retrieves a key/value map of all the known properties for the device.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Sep 19 2020 22:49:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.