NDEVR
API Documentation
QDeviceChangeEvent

The event that is triggered when a USB device is plugged in or unplugged. More...

Public Types

enum  Action { Add , Remove , Change }
 Enumerates the possible device change actions. More...

Public Member Functions

 QDeviceChangeEvent (Action action, const QString &device)
 Constructs a device change event with the given action and device identifier.
Action action () const
 Returns the action type of this device change event.
QString device () const
 Returns the device identifier associated with this event.

Static Public Member Functions

static Type registeredType ()
 Returns the registered QEvent type for device change events.

Detailed Description

The event that is triggered when a USB device is plugged in or unplugged.


Definition at line 74 of file DeviceWatcher.h.

Member Enumeration Documentation

◆ Action

Enumerates the possible device change actions.

Enumerator
Add 

A device was added.

Remove 

A device was removed.

Change 

A device state changed (e.g., unmounting).

Definition at line 80 of file DeviceWatcher.h.

Constructor & Destructor Documentation

◆ QDeviceChangeEvent()

QDeviceChangeEvent::QDeviceChangeEvent ( Action action,
const QString & device )
explicit

Constructs a device change event with the given action and device identifier.

Parameters
[in]actionThe type of device change that occurred.
[in]deviceThe device identifier string.

References action(), and device().

Member Function Documentation

◆ action()

Action QDeviceChangeEvent::action ( ) const
inline

Returns the action type of this device change event.

Returns
The Action that triggered this event.

Definition at line 99 of file DeviceWatcher.h.

Referenced by QDeviceChangeEvent().

◆ device()

QString QDeviceChangeEvent::device ( ) const
inline

Returns the device identifier associated with this event.

Returns
The device identifier string.

Definition at line 104 of file DeviceWatcher.h.

Referenced by QDeviceChangeEvent().

◆ registeredType()

Type QDeviceChangeEvent::registeredType ( )
inlinestatic

Returns the registered QEvent type for device change events.

Returns
The QEvent::Type used to identify QDeviceChangeEvent instances.

Definition at line 109 of file DeviceWatcher.h.


The documentation for this class was generated from the following file: