5#ifndef DOPTICALDISCOPERATOR_H
6#define DOPTICALDISCOPERATOR_H
17class DOpticalDiscOperator;
18namespace DOpticalDiscManager {
19DTK_CORE_NAMESPACE::DExpected<DOpticalDiscOperator *>
23class DOpticalDiscOperatorPrivate;
29 Q_PROPERTY(
int speed READ speed WRITE setSpeed)
30 Q_PROPERTY(QString volumeName READ volumeName WRITE setVolumeName)
31 Q_PROPERTY(
double checkPrecision READ checkPrecision WRITE setCheckPrecision)
44 DTK_CORE_NAMESPACE::DExpected<bool>
burn(
const QString &stagePath,
const BurnOptions &opts);
45 DTK_CORE_NAMESPACE::DExpected<bool>
erase();
47 DTK_CORE_NAMESPACE::DExpected<bool>
writeISO(
const QString &isoPath);
48 DTK_CORE_NAMESPACE::DExpected<bool>
dumpISO(
const QString &isoPath);
51 void jobStatusChanged(JobStatus status,
int progress, QString speed, QStringList message);
56 friend DTK_CORE_NAMESPACE::DExpected<DOpticalDiscOperator *>
57 DOpticalDiscManager::createOpticalDiscOperator(
const QString &dev, QObject *parent);
60 QScopedPointer<DOpticalDiscOperatorPrivate> d_ptr;
用于光盘操作的类, 负责操作光盘的数据刻录、镜像刻录、镜像导出、数据校验等
Definition dopticaldiscoperator.h:25
double checkPrecision() const
获取 DOpticalDiscOperator::setCheckPrecision 设置的光盘校验的精度
DTK_CORE_NAMESPACE::DExpected< bool > erase()
开始擦除光盘(需要光盘介质支持被擦除的物理特性), 擦除期间的过程信息将通过信号 DOpticalDiscOperator::jobStatusChanged 被发出
DTK_CORE_NAMESPACE::DExpected< bool > burn(const QString &stagePath, const BurnOptions &opts)
开始光盘数据刻录, 刻录期间的过程信息将通过信号 DOpticalDiscOperator::jobStatusChanged 被发出
void setVolumeName(const QString &name)
设置光盘卷标名称, 光盘刻录后生效, 卷标名称可以为空
void jobStatusChanged(JobStatus status, int progress, QString speed, QStringList message)
光盘的数据刻录、镜像刻录、镜像导出、数据校验任务的状态信息信号
DTK_CORE_NAMESPACE::DExpected< bool > writeISO(const QString &isoPath)
开始将 iso 镜像文件写入到光盘中, 写入的过程信息将通过信号 DOpticalDiscOperator::jobStatusChanged 被发出
QString volumeName() const
获取 DOpticalDiscOperator::setVolumeName 设置的光盘卷标名称
int speed() const
获取 DOpticalDiscOperator::setSpeed 设置的刻录速度
void setSpeed(int speed)
设置刻录的速度, 通常不用设置
void setCheckPrecision(double checkPrecision)
设置光盘校验的精度, 通常不用设置
DTK_CORE_NAMESPACE::DExpected< bool > checkmedia()
开始校验光盘数据, 校验期间的过程信息将通过信号 DOpticalDiscOperator::jobStatusChanged 被发出
DTK_CORE_NAMESPACE::DExpected< bool > dumpISO(const QString &isoPath)
开始将光盘已刻录的数据导出为 iso 镜像文件, 导出的过程信息将通过信号 DOpticalDiscOperator::jobStatusChanged 被发出
DTK_CORE_NAMESPACE::DExpected< DOpticalDiscOperator * > createOpticalDiscOperator(const QString &dev, QObject *parent=nullptr)
创建一个光盘操作类对象