summaryrefslogtreecommitdiffstats
path: root/doc/qembed.doc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-07-10 15:24:15 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-07-10 15:24:15 -0500
commitbd0f3345a938b35ce6a12f6150373b0955b8dd12 (patch)
tree7a520322212d48ebcb9fbe1087e7fca28b76185c /doc/qembed.doc
downloadqt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.tar.gz
qt3-bd0f3345a938b35ce6a12f6150373b0955b8dd12.zip
Add Qt3 development HEAD version
Diffstat (limited to 'doc/qembed.doc')
-rw-r--r--doc/qembed.doc71
1 files changed, 71 insertions, 0 deletions
diff --git a/doc/qembed.doc b/doc/qembed.doc
new file mode 100644
index 0000000..8b5e7e2
--- /dev/null
+++ b/doc/qembed.doc
@@ -0,0 +1,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.
+*/