You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/qembed.doc

72 lines
1.8 KiB

/*!
\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"
TQImage 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.
*/