summaryrefslogtreecommitdiffstats
path: root/doc/uic.doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/uic.doc')
-rw-r--r--doc/uic.doc100
1 files changed, 100 insertions, 0 deletions
diff --git a/doc/uic.doc b/doc/uic.doc
new file mode 100644
index 0000000..1cbd202
--- /dev/null
+++ b/doc/uic.doc
@@ -0,0 +1,100 @@
+/*!
+ \page uic.html
+ \title User Interface Compiler (uic)
+
+ \omit KEEP THIS FILE SYNCHRONIZED WITH uic.1 \endomit
+
+This page documents the \e{User Interface Compiler} for the Qt GUI
+toolkit. The \e uic reads a user interface definition
+(.ui) file in XML as generated by \link designer-manual.book Qt
+Designer\endlink and creates corresponding C++ header or source files.
+It can also generate an image file to embed raw image data in C++
+source code.
+
+\section1 Options
+
+\section2 File Generation Options
+
+Generate declaration:
+\code
+uic [options] <file>
+\endcode
+
+Generate implementation:
+\code
+uic [options] -impl <headerfile> <file>
+\endcode
+\list
+\i \<headerfile\> - name of the declaration file
+\endlist
+
+Generate image collection:
+\code
+uic [options] -embed <project> <image1> <image2> <image3> ...
+\endcode
+\list
+\i \<project\> - project name
+\i \<image[0..n]\> - image files
+\endlist
+
+For convenience, \e uic can also generate declaration or
+implementation stubs for subclasses.
+
+Generate subclass declaration:
+\code
+uic [options] -subdecl <classname> <headerfile> <file>
+\endcode
+\list
+\i \<classname\> - name of the subclass to generate
+\i \<headerfile\> - declaration file of the <b>baseclass</b>
+\endlist
+
+Generate subclass implementation:
+\code
+uic [options] -subimpl <classname> <headerfile> <file>
+\endcode
+\list
+\i \<classname\> - name of the subclass to generate
+\i \<headerfile\> - declaration file of the <b>subclass</b>
+\endlist
+
+\section2 General Options
+
+\list
+\i \c{-o file} - write output to 'file' rather than to stdout.
+\i \c{-nofwd} - omit forward declarations of custom classes in the
+generated header file. This is necessary if typedef classes are used.
+\i \c{-tr func} - use \c{func(sourceText, comment)} rather than
+trUtf8(sourceText, comment) for internationalization.
+\i \c{-pch file} - add \c{#include "file"} as the first statement in the implementation file.
+\endlist
+
+\section1 Usage
+
+\e uic is almost always invoked by \c{make (1)}, rather than by hand.
+
+Here are useful makefile rules if you only use GNU make:
+\code
+ %.h: %.ui
+ uic $< -o $@
+
+ %.cpp: %.ui
+ uic -impl $*.h $< -o $@
+\endcode
+If you want to write portably, you can use individual rules of the
+following form:
+\code
+ NAME.h: NAME.ui
+ uic $< -o $@
+
+ NAME.cpp: NAME.ui
+ uic -impl $*.h $< -o $@
+\endcode
+You must also remember to add \c{NAME.cpp} to your SOURCES (substitute
+your favorite name) variable and \c{NAME.o} to your OBJECTS variable.
+
+(While we prefer to name our C++ source files .cpp, the \e uic doesn't
+care, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.)
+
+
+*/