File: qembed.doc

package info (click to toggle)
qt-x11-free 3:3.3.8b-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 82,260 kB
  • ctags: 72,611
  • sloc: cpp: 456,781; ansic: 129,082; sh: 11,455; yacc: 2,947; xml: 766; makefile: 566; perl: 495; lex: 458; sql: 29; lisp: 13
file content (71 lines) | stat: -rw-r--r-- 1,831 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*!
\page qembed.html

\title QEmbed - File and Image Embedder

The QEmbed tool, found in \c{qt/tools/qembed}, converts arbitrary files
into C++ code. This is useful for including image files and other resources
directly into your application rather than loading the data from external
files.

QEmbed can also generate uncompressed versions of images that can be included
directly into your application, thus avoiding both the external file and the
need to parse the image file format. This is useful for small images such as
icons for which compression is not a great gain.

\section1 Usage

\code
    qembed [ general-files ] [ --images image-files ]
\endcode

\list
\i \c{general-files}

These files can be any type of file.

\i \c{--images image-files}

These files must be in image formats supported by Qt.
\endlist

\section1 Output

The output from QEmbed is a C++ header file which you should
include in a C++ source file. In the source file, you should make a
wrapper function that suits your application. Two functions are
provided; your wrapper function could just call one of these, or
you can implement your own. Here's a simple example of usage for each
of the supplied functions:

\section2 qembed_findImage()

\code
    #include "generated_qembed_file.h"

    QImage myFindImage(const char* name)
    {
	return qembed_findImage(name);
    }
\endcode

Just call the generated function; \e name is the original image
filename <b>without</b> the extension.

\section2 qembed_findData()

\code
    #include "generated_qembed_file.h"

    QByteArray myFindData(const char* name)
    {
	return qembed_findData(name);
    }
\endcode

Just call the generated function; \e name is the original filename
<b>with</b> the extension

Alternatively, look at the output from QEmbed and write a function
tailored to your needs.
*/