Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

TQEmbed - File and Image Embedder

The TQEmbed tool, found in 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.

TQEmbed 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.

Usage

    qembed [ general-files ] [ --images image-files ]

Output

The output from TQEmbed 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:

qembed_findImage()

    #include "generated_qembed_file.h"

    TQImage myFindImage(const char* name)
    {
        return qembed_findImage(name);
    }

Just call the generated function; name is the original image filename without the extension.

qembed_findData()

    #include "generated_qembed_file.h"

    TQByteArray myFindData(const char* name)
    {
        return qembed_findData(name);
    }

Just call the generated function; name is the original filename with the extension

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


Copyright © 2007 TrolltechTrademarks
TQt 3.3.8