Classes | |
| struct | WriteDeclaration |
| class | WriteIconData |
| class | WriteIconDeclaration |
| class | WriteIconInitialization |
| struct | ClassInfoEntry |
| struct | WriteIncludes |
| struct | WriteInitialization |
Functions | |
| static QByteArray | unzipXPM (QString data, ulong &length) |
Variables | |
| static ClassInfoEntry | qclass_lib_map [] |
| static QByteArray CPP::unzipXPM | ( | QString | data, | |
| ulong & | length | |||
| ) | [static] |
Definition at line 33 of file cppwriteicondata.cpp.
References data, h, i, l, and qUncompress().
Referenced by CPP::WriteIconData::acceptImage().
00034 { 00035 #ifndef QT_NO_COMPRESS 00036 const int lengthOffset = 4; 00037 int baSize = data.length() / 2 + lengthOffset; 00038 uchar *ba = new uchar[baSize]; 00039 for (int i = lengthOffset; i < baSize; ++i) { 00040 char h = data[2 * (i-lengthOffset)].toLatin1(); 00041 char l = data[2 * (i-lengthOffset) + 1].toLatin1(); 00042 uchar r = 0; 00043 if (h <= '9') 00044 r += h - '0'; 00045 else 00046 r += h - 'a' + 10; 00047 r = r << 4; 00048 if (l <= '9') 00049 r += l - '0'; 00050 else 00051 r += l - 'a' + 10; 00052 ba[i] = r; 00053 } 00054 // qUncompress() expects the first 4 bytes to be the expected length of the 00055 // uncompressed data 00056 ba[0] = (length & 0xff000000) >> 24; 00057 ba[1] = (length & 0x00ff0000) >> 16; 00058 ba[2] = (length & 0x0000ff00) >> 8; 00059 ba[3] = (length & 0x000000ff); 00060 QByteArray baunzip = qUncompress(ba, baSize); 00061 delete[] ba; 00062 return baunzip; 00063 #else 00064 Q_UNUSED(data); 00065 Q_UNUSED(length); 00066 return QByteArray(); 00067 #endif 00068 }
Here is the call graph for this function:

ClassInfoEntry CPP::qclass_lib_map[] [static] |
Initial value:
{
#define QT_CLASS_LIB(klass, module, header)
{ 0, 0, 0 }
}
Definition at line 41 of file cppwriteincludes.cpp.
Referenced by CPP::WriteIncludes::WriteIncludes().
1.5.1