Solid::DeviceNotifier Class

class Solid::DeviceNotifier

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

Header: #include <Solid/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)

Static Public Members

Solid::DeviceNotifier *instance()

Detailed Description

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.

Member Function Documentation

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

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

udi the new device UDI

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

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

udi the old device UDI

[static] Solid::DeviceNotifier *DeviceNotifier::instance()