5#ifndef DBLOCKDEVICEMONITOR_H
6#define DBLOCKDEVICEMONITOR_H
8#include <DtkMountGlobal>
14class DBlockDeviceMonitor;
15namespace DDeviceManager {
19enum class BlockDeviceProperty;
20class DBlockDeviceMonitorPrivate;
36 void mountAdded(
const QString &devPath,
const QString &mountPoint);
42 void propertiesChanged(
const QString &devPath,
const QMap<Dtk::Mount::BlockDeviceProperty, QVariant> &changes);
46 QScopedPointer<DBlockDeviceMonitorPrivate> d_ptr;
提供块设备的监听操作
Definition dblockdevicemonitor.h:22
void propertiesChanged(const QString &devPath, const QMap< Dtk::Mount::BlockDeviceProperty, QVariant > &changes)
信号,告知块设备/驱动设备属性变化
void driveRemoved(const QString &drvPath)
信号,告知驱动设备移除
void fileSystemAdded(const QString &devPath)
信号,告知块设备文件系统识别
void deviceRemoved(const QString &devPath)
信号,告知块设备移除
void driveAdded(const QString &drvPath)
信号,告知驱动(硬盘)设备添加
bool watchChanges() const
获取当前监视器工作状态
void deviceAdded(const QString &devPath)
信号,告知块设备添加
~DBlockDeviceMonitor() override
析构函数
void mountAdded(const QString &devPath, const QString &mountPoint)
信号,告知块设备挂载
void mountRemoved(const QString &devPath)
信号,告知块设备卸载
void fileSystemRemoved(const QString &devPath)
信号,告知块设备文件系统移除
void setWatchChanges(bool watchChanges)
开启或关闭设备监听
DBlockDeviceMonitor * globalBlockDeviceMonitor()
获取全局唯一块设备监视器,你可以使用该监视器监听块设备的变化