Solid::Ifaces::GenericInterface
#include <genericinterface.h>
Public Member Functions | |
virtual | ~GenericInterface () |
virtual QMap< QString, QVariant > | allProperties () const =0 |
virtual QVariant | property (const QString &key) const =0 |
virtual bool | propertyExists (const QString &key) const =0 |
Protected Member Functions | |
virtual void | conditionRaised (const QString &condition, const QString &reason)=0 |
virtual void | propertyChanged (const QMap< QString, int > &changes)=0 |
Detailed Description
Generic interface to deal with a device.
It exposes a set of properties and is organized a a key/value set.
Warning: Using this class could expose some backend specific details and lead to non portable code. Use it at your own risk, or during transitional phases when the provided device interfaces don't provide the necessary methods.
Definition at line 28 of file ifaces/genericinterface.h.
Constructor & Destructor Documentation
◆ ~GenericInterface()
|
virtual |
Destroys a GenericInterface object.
Definition at line 9 of file ifaces/genericinterface.cpp.
Member Function Documentation
◆ allProperties()
|
pure virtual |
Retrieves all the properties of this device.
- Returns
- all properties in a map
◆ conditionRaised()
|
protectedpure virtual |
This signal is emitted when an event occurred in the device.
For example when a button is pressed.
- Parameters
-
condition the condition name reason a message explaining why the condition has been raised
◆ property()
|
pure virtual |
Retrieves the value of a property.
- Parameters
-
key the property name
- Returns
- the property value or QVariant() if the property doesn't exist
◆ propertyChanged()
|
protectedpure virtual |
This signal is emitted when a property is changed in the device.
- Parameters
-
changes the map describing the property changes that occurred in the device, keys are property name and values describe the kind of change done on the device property (added/removed/modified), it's one of the type Solid::Device::PropertyChange
◆ propertyExists()
|
pure virtual |
Tests if a property exist.
- Parameters
-
key the property name
- Returns
- true if the property exists in this device, false otherwise
The documentation for this class was generated from the following files:
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.