00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <qimage.h>
00023 #include <qdict.h>
00024 #include <qmime.h>
00025 #include <qdragobject.h>
00026
00027
00028 static const unsigned char image_0_data[] = {
00029 0x00,0x00,0x07,0x90,0x78,0x9c,0xed,0xd4,0xb9,0x0d,0x00,0x30,0x08,0x03,
00030 0xc0,0x4c,0xc4,0x44,0xec,0xc3,0x5e,0x14,0xac,0x95,0x67,0x81,0xc4,0xa6,
00031 0x88,0x28,0xb0,0xe4,0x0a,0xe9,0x68,0x10,0x11,0x31,0xe2,0x43,0x77,0x26,
00032 0xd2,0x8c,0x7b,0xcb,0x99,0x8b,0x08,0x6d,0x23,0xae,0xaa,0xd2,0x36,0xe2,
00033 0x9a,0x19,0x6d,0x23,0xae,0xbb,0xd3,0x36,0xe2,0x9e,0xb0,0x36,0xe2,0x66,
00034 0x6e,0xe4,0xe5,0xde,0xf6,0xb5,0xdb,0x6e,0xbb,0x75,0xdc,0x6c,0xd1,0x5f,
00035 0x5c,0xb1,0x0b,0x8b,0xb5,0x39,0xe9
00036 };
00037
00038
00039 static const unsigned char image_1_data[] = {
00040 0x00,0x00,0x07,0x90,0x78,0x9c,0xed,0x94,0x61,0x0a,0xc0,0x20,0x08,0x85,
00041 0x77,0xf6,0xd8,0xd9,0xbc,0x56,0x0d,0x06,0x43,0x4b,0x9d,0x8e,0x67,0xbf,
00042 0x26,0x3c,0x0c,0xaa,0x4f,0x7b,0x90,0x44,0x74,0xd0,0xaf,0xb4,0xae,0xe8,
00043 0x5c,0xda,0xfe,0x17,0xa6,0x55,0x67,0x5e,0x57,0xbc,0xa3,0xda,0x9b,0x37,
00044 0xcf,0x32,0x4c,0xe1,0x49,0xbf,0xe3,0xc9,0xca,0x59,0xeb,0xbe,0x57,0x4f,
00045 0x30,0xa3,0x39,0xc0,0x4d,0x33,0x83,0xdc,0xed,0xfd,0x06,0x7d,0xb6,0xe4,
00046 0x32,0xdb,0x99,0x13,0x67,0x83,0x99,0xaa,0xbf,0x00,0xe6,0xe2,0x2f,0x88,
00047 0x29,0xfa,0x05,0x32,0x97,0x7f,0x08,0x62,0x0a,0x2e,0x90,0x69,0xcd,0x0d,
00048 0xc4,0x7c,0xa8,0xd2,0x00,0x41,0xdd,0x07,0x9b
00049 };
00050
00051
00052 static const unsigned char image_2_data[] = {
00053 0x00,0x00,0x07,0x90,0x78,0x9c,0x3b,0x76,0xec,0x18,0xc3,0x31,0x1a,0x61,
00054 0x20,0xf8,0x4f,0x4d,0x8c,0x62,0x6e,0x53,0x0b,0x04,0x03,0xd9,0x07,0x0f,
00055 0x1e,0x24,0x09,0x23,0xeb,0x19,0xac,0xe6,0x5e,0xdc,0x7a,0x0a,0xc5,0x2c,
00056 0x52,0xc3,0x01,0xa4,0x1f,0xd9,0x0c,0x5c,0xee,0x45,0xd6,0x3f,0x90,0xe6,
00057 0x12,0x1b,0xbe,0xa3,0xe6,0x12,0x69,0x2e,0x54,0x8e,0x24,0x8c,0xa6,0x17,
00058 0xa7,0xb9,0x94,0xe0,0x81,0x30,0x97,0x9c,0xf2,0x86,0x4a,0xe6,0xd2,0x2a,
00059 0xde,0x46,0xcd,0x25,0xde,0x5c,0x6a,0xd6,0x45,0xb4,0xaa,0x2b,0x61,0x18,
00060 0x00,0xf8,0xf3,0xdc,0x0e
00061 };
00062
00063
00064 static const unsigned char image_3_data[] = {
00065 0x00,0x00,0x07,0x90,0x78,0x9c,0x95,0x94,0x21,0x94,0x83,0x30,0x10,0x44,
00066 0x2b,0x4f,0x22,0xb1,0x48,0x24,0x12,0x8b,0x3c,0x79,0x12,0x5b,0x89,0xac,
00067 0xac,0x45,0x46,0x46,0x62,0x23,0x91,0x48,0x2c,0x12,0x19,0x89,0x45,0x22,
00068 0x2b,0xf7,0x76,0x96,0x84,0xa6,0x1c,0xbd,0x57,0xe0,0xcd,0x5b,0x08,0xe1,
00069 0x67,0x32,0x24,0x0c,0xc3,0x70,0x19,0x0e,0xd4,0x75,0x1d,0xf5,0x7d,0x4f,
00070 0xe3,0x38,0xbe,0x88,0x9f,0x89,0xf0,0x0c,0x6a,0xdb,0x56,0xea,0x11,0xe3,
00071 0x48,0xe8,0xbb,0x2c,0x0b,0xcd,0xf3,0xfc,0x47,0x68,0xf7,0x9a,0xa6,0xe9,
00072 0x34,0xd7,0x7b,0x83,0xf6,0x7e,0x43,0xdf,0xee,0xfa,0x23,0xae,0xcf,0x21,
00073 0x54,0xd8,0x86,0x6b,0xe8,0x64,0x0e,0xd2,0x7f,0xe7,0xe7,0x25,0x57,0xdf,
00074 0x0e,0xf6,0x99,0x0c,0xf6,0xfe,0xf6,0xf2,0xe3,0x9c,0xe5,0xba,0xfe,0x6f,
00075 0x99,0xbe,0xba,0x79,0x7d,0xc4,0x7d,0xc7,0x3b,0xd2,0x19,0xbf,0xf0,0x80,
00076 0x6f,0x8f,0x35,0x85,0x75,0x74,0x24,0x6b,0xad,0x54,0x63,0x8c,0xa8,0xfb,
00077 0xc7,0x37,0xc6,0x6f,0x9a,0x86,0x6e,0xd5,0x4d,0x7c,0xe0,0x5d,0xf0,0x8f,
00078 0xaa,0xe7,0x6b,0xa5,0xa9,0xfc,0x29,0xa9,0x28,0x0a,0xaa,0xaa,0xea,0x8f,
00079 0x7f,0x61,0x6a,0x4d,0xf5,0xbd,0xa6,0xfa,0x76,0xa7,0xfb,0x3f,0x52,0xdc,
00080 0x47,0xdf,0x15,0xe9,0x5a,0xb1,0x87,0x8a,0x8a,0x3c,0xa7,0x34,0x49,0x28,
00081 0x89,0x63,0xe1,0xc3,0x7f,0xe8,0x73,0xb2,0x13,0x2d,0xd8,0x53,0xf0,0x62,
00082 0x21,0xfb,0x22,0x3b,0x72,0x65,0x99,0xb1,0xa1,0x72,0x2c,0x49,0x0f,0x9a,
00083 0x4c,0x63,0x84,0x95,0xc4,0x89,0x28,0x8e,0x62,0x19,0x07,0x4c,0xc3,0xcc,
00084 0x65,0x5e,0xe8,0x93,0x83,0xe9,0x94,0xf2,0xf9,0xc5,0x27,0x2a,0x72,0x81,
00085 0xf7,0x2c,0xcb,0xc4,0x6f,0x14,0x45,0xc2,0x6f,0x4d,0x4b,0x8f,0xc7,0xe3,
00086 0x23,0x26,0x0e,0x9e,0x0d,0x5d,0xa9,0xa2,0x8c,0x4f,0x4e,0x65,0x6d,0xe3,
00087 0xb9,0x21,0x1f,0x70,0x2f,0x97,0x8b,0xe3,0x1a,0x37,0x47,0xde,0xff,0xc3,
00088 0x28,0xd5,0x86,0xf3,0xe7,0x4c,0xe6,0xe9,0x99,0xcd,0x5a,0x2d,0xf5,0xb6,
00089 0x97,0x5c,0xfc,0x7b,0x5a,0x29,0xc9,0x60,0xe5,0xc6,0xf2,0x3d,0xbb,0xb6,
00090 0x93,0x75,0x02,0xef,0x18,0xa7,0xe5,0xcc,0x50,0x91,0x5d,0xeb,0x64,0x5c,
00091 0xfb,0xb3,0xad,0x25,0xa3,0x1b,0xf9,0xd6,0x60,0x56,0xd7,0x8a,0xb9,0xd1,
00092 0xe6,0x77,0xe5,0xb6,0x2b,0x37,0xe0,0x3d,0xd5,0x04,0x35,0x90,0x30,0x57,
00093 0x61,0x5d,0x84,0xdc,0x18,0x7e,0x79,0xbc,0xcd,0xd3,0x3b,0x0e,0xde,0xdf,
00094 0xb1,0x20,0xdc,0xc3,0x97,0xaa,0x6b,0xc7,0x5d,0x73,0xf8,0xf9,0xfe,0x96,
00095 0xf6,0x17,0x8f,0x3b,0xc6,0xe1,0xfd,0x36,0xff,0x35,0x03,0xe5,0xd6,0x31,
00096 0xfc,0xc2,0x2b,0xf6,0x2b,0xfc,0x62,0x3c,0x3c,0xc3,0x7c,0x94,0x72,0x15,
00097 0xf7,0xfb,0x6b,0x91,0xde,0x6a,0xe3,0xaf,0x7d,0x0e,0x6e,0xfe,0xfe,0xff,
00098 0x8d,0x7d,0xeb,0xf7,0x4b,0xc2,0x35,0x15,0xa5,0x9b,0xb2,0x14,0xca,0x44,
00099 0x79,0xe6,0x95,0x3b,0x3d,0xdb,0x3d,0x73,0xff,0xaf,0xb9,0x96,0xbc,0xcf,
00100 0xf3,0x42,0x94,0xe7,0xee,0x9d,0x40,0x29,0xf3,0x45,0x3c,0x2e,0xbc,0x41,
00101 0xd1,0x57,0x24,0xfb,0x0d,0x59,0x85,0xbc,0x5f,0xf1,0xda,0x28,0xbc
00102 };
00103
00104
00105 static const unsigned char image_4_data[] = {
00106 0x00,0x00,0x07,0x90,0x78,0x9c,0x3b,0x76,0xec,0x18,0xc3,0xb1,0x51,0x3c,
00107 0xac,0x71,0x0b,0x03,0xc3,0x7f,0xac,0xb8,0xa9,0xe5,0x3f,0x3e,0x3d,0x24,
00108 0x9b,0x87,0x86,0xf1,0xe9,0xc5,0x67,0x1e,0x41,0x7b,0xb1,0xb8,0x1b,0x5d,
00109 0x3f,0x31,0xe6,0x11,0x72,0x17,0x3e,0xbf,0x92,0x1a,0xf6,0xc4,0x98,0x4b,
00110 0x4e,0x9c,0x0e,0xa4,0x7b,0x69,0x19,0xbe,0xc4,0x98,0x4d,0x4c,0x3a,0x26,
00111 0x29,0x4c,0x81,0xe6,0x90,0x1b,0x1f,0x44,0xb9,0x93,0x8a,0x66,0x8e,0xe2,
00112 0xe1,0x89,0x01,0xf2,0xaa,0x22,0xa2
00113 };
00114
00115
00116 static const unsigned char image_5_data[] = {
00117 0x00,0x00,0x07,0x90,0x78,0x9c,0x3b,0x76,0xec,0x18,0xc3,0xb1,0x51,0x3c,
00118 0xe4,0x71,0x4b,0x53,0xcb,0xff,0x16,0x06,0x06,0xac,0x98,0x6c,0x33,0x71,
00119 0x98,0x47,0xac,0xf9,0xd8,0xe4,0x90,0xdd,0x49,0xac,0xbd,0xd8,0xe4,0x70,
00120 0xe9,0x21,0xd5,0x5f,0xd8,0xf8,0xe4,0x9a,0x8b,0x2f,0xcc,0x28,0x35,0x17,
00121 0x97,0xd9,0x83,0xd1,0xbd,0xa4,0xa4,0x15,0x62,0xd2,0x03,0x31,0x69,0x91,
00122 0xa0,0x1e,0xa0,0x3d,0xe4,0xe6,0x03,0x62,0xd2,0xd0,0x28,0x1e,0xc5,0xd4,
00123 0xc0,0x00,0x90,0x64,0x22,0xa2
00124 };
00125
00126
00127 static const unsigned char image_6_data[] = {
00128 0x00,0x00,0x07,0x90,0x78,0x9c,0xe5,0xd2,0x51,0x0a,0x00,0x21,0x08,0x05,
00129 0xc0,0x3d,0xbb,0x87,0xf3,0x5a,0xd5,0x42,0x81,0x44,0x46,0xea,0xb3,0x9f,
00130 0x02,0x49,0x04,0x07,0x11,0x99,0xf9,0xe3,0xcb,0xd1,0x5e,0xb1,0xd4,0x5f,
00131 0x72,0xff,0x1a,0xc2,0x9d,0x8d,0xa8,0xa9,0x39,0x48,0x77,0x58,0x88,0x1d,
00132 0xac,0x6c,0xa4,0x99,0xe9,0x22,0xf7,0x2a,0x83,0xfa,0xac,0x04,0xb4,0x49,
00133 0x78,0x23,0x8f,0xfa,0xd2,0x93,0xff,0x9c,0x7b,0x4c,0xcd,0xf5,0xd8,0x5a,
00134 0xff,0xca,0x39,0xb5,0x77,0xbd,0x59,0x6e,0x64,0x17,0x16,0xd7,0xb2,0xdf,
00135 0x93,0x79,0xbc,0xb7,0x86,0xba,0xd3,0x8c,0xa8,0x14,0x8b,0x21,0xd1
00136 };
00137
00138
00139 static const unsigned char image_7_data[] = {
00140 0x00,0x00,0x07,0x90,0x78,0x9c,0xd5,0x95,0x41,0x0a,0xc0,0x20,0x0c,0x04,
00141 0xfb,0x30,0x5f,0x97,0xab,0xff,0xca,0xaf,0xa4,0xad,0x87,0x80,0x94,0x64,
00142 0xd5,0x24,0x3d,0x18,0x58,0x14,0x23,0xe3,0x88,0x07,0x99,0xf9,0xe2,0x83,
00143 0xf2,0xd6,0x8d,0x12,0xe1,0x5a,0x15,0x61,0x0b,0xf7,0xeb,0x29,0x6b,0x32,
00144 0x66,0xfb,0x8e,0xf3,0x4c,0x5f,0x9a,0xc4,0xeb,0x4b,0xa0,0x8f,0xd8,0x96,
00145 0xaf,0xac,0x13,0xb8,0x4f,0xef,0xb5,0x52,0x54,0x36,0xf2,0x1d,0xb9,0x56,
00146 0xaf,0xd5,0xaa,0xb2,0xa3,0xbe,0xbd,0x34,0x76,0xd4,0xd7,0x7a,0xcb,0x88,
00147 0xaf,0x75,0x56,0xd4,0x77,0x85,0xbb,0xeb,0x8b,0xf6,0xff,0xed,0x8b,0xe2,
00148 0xf5,0x9d,0xc5,0xeb,0xbb,0xca,0x3d,0xc9,0x77,0x37,0x19,0xff,0x98,0x95,
00149 0x07,0x8f,0x97,0x98,0x5d
00150 };
00151
00152
00153 static const unsigned char image_8_data[] = {
00154 0x00,0x00,0x07,0x90,0x78,0x9c,0xbd,0x95,0x01,0x0a,0x80,0x20,0x0c,0x45,
00155 0x3d,0x7b,0x78,0xb3,0x60,0xd7,0x32,0x15,0x46,0xf2,0xcb,0xcd,0xcd,0x95,
00156 0xf0,0x11,0xd4,0xbd,0xbd,0x0a,0x92,0x88,0x12,0xfd,0x9c,0x3a,0x0a,0x26,
00157 0x82,0xd1,0x53,0xca,0x9d,0xc9,0x99,0x2d,0xa6,0x91,0xcd,0xeb,0xf9,0xc8,
00158 0x25,0xd5,0xf4,0x79,0xe4,0x62,0x1f,0xe1,0x3c,0x72,0xf1,0x0c,0x9d,0xa4,
00159 0xe6,0xb5,0x0e,0x7d,0x79,0xcf,0xc8,0x7d,0xd4,0x29,0xbe,0xab,0xb1,0xf8,
00160 0x7a,0x67,0xd5,0xd7,0x3b,0x5b,0x7d,0x5b,0xdf,0x85,0x58,0x7d,0x5b,0x8d,
00161 0x34,0x78,0x3f,0x3b,0x7c,0xb9,0x0e,0x33,0x72,0x91,0x1d,0xe5,0x8b,0xec,
00162 0x48,0xdf,0x91,0x1d,0xe1,0x3b,0xfb,0x8e,0x3b,0xbe,0xb3,0x5e,0xbb,0xbe,
00163 0x12,0xd7,0xeb,0x2b,0xbd,0x73,0xf1,0xff,0xab,0x3c,0xaf,0xe4,0xab,0xdd,
00164 0x23,0xab,0x9e,0x98,0xaf,0xee,0xc6,0x0b,0x49,0xaa,0x3e,0x5c
00165 };
00166
00167
00168 static const unsigned char image_9_data[] = {
00169 0x00,0x00,0x07,0x90,0x78,0x9c,0xd5,0x94,0xa1,0x72,0xc3,0x30,0x10,0x44,
00170 0xfb,0x2b,0x81,0xf9,0x84,0xd0,0x7c,0x86,0xa9,0xa1,0xa1,0xa0,0xa9,0xa0,
00171 0xa0,0xa0,0xa8,0xa0,0xa0,0xa0,0xa8,0xa0,0xa0,0xa1,0xa8,0xa1,0xa1,0xe1,
00172 0xf6,0xf6,0x9c,0x92,0x4e,0x67,0xe2,0xb6,0x99,0xce,0x14,0xec,0x24,0x71,
00173 0xe4,0xa7,0xbd,0xbd,0x93,0x6a,0xad,0x6f,0xf5,0x9f,0x2a,0xe7,0x0c,0xef,
00174 0x3d,0xe6,0x79,0x86,0x31,0x93,0x8a,0xdf,0x43,0x08,0x28,0xa5,0xe0,0x27,
00175 0xcc,0x94,0x92,0x30,0x0c,0x7c,0xb0,0xa8,0x2d,0xa1,0xf5,0x43,0xa9,0x70,
00176 0x9f,0x83,0xcf,0x7d,0xbf,0xcb,0x1c,0x86,0x01,0x21,0x7a,0x6c,0x68,0xaa,
00177 0x75,0xaf,0xe8,0x5b,0xc1,0xb2,0x09,0x6b,0x8d,0x98,0x1d,0xfd,0x9b,0xd3,
00178 0xbe,0xb9,0xce,0x88,0xcf,0x5c,0x82,0x72,0xc8,0xdb,0x7b,0x05,0x96,0x82,
00179 0xbd,0x16,0xf4,0x1c,0x91,0x9b,0x47,0x59,0x3c,0xac,0x33,0x70,0xce,0x9d,
00180 0xe2,0x32,0x3b,0xd6,0xbe,0x63,0x51,0x2e,0x7a,0x43,0x2f,0x19,0xad,0x45,
00181 0xd5,0x26,0xb5,0x2c,0x3e,0x20,0x55,0x27,0xf2,0x98,0xa6,0xf1,0x54,0x1e,
00182 0xd6,0xce,0xa8,0x4b,0xd2,0xda,0x7b,0xcf,0xe2,0x2f,0x1d,0xfe,0x56,0x61,
00183 0x35,0xa7,0x7e,0xbb,0x8f,0x88,0xc9,0xea,0xf3,0xd9,0x4e,0xda,0xc7,0x67,
00184 0x5c,0xf6,0x6a,0x59,0xa5,0xde,0x5d,0x72,0x13,0x16,0x55,0x7a,0x40,0x96,
00185 0xba,0x5b,0x0b,0xd8,0x98,0x83,0xb5,0x08,0x45,0xfa,0x26,0x7e,0xad,0x37,
00186 0xb0,0xf2,0xfb,0x0c,0x97,0x7d,0x67,0x7f,0xc8,0x2b,0xdd,0x2b,0x73,0x29,
00187 0x0f,0xa6,0x77,0xf0,0x69,0x46,0x14,0x6e,0xcc,0x0e,0xee,0x24,0x97,0x3d,
00188 0x63,0x0e,0x6d,0x4d,0xca,0x53,0x3d,0xea,0x2f,0xd2,0x23,0xfa,0x0c,0x55,
00189 0x94,0xc9,0xb6,0x9a,0xc3,0x99,0xde,0x71,0x0d,0x7d,0xd4,0x1e,0x95,0xa7,
00190 0xfd,0x69,0x16,0x25,0xc9,0x67,0x64,0xfd,0x32,0xd3,0xf9,0x50,0x10,0xdf,
00191 0x93,0x19,0xc0,0xb9,0x3c,0x7b,0x1e,0x8a,0x64,0x19,0xab,0x3d,0x24,0x1e,
00192 0x9b,0xcc,0x32,0x73,0x75,0x69,0x94,0x1c,0x26,0x95,0xf5,0xdf,0x9b,0x61,
00193 0x7a,0xe6,0xdc,0xc7,0x7a,0xe4,0xa8,0xb5,0x47,0xa3,0x59,0xd2,0xa7,0x0d,
00194 0x83,0x6a,0x1c,0x47,0x9d,0x85,0xb6,0x34,0xf5,0xfc,0x8c,0xcf,0xff,0xf5,
00195 0x4e,0x90,0xf3,0x1a,0xb2,0xf8,0xa5,0x24,0x4b,0x66,0xca,0x9e,0x71,0x06,
00196 0xf4,0x3c,0x3e,0xe6,0x8b,0x4c,0xee,0xc1,0x67,0xcf,0x32,0x21,0x9b,0xbe,
00197 0x39,0xf7,0xe4,0xb3,0x3f,0xd4,0x64,0x46,0x79,0x36,0x7d,0x7e,0x5f,0x7d,
00198 0x5c,0xaf,0x57,0xdc,0x6e,0x37,0x7d,0xef,0x99,0x77,0x9e,0x25,0xfa,0xe2,
00199 0x5a,0xde,0x6d,0x31,0x46,0xae,0xff,0xf2,0x1d,0xfe,0x77,0xbf,0xdf,0x95,
00200 0xff,0xc5,0xde,0xbf,0x92,0xde,0x2f,0xd2,0xcb,0xcb,0xe5,0xa2,0xde,0xe9,
00201 0xe5,0x55,0xec,0x8f,0x7b,0x86,0x5c,0xf2,0xe9,0xfd,0x95,0x6c,0x66,0xf8,
00202 0xd1,0xcf,0x57,0x72,0xff,0x42,0xef,0x35,0x6d,0xd0,0x3b
00203 };
00204
00205 static struct EmbedImage {
00206 int width, height, depth;
00207 const unsigned char *data;
00208 ulong compressed;
00209 int numColors;
00210 const QRgb *colorTable;
00211 bool alpha;
00212 const char *name;
00213 } embed_image_vec[] = {
00214 { 22, 22, 32, (const unsigned char*)image_0_data, 91, 0, 0, TRUE, "filenew" },
00215 { 22, 22, 32, (const unsigned char*)image_1_data, 121, 0, 0, TRUE, "fileopen" },
00216 { 22, 22, 32, (const unsigned char*)image_2_data, 103, 0, 0, TRUE, "filesave" },
00217 { 22, 22, 32, (const unsigned char*)image_3_data, 517, 0, 0, TRUE, "print" },
00218 { 22, 22, 32, (const unsigned char*)image_4_data, 91, 0, 0, TRUE, "undo" },
00219 { 22, 22, 32, (const unsigned char*)image_5_data, 90, 0, 0, TRUE, "redo" },
00220 { 22, 22, 32, (const unsigned char*)image_6_data, 111, 0, 0, TRUE, "editcut" },
00221 { 22, 22, 32, (const unsigned char*)image_7_data, 131, 0, 0, TRUE, "editcopy" },
00222 { 22, 22, 32, (const unsigned char*)image_8_data, 152, 0, 0, TRUE, "editpaste" },
00223 { 22, 22, 32, (const unsigned char*)image_9_data, 473, 0, 0, TRUE, "searchfind" },
00224 { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
00225 };
00226
00227 static QImage uic_findImage( const QString& name )
00228 {
00229 for ( int i=0; embed_image_vec[i].data; i++ ) {
00230 if ( QString::fromUtf8(embed_image_vec[i].name) == name ) {
00231 QByteArray baunzip;
00232 baunzip = qUncompress( embed_image_vec[i].data,
00233 embed_image_vec[i].compressed );
00234 QImage img((uchar*)baunzip.data(),
00235 embed_image_vec[i].width,
00236 embed_image_vec[i].height,
00237 embed_image_vec[i].depth,
00238 (QRgb*)embed_image_vec[i].colorTable,
00239 embed_image_vec[i].numColors,
00240 QImage::BigEndian
00241 );
00242 img = img.copy();
00243 if ( embed_image_vec[i].alpha )
00244 img.setAlphaBuffer(TRUE);
00245 return img;
00246 }
00247 }
00248 return QImage();
00249 }
00250
00251 class MimeSourceFactory_qnet : public QMimeSourceFactory
00252 {
00253 public:
00254 MimeSourceFactory_qnet() {}
00255 ~MimeSourceFactory_qnet() {}
00256 const QMimeSource* data( const QString& abs_name ) const {
00257 const QMimeSource* d = QMimeSourceFactory::data( abs_name );
00258 if ( d || abs_name.isNull() ) return d;
00259 QImage img = uic_findImage( abs_name );
00260 if ( !img.isNull() )
00261 ((QMimeSourceFactory*)this)->setImage( abs_name, img );
00262 return QMimeSourceFactory::data( abs_name );
00263 };
00264 };
00265
00266 static QMimeSourceFactory* factory = 0;
00267
00268 void qInitImages_qnet()
00269 {
00270 if ( !factory ) {
00271 factory = new MimeSourceFactory_qnet;
00272 QMimeSourceFactory::defaultFactory()->addFactory( factory );
00273 }
00274 }
00275
00276 void qCleanupImages_qnet()
00277 {
00278 if ( factory ) {
00279 QMimeSourceFactory::defaultFactory()->removeFactory( factory );
00280 delete factory;
00281 factory = 0;
00282 }
00283 }
00284
00285 class StaticInitImages_qnet
00286 {
00287 public:
00288 StaticInitImages_qnet() { qInitImages_qnet(); }
00289 #if defined(Q_OS_SCO) || defined(Q_OS_UNIXWARE)
00290 ~StaticInitImages_qnet() { }
00291 #else
00292 ~StaticInitImages_qnet() { qCleanupImages_qnet(); }
00293 #endif
00294 };
00295
00296 static StaticInitImages_qnet staticImages;