Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
RCCResourceLibrary Class Reference

#include <rcc.h>

+ Collaboration diagram for RCCResourceLibrary:

Public Types

enum  Format {
  Binary , C_Code , Pass1 , Pass2 ,
  Python_Code
}
 
enum class  CompressionAlgorithm { Zlib , Zstd , Best = 99 , None = -1 }
 
typedef QHash< QString, QStringResourceDataFileMap
 

Public Member Functions

 RCCResourceLibrary (quint8 formatVersion)
 
 ~RCCResourceLibrary ()
 
bool output (QIODevice &outDevice, QIODevice &tempDevice, QIODevice &errorDevice)
 
bool readFiles (bool listMode, QIODevice &errorDevice)
 
void setFormat (Format f)
 
Format format () const
 
void setInputFiles (const QStringList &files)
 
QStringList inputFiles () const
 
QStringList dataFiles () const
 
ResourceDataFileMap resourceDataFileMap () const
 
void setVerbose (bool b)
 
bool verbose () const
 
void setInitName (const QString &name)
 
QString initName () const
 
void setOutputName (const QString &name)
 
QString outputName () const
 
void setCompressionAlgorithm (CompressionAlgorithm algo)
 
CompressionAlgorithm compressionAlgorithm () const
 
void setCompressLevel (int c)
 
int compressLevel () const
 
void setCompressThreshold (int t)
 
int compressThreshold () const
 
void setResourceRoot (const QString &root)
 
QString resourceRoot () const
 
void setUseNameSpace (bool v)
 
bool useNameSpace () const
 
QStringList failedResources () const
 
int formatVersion () const
 
void setNoZstd (bool v)
 
bool noZstd () const
 

Static Public Member Functions

static CompressionAlgorithm parseCompressionAlgorithm (QStringView algo, QString *errorMsg)
 
static int parseCompressionLevel (CompressionAlgorithm algo, const QString &level, QString *errorMsg)
 

Friends

class RCCFileInfo
 

Detailed Description

Definition at line 23 of file rcc.h.

Member Typedef Documentation

◆ ResourceDataFileMap

Definition at line 46 of file rcc.h.

Member Enumeration Documentation

◆ CompressionAlgorithm

Enumerator
Zlib 
Zstd 
Best 
None 

Definition at line 58 of file rcc.h.

◆ Format

Enumerator
Binary 
C_Code 
Pass1 
Pass2 
Python_Code 

Definition at line 36 of file rcc.h.

Constructor & Destructor Documentation

◆ RCCResourceLibrary()

RCCResourceLibrary::RCCResourceLibrary ( quint8 formatVersion)

Definition at line 437 of file rcc.cpp.

References QByteArray::reserve().

+ Here is the call graph for this function:

◆ ~RCCResourceLibrary()

RCCResourceLibrary::~RCCResourceLibrary ( )

Definition at line 460 of file rcc.cpp.

Member Function Documentation

◆ compressionAlgorithm()

CompressionAlgorithm RCCResourceLibrary::compressionAlgorithm ( ) const
inline

Definition at line 68 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ compressLevel()

int RCCResourceLibrary::compressLevel ( ) const
inline

Definition at line 72 of file rcc.h.

◆ compressThreshold()

int RCCResourceLibrary::compressThreshold ( ) const
inline

Definition at line 75 of file rcc.h.

◆ dataFiles()

QStringList RCCResourceLibrary::dataFiles ( ) const

Definition at line 820 of file rcc.cpp.

References child, RCCFileInfo::Directory, file, it, pending, and ret.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ failedResources()

QStringList RCCResourceLibrary::failedResources ( ) const
inline

Definition at line 83 of file rcc.h.

◆ format()

Format RCCResourceLibrary::format ( ) const
inline

Definition at line 38 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ formatVersion()

int RCCResourceLibrary::formatVersion ( ) const
inline

Definition at line 85 of file rcc.h.

Referenced by RCCFileInfo::writeDataInfo().

+ Here is the caller graph for this function:

◆ initName()

QString RCCResourceLibrary::initName ( ) const
inline

Definition at line 53 of file rcc.h.

◆ inputFiles()

QStringList RCCResourceLibrary::inputFiles ( ) const
inline

Definition at line 41 of file rcc.h.

◆ noZstd()

bool RCCResourceLibrary::noZstd ( ) const
inline

Definition at line 88 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ output()

bool RCCResourceLibrary::output ( QIODevice & outDevice,
QIODevice & tempDevice,
QIODevice & errorDevice )

Definition at line 915 of file rcc.cpp.

References QByteArray::constData(), i, Pass2, QIODevice::pos(), QIODevice::putChar(), QByteArray::size(), and QIODevice::write().

Referenced by runRcc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outputName()

QString RCCResourceLibrary::outputName ( ) const
inline

Definition at line 56 of file rcc.h.

◆ parseCompressionAlgorithm()

RCCResourceLibrary::CompressionAlgorithm RCCResourceLibrary::parseCompressionAlgorithm ( QStringView algo,
QString * errorMsg )
static

Definition at line 866 of file rcc.cpp.

References Best, QString::fromLatin1(), None, Zlib, and Zstd.

Referenced by runRcc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseCompressionLevel()

int RCCResourceLibrary::parseCompressionLevel ( CompressionAlgorithm algo,
const QString & level,
QString * errorMsg )
static

Definition at line 889 of file rcc.cpp.

References Best, QString::fromLatin1(), None, ok, Zlib, and Zstd.

Referenced by runRcc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readFiles()

bool RCCResourceLibrary::readFiles ( bool listMode,
QIODevice & errorDevice )

Definition at line 779 of file rcc.cpp.

References QDir::currentPath(), QString::fromLatin1(), i, msgOpenReadFailed(), QFileInfo::path(), QIODeviceBase::ReadOnly, QString::toUtf8(), and QIODevice::write().

Referenced by runRcc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resourceDataFileMap()

RCCResourceLibrary::ResourceDataFileMap RCCResourceLibrary::resourceDataFileMap ( ) const

Definition at line 858 of file rcc.cpp.

References resourceDataFileMapRecursion().

Referenced by runRcc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resourceRoot()

QString RCCResourceLibrary::resourceRoot ( ) const
inline

Definition at line 78 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setCompressionAlgorithm()

void RCCResourceLibrary::setCompressionAlgorithm ( CompressionAlgorithm algo)
inline

Definition at line 67 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setCompressLevel()

void RCCResourceLibrary::setCompressLevel ( int c)
inline

Definition at line 71 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setCompressThreshold()

void RCCResourceLibrary::setCompressThreshold ( int t)
inline

Definition at line 74 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setFormat()

void RCCResourceLibrary::setFormat ( Format f)
inline

Definition at line 37 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setInitName()

void RCCResourceLibrary::setInitName ( const QString & name)
inline

Definition at line 52 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setInputFiles()

void RCCResourceLibrary::setInputFiles ( const QStringList & files)
inline

Definition at line 40 of file rcc.h.

References files.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setNoZstd()

void RCCResourceLibrary::setNoZstd ( bool v)
inline

Definition at line 87 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setOutputName()

void RCCResourceLibrary::setOutputName ( const QString & name)
inline

Definition at line 55 of file rcc.h.

◆ setResourceRoot()

void RCCResourceLibrary::setResourceRoot ( const QString & root)
inline

Definition at line 77 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setUseNameSpace()

void RCCResourceLibrary::setUseNameSpace ( bool v)
inline

Definition at line 80 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ setVerbose()

void RCCResourceLibrary::setVerbose ( bool b)
inline

Definition at line 49 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ useNameSpace()

bool RCCResourceLibrary::useNameSpace ( ) const
inline

Definition at line 81 of file rcc.h.

Referenced by runRcc().

+ Here is the caller graph for this function:

◆ verbose()

bool RCCResourceLibrary::verbose ( ) const
inline

Definition at line 50 of file rcc.h.

Referenced by runRcc(), and RCCFileInfo::writeDataBlob().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ RCCFileInfo

friend class RCCFileInfo
friend

Definition at line 104 of file rcc.h.


The documentation for this class was generated from the following files: