⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quazipnewinfo.h

📁 以mplayer为后端的QT gui播放器。
💻 H
字号:
#ifndef QUA_ZIPNEWINFO_H#define QUA_ZIPNEWINFO_H/*-- A kind of "standard" GPL license statement --QuaZIP - a Qt/C++ wrapper for the ZIP/UNZIP packageCopyright (C) 2005-2007 Sergey A. TachenovThis program is free software; you can redistribute it and/or modify itunder the terms of the GNU General Public License as published by theFree Software Foundation; either version 2 of the License, or (at youroption) any later version.This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GeneralPublic License for more details.You should have received a copy of the GNU General Public License alongwith this program; if not, write to the Free Software Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307 USA-- A kind of "standard" GPL license statement ends here --See COPYING file for GPL.You are also permitted to use QuaZIP under the terms of LGPL (seeCOPYING.LGPL). You are free to choose either license, but please notethat QuaZIP makes use of Qt, which is not licensed under LGPL. So ifyou are using Open Source edition of Qt, you therefore MUST use GPL foryour code based on QuaZIP, since it would be also based on Qt in thiscase. If you are Qt commercial license owner, then you are free to useQuaZIP as long as you respect either GPL or LGPL for QuaZIP code. **/#include <QDateTime>#include <QString>/// Information about a file to be created./** This structure holds information about a file to be created inside * ZIP archive. At least name should be set to something correct before * passing this structure to * QuaZipFile::open(OpenMode,const QuaZipNewInfo&,int,int,bool). **/struct QuaZipNewInfo {  /// File name.  /** This field holds file name inside archive, including path relative   * to archive root.   **/  QString name;  /// File timestamp.  /** This is the last file modification date and time. Will be stored   * in the archive central directory. It is a good practice to set it   * to the source file timestamp instead of archive creating time. Use   * setFileDateTime() or QuaZipNewInfo(const QString&, const QString&).   **/  QDateTime dateTime;  /// File internal attributes.  quint16 internalAttr;  /// File external attributes.  quint32 externalAttr;  /// File comment.  /** Will be encoded using QuaZip::getCommentCodec().   **/  QString comment;  /// File local extra field.  QByteArray extraLocal;  /// File global extra field.  QByteArray extraGlobal;  /// Uncompressed file size.  /** This is only needed if you are using raw file zipping mode, i. e.   * adding precompressed file in the zip archive.   **/  ulong uncompressedSize;  /// Constructs QuaZipNewInfo instance.  /** Initializes name with \a name, dateTime with current date and   * time. Attributes are initialized with zeros, comment and extra   * field with null values.   **/  QuaZipNewInfo(const QString& name);  /// Constructs QuaZipNewInfo instance.  /** Initializes name with \a name and dateTime with timestamp of the   * file named \a file. If the \a file does not exists or its timestamp   * is inaccessible (e. g. you do not have read permission for the   * directory file in), uses current date and time. Attributes are   * initialized with zeros, comment and extra field with null values.   *    * \sa setFileDateTime()   **/  QuaZipNewInfo(const QString& name, const QString& file);  /// Sets the file timestamp from the existing file.  /** Use this function to set the file timestamp from the existing   * file. Use it like this:   * \code   * QuaZipFile zipFile(&zip);   * QFile file("file-to-add");   * file.open(QIODevice::ReadOnly);   * QuaZipNewInfo info("file-name-in-archive");   * info.setFileDateTime("file-to-add"); // take the timestamp from file   * zipFile.open(QIODevice::WriteOnly, info);   * \endcode   *   * This function does not change dateTime if some error occured (e. g.   * file is inaccessible).   **/  void setFileDateTime(const QString& file);};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -