Watches and alerts the program when a USB device is plugged in or unplugged.
More...
|
| | DeviceWatcher (QObject *parent=0) |
| | Constructs a DeviceWatcher with the given parent object.
|
| void | appendEventReceiver (QObject *receiver) |
| | Appends an additional event receiver that will be notified of device change events.
|
| void | deviceAdded (const QString &dev) |
| | Emitted when a new device is added to the system.
|
| void | deviceChanged (const QString &dev) |
| | Emitted when a device state changes, such as when unmounting.
|
| void | deviceRemoved (const QString &dev) |
| | Emitted when a device is removed from the system.
|
| bool | isRunning () const |
| | Checks whether the watcher is currently monitoring for device changes.
|
| bool | start () |
| | Starts watching for device changes.
|
| bool | stop () |
| | Stops watching for device changes.
|
|
|
DeviceWatcherPrivate * | d_ptr |
| | Private implementation pointer for platform-specific watching logic.
|
|
bool | running |
| | Whether the watcher is currently active.
|
Watches and alerts the program when a USB device is plugged in or unplugged.
Definition at line 11 of file DeviceWatcher.h.
◆ DeviceWatcher()
| DeviceWatcher::DeviceWatcher |
( |
QObject * | parent = 0 | ) |
|
|
explicit |
◆ appendEventReceiver()
| void DeviceWatcher::appendEventReceiver |
( |
QObject * | receiver | ) |
|
Appends an additional event receiver that will be notified of device change events.
- Parameters
-
| [in] | receiver | The QObject to receive device change events. |
◆ DefaultWatcher()
◆ deviceAdded()
| void DeviceWatcher::deviceAdded |
( |
const QString & | dev | ) |
|
Emitted when a new device is added to the system.
- Parameters
-
| [in] | dev | The device identifier string. |
◆ deviceChanged()
| void DeviceWatcher::deviceChanged |
( |
const QString & | dev | ) |
|
Emitted when a device state changes, such as when unmounting.
- Parameters
-
| [in] | dev | The device identifier string. |
◆ deviceRemoved()
| void DeviceWatcher::deviceRemoved |
( |
const QString & | dev | ) |
|
Emitted when a device is removed from the system.
- Parameters
-
| [in] | dev | The device identifier string. |
◆ isRunning()
| bool DeviceWatcher::isRunning |
( |
| ) |
const |
Checks whether the watcher is currently monitoring for device changes.
- Returns
- True if the watcher is running.
◆ start()
| bool DeviceWatcher::start |
( |
| ) |
|
Starts watching for device changes.
- Returns
- True if watching was successfully started.
◆ stop()
| bool DeviceWatcher::stop |
( |
| ) |
|
Stops watching for device changes.
- Returns
- True if watching was successfully stopped.
The documentation for this class was generated from the following file: