5#ifndef ARCHIVEMANAGER_H
6#define ARCHIVEMANAGER_H
7#include "dcompressornamespace.h"
13class ReadOnlyArchiveInterface;
15DCOMPRESSOR_BEGIN_NAMESPACE
17class DArchiveManagerPrivate;
169 bool deleteFiles(
const QString &strArchiveFullPath,
const QList<MgrFileEntry> &listSelEntry);
171 bool renameFiles(
const QString &strArchiveFullPath,
const QList<MgrFileEntry> &listSelEntry);
175 bool openFile(
const QString &strArchiveFullPath,
const MgrFileEntry &stEntry,
const QString &strTempExtractPath,
const QString &strProgram);
181 bool convertArchive(
const QString &strOriginalArchiveFullPath,
const QString &strTargetFullPath,
const QString &strNewArchiveFullPath);
212 QScopedPointer<DArchiveManagerPrivate> d_ptr;
214DCOMPRESSOR_END_NAMESPACE
DArchiveManager类提供文档压缩解压功能
Definition darchivemanager.h:19
bool convertArchive(const QString &strOriginalArchiveFullPath, const QString &strTargetFullPath, const QString &strNewArchiveFullPath)
压缩包格式转换
void signalprogress(double dPercentage)
信号-进度信号
void signalCurFileName(const QString &strName)
信号-发送当前正在操作的文件名
bool deleteFiles(const QString &strArchiveFullPath, const QList< MgrFileEntry > &listSelEntry)
删除压缩包中的文件
bool currentStatus()
当前任务状态
bool updateArchiveComment(const QString &strArchiveFullPath, const QString &strComment)
更新压缩包注释信息
void signalJobFinished(ArchiveJobType eJobType, MgrPluginFinishType eFinishType, MgrErrorType eErrorType)
信号-操作结束信号
MgrErrorType
错误类型
Definition darchivemanager.h:54
@ ET_NeedPassword
Definition darchivemanager.h:58
@ ET_ArchiveDamaged
Definition darchivemanager.h:60
@ ET_InsufficientDiskSpace
Definition darchivemanager.h:67
@ ET_FileOpenError
Definition darchivemanager.h:61
@ ET_FileWriteError
Definition darchivemanager.h:63
@ ET_RenameError
Definition darchivemanager.h:65
@ ET_FileReadError
Definition darchivemanager.h:62
@ ET_PluginError
Definition darchivemanager.h:56
@ ET_MissingVolume
Definition darchivemanager.h:66
@ ET_WrongPassword
Definition darchivemanager.h:57
@ ET_LongNameError
Definition darchivemanager.h:59
@ ET_UserCancelOpertion
Definition darchivemanager.h:69
@ ET_DeleteError
Definition darchivemanager.h:64
bool cancelOperation()
取消操作
bool pauseOperation()
暂停操作
bool renameFiles(const QString &strArchiveFullPath, const QList< MgrFileEntry > &listSelEntry)
重命名压缩包中的文件
bool extractFiles2Path(const QString &strArchiveFullPath, const QList< MgrFileEntry > &listSelEntry, const MgrExtractionOptions &stOptions)
提取文件至指定目录
ArchivePluginType
插件类型
Definition darchivemanager.h:24
@ APT_Auto
Definition darchivemanager.h:25
@ APT_Cli7z
Definition darchivemanager.h:26
@ APT_Libarchive
Definition darchivemanager.h:27
@ APT_Libzip
Definition darchivemanager.h:28
bool createArchive(const QList< MgrFileEntry > &files, const QString &strDestination, const MgrCompressOptions &stOptions, ArchivePluginType eType)
创建压缩包
static DArchiveManager * get_instance(void)
获取单例实例对象
MgrPluginFinishType
插件结束类型
Definition darchivemanager.h:48
@ PFT_Cancel
Definition darchivemanager.h:50
void signalCurArchiveName(const QString &strArchiveName)
信号-当前正在操作的压缩包信号
ArchiveJobType
操作类型
Definition darchivemanager.h:32
@ JT_Add
Definition darchivemanager.h:35
@ JT_Open
Definition darchivemanager.h:41
@ JT_Convert
Definition darchivemanager.h:44
@ JT_Load
Definition darchivemanager.h:36
@ JT_Create
Definition darchivemanager.h:34
@ JT_Comment
Definition darchivemanager.h:43
@ JT_Extract
Definition darchivemanager.h:37
@ JT_Rename
Definition darchivemanager.h:39
@ JT_Update
Definition darchivemanager.h:42
@ JT_BatchExtract
Definition darchivemanager.h:40
@ JT_Delete
Definition darchivemanager.h:38
bool extractFiles(const QString &strArchiveFullPath, const QList< MgrFileEntry > &files, const MgrExtractionOptions &stOptions, ArchivePluginType eType=ArchivePluginType::APT_Auto)
解压文件
void destory_instance()
获取单例实例对象
bool batchExtractFiles(const QStringList &listFiles, const QString &strTargetPath)
批量解压
bool updateArchiveCacheData(const MgrUpdateOptions &stOptions)
更新本地压缩包缓存数据
void signalFileWriteErrorName(const QString &strName)
信号-发送创建失败的文件名
void signalError(MgrErrorType eErrorType)
信号-错误信号
bool loadArchive(const QString &strArchiveFullPath, ArchivePluginType eType=ArchivePluginType::APT_Auto)
加载压缩包数据
bool openFile(const QString &strArchiveFullPath, const MgrFileEntry &stEntry, const QString &strTempExtractPath, const QString &strProgram)
打开压缩包中文件
bool continueOperation()
继续操作
MgrArchiveData * archiveData()
获取压缩包数据
bool addFiles(const QString &strArchiveFullPath, const QList< MgrFileEntry > &listAddEntry, const MgrCompressOptions &stOptions)
向压缩包中添加文件
QString getCurFilePassword()
获取当前文件密码
压缩包数据
Definition darchivemanager.h:89
QString strPassword
Definition darchivemanager.h:99
bool isListEncrypted
Definition darchivemanager.h:98
qlonglong qSize
Definition darchivemanager.h:93
QList< MgrFileEntry > listRootEntry
Definition darchivemanager.h:97
QMap< QString, MgrFileEntry > mapFileEntry
Definition darchivemanager.h:96
qlonglong qComressSize
Definition darchivemanager.h:94
QString strComment
Definition darchivemanager.h:95
压缩选项
Definition darchivemanager.h:103
QString strCompressionMethod
Definition darchivemanager.h:108
int iCPUTheadNum
Definition darchivemanager.h:117
QString strPassword
Definition darchivemanager.h:106
bool bTar_7z
Definition darchivemanager.h:116
QString strDestination
Definition darchivemanager.h:112
bool bSplit
Definition darchivemanager.h:115
bool bHeaderEncryption
Definition darchivemanager.h:114
int iCompressionLevel
Definition darchivemanager.h:110
int iVolumeSize
Definition darchivemanager.h:109
qlonglong qTotalSize
Definition darchivemanager.h:111
bool bEncryption
Definition darchivemanager.h:113
QString strEncryptionMethod
Definition darchivemanager.h:107
文件数据
Definition darchivemanager.h:74
int iIndex
Definition darchivemanager.h:84
QString strFileName
Definition darchivemanager.h:79
bool isDirectory
Definition darchivemanager.h:81
QString strAlias
Definition darchivemanager.h:80
uint uLastModifiedTime
Definition darchivemanager.h:83
QString strFullPath
Definition darchivemanager.h:78
qlonglong qSize
Definition darchivemanager.h:82
更新选项
Definition darchivemanager.h:137
Type eType
Definition darchivemanager.h:147
QList< MgrFileEntry > listEntry
Definition darchivemanager.h:149
QString strParentPath
Definition darchivemanager.h:148
qint64 qSize
Definition darchivemanager.h:150