35 </table> |
35 </table> |
36 <h3>Functions</h3> |
36 <h3>Functions</h3> |
37 <table> |
37 <table> |
38 <tr> |
38 <tr> |
39 <td><a href="#compileUiDir">compileUiDir</a></td> |
39 <td><a href="#compileUiDir">compileUiDir</a></td> |
40 <td>Creates Python modules from Qt Designer .ui files in a directory or directory tree.</td> |
40 <td>Creates Python modules from Qt Designer .ui files in a directory or directory tree.</td> |
41 </tr><tr> |
41 </tr><tr> |
42 <td><a href="#compileUiFiles">compileUiFiles</a></td> |
42 <td><a href="#compileUiFiles">compileUiFiles</a></td> |
43 <td>Module function to compile the .ui files of a directory tree to Python sources.</td> |
43 <td>Module function to compile the .ui files of a directory tree to Python sources.</td> |
44 </tr><tr> |
44 </tr><tr> |
45 <td><a href="#compile_ui">compile_ui</a></td> |
45 <td><a href="#compile_ui">compile_ui</a></td> |
46 <td>Local function to compile a single .ui file.</td> |
46 <td>Local function to compile a single .ui file.</td> |
47 </tr><tr> |
47 </tr><tr> |
48 <td><a href="#pyName">pyName</a></td> |
48 <td><a href="#pyName">pyName</a></td> |
49 <td>Local function to create the Python source file name for the compiled .ui file.</td> |
49 <td>Local function to create the Python source file name for the compiled .ui file.</td> |
50 </tr> |
50 </tr> |
51 </table> |
51 </table> |
52 <hr /><hr /> |
52 <hr /><hr /> |
53 <a NAME="compileUiDir" ID="compileUiDir"></a> |
53 <a NAME="compileUiDir" ID="compileUiDir"></a> |
54 <h2>compileUiDir</h2> |
54 <h2>compileUiDir</h2> |
55 <b>compileUiDir</b>(<i>dir, recurse = False, map = None, **compileUi_args</i>) |
55 <b>compileUiDir</b>(<i>dir, recurse = False, map = None, **compileUi_args</i>) |
56 <p> |
56 <p> |
57 Creates Python modules from Qt Designer .ui files in a directory or |
57 Creates Python modules from Qt Designer .ui files in a directory or |
58 directory tree. |
58 directory tree. |
59 </p><p> |
59 </p><p> |
60 Note: This function is a modified version of the one found in PyQt4. |
60 Note: This function is a modified version of the one found in PyQt4. |
61 </p><dl> |
61 </p><dl> |
62 <dt><i>dir</i></dt> |
62 <dt><i>dir</i></dt> |
63 <dd> |
63 <dd> |
64 Name of the directory to scan for files whose name ends with |
64 Name of the directory to scan for files whose name ends with |
65 '.ui'. By default the generated Python module is created in the same |
65 '.ui'. By default the generated Python module is created in the same |
66 directory ending with '.py'. |
66 directory ending with '.py'. |
67 </dd><dt><i>recurse</i></dt> |
67 </dd><dt><i>recurse</i></dt> |
68 <dd> |
68 <dd> |
69 flag indicating that any sub-directories should be scanned. |
69 flag indicating that any sub-directories should be scanned. |
70 </dd><dt><i>map</i></dt> |
70 </dd><dt><i>map</i></dt> |
71 <dd> |
71 <dd> |
72 an optional callable that is passed the name of the directory |
72 an optional callable that is passed the name of the directory |
73 containing the '.ui' file and the name of the Python module that will be |
73 containing the '.ui' file and the name of the Python module that will be |
74 created. The callable should return a tuple of the name of the directory |
74 created. The callable should return a tuple of the name of the directory |
75 in which the Python module will be created and the (possibly modified) |
75 in which the Python module will be created and the (possibly modified) |
76 name of the module. |
76 name of the module. |
77 </dd><dt><i>compileUi_args</i></dt> |
77 </dd><dt><i>compileUi_args</i></dt> |
78 <dd> |
78 <dd> |
79 any additional keyword arguments that are passed to |
79 any additional keyword arguments that are passed to |
80 the compileUi() function that is called to create each Python module. |
80 the compileUi() function that is called to create each Python module. |
81 </dd> |
81 </dd> |
82 </dl> |
82 </dl> |
83 <div align="right"><a href="#top">Up</a></div> |
83 <div align="right"><a href="#top">Up</a></div> |
84 <hr /><hr /> |
84 <hr /><hr /> |
85 <a NAME="compileUiFiles" ID="compileUiFiles"></a> |
85 <a NAME="compileUiFiles" ID="compileUiFiles"></a> |
86 <h2>compileUiFiles</h2> |
86 <h2>compileUiFiles</h2> |
87 <b>compileUiFiles</b>(<i>dir, recurse = False</i>) |
87 <b>compileUiFiles</b>(<i>dir, recurse = False</i>) |
88 <p> |
88 <p> |
89 Module function to compile the .ui files of a directory tree to Python sources. |
89 Module function to compile the .ui files of a directory tree to Python sources. |
90 </p><dl> |
90 </p><dl> |
91 <dt><i>dir</i></dt> |
91 <dt><i>dir</i></dt> |
92 <dd> |
92 <dd> |
93 name of a directory to scan for .ui files (string or QString) |
93 name of a directory to scan for .ui files (string or QString) |
94 </dd><dt><i>recurse</i></dt> |
94 </dd><dt><i>recurse</i></dt> |
95 <dd> |
95 <dd> |
96 flag indicating to recurse into subdirectories (boolean) |
96 flag indicating to recurse into subdirectories (boolean) |
97 </dd> |
97 </dd> |
98 </dl> |
98 </dl> |
99 <div align="right"><a href="#top">Up</a></div> |
99 <div align="right"><a href="#top">Up</a></div> |
100 <hr /><hr /> |
100 <hr /><hr /> |
101 <a NAME="compile_ui" ID="compile_ui"></a> |
101 <a NAME="compile_ui" ID="compile_ui"></a> |
102 <h2>compile_ui</h2> |
102 <h2>compile_ui</h2> |
103 <b>compile_ui</b>(<i>ui_dir, ui_file</i>) |
103 <b>compile_ui</b>(<i>ui_dir, ui_file</i>) |
104 <p> |
104 <p> |
105 Local function to compile a single .ui file. |
105 Local function to compile a single .ui file. |
106 </p><dl> |
106 </p><dl> |
107 <dt><i>ui_dir</i></dt> |
107 <dt><i>ui_dir</i></dt> |
108 <dd> |
108 <dd> |
109 directory containing the .ui file (string) |
109 directory containing the .ui file (string) |
110 </dd><dt><i>ui_file</i></dt> |
110 </dd><dt><i>ui_file</i></dt> |
111 <dd> |
111 <dd> |
112 file name of the .ui file (string) |
112 file name of the .ui file (string) |
113 </dd> |
113 </dd> |
114 </dl> |
114 </dl> |
115 <div align="right"><a href="#top">Up</a></div> |
115 <div align="right"><a href="#top">Up</a></div> |
116 <hr /><hr /> |
116 <hr /><hr /> |
117 <a NAME="pyName" ID="pyName"></a> |
117 <a NAME="pyName" ID="pyName"></a> |
118 <h2>pyName</h2> |
118 <h2>pyName</h2> |
119 <b>pyName</b>(<i>py_dir, py_file</i>) |
119 <b>pyName</b>(<i>py_dir, py_file</i>) |
120 <p> |
120 <p> |
121 Local function to create the Python source file name for the compiled .ui file. |
121 Local function to create the Python source file name for the compiled .ui file. |
122 </p><dl> |
122 </p><dl> |
123 <dt><i>py_dir</i></dt> |
123 <dt><i>py_dir</i></dt> |
124 <dd> |
124 <dd> |
125 suggested name of the directory (string) |
125 suggested name of the directory (string) |
126 </dd><dt><i>py_file</i></dt> |
126 </dd><dt><i>py_file</i></dt> |
127 <dd> |
127 <dd> |
128 suggested name for the compile source file (string) |
128 suggested name for the compile source file (string) |
129 </dd> |
129 </dd> |
130 </dl><dl> |
130 </dl><dl> |
131 <dt>Returns:</dt> |
131 <dt>Returns:</dt> |
132 <dd> |
132 <dd> |
133 tuple of directory name (string) and source file name (string) |
133 tuple of directory name (string) and source file name (string) |
134 </dd> |
134 </dd> |
135 </dl> |
135 </dl> |
136 <div align="right"><a href="#top">Up</a></div> |
136 <div align="right"><a href="#top">Up</a></div> |
137 <hr /> |
137 <hr /> |
138 </body></html> |
138 </body></html> |