Solid::DeviceNotifier Class

class Solid::DeviceNotifier
Header: #include <DeviceNotifier>
CMake: find_package(KF6 REQUIRED COMPONENTS Solid)
target_link_libraries(mytarget PRIVATE KF6::Solid)
Inherits: QObject

Signals

void deviceAdded(const QString &udi)
void deviceRemoved(const QString &udi)

Detailed Description

@class Solid::DeviceNotifier devicenotifier.h <Solid/DeviceNotifier>

This class allow to query the underlying system to obtain information about the hardware available.

It's the unique entry point for hardware discovery. Applications should use it to find devices, or to be notified about hardware changes.

Note that it's implemented as a singleton and encapsulates the backend logic.

@author Kevin Ottens <ervin@kde.org>

Member Function Documentation

[signal] void DeviceNotifier::deviceAdded(const QString &udi)

This signal is emitted when a new device appears in the underlying system.

@param udi the new device UDI

[signal] void DeviceNotifier::deviceRemoved(const QString &udi)

This signal is emitted when a device disappears from the underlying system.

@param udi the old device UDI