Public Methods |
| ZResFileReader () |
| default constructor. More...
|
| ZResFileReader (const QString &fileName) |
| constructor taking a file name as an argument. More...
|
virtual | ~ZResFileReader () |
| destructor. More...
|
bool | setFileName (const QString &fileName) |
| sets the filename for this resource reader. More...
|
const QString& | fileName () const |
| return the filename used by this resource reader. More...
|
virtual bool | exists (const QString &ID) const |
| return a value indicating whether or not a given string ID exists. More...
|
virtual bool | get (const QString &ID, unsigned char **ppOutData, int *pOutLength) const |
| get data for a resource. More...
|
virtual QString | getFirstID () |
| get the first resource ID in this resource reader. More...
|
virtual QString | getNextID () |
| get the next resource ID in this resource reader. More...
|
Protected Methods |
void | init (const QString &fileName) |
| init is called by the constructors. More...
|
void | reset () |
| reset resets the object state. More...
|
bool | load () |
QString | getID (unsigned hashTableEntryNum) const |
| getID return the resource ID for a given hash table entry number. More...
|
const ZResHTEntry* | getHashTableEntry (const QString &ID) const |
| returns a pointer to a hashTableEntry for a given ID. More...
|
bool | getDataAtOffset (unsigned offset, unsigned char **ppOutData, int *pOutLength) const |
| returns a pointer to the data at a given file offset returns false if an error occurs. More...
|
bool | getDataAtOffset (unsigned offset, QString &resourceFileName, unsigned char **ppOutData, int *pOutLength) const |
Protected Attributes |
bool | bLoadFailed |
| load actually loads the resource table. More...
|
QString | m_fileName |
| the name of the resource file. More...
|
bool | loaded |
int | fd |
unsigned int | fileLength |
unsigned char* | pResources |
unsigned char* | pIDs |
unsigned | hashTableSize |
ZResHTEntry* | pHashTable |
unsigned char* | pData |
unsigned char* | pEnd |
unsigned | currentIteratorEntry |
Use ZResFileReader to read QPixmaps or other data from a single resource file. If you want to use the current application skin (which is made of a number of resource files, see ZSkin.