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