|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.Utilities.uic</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Utilities.uic</h1> |
|
24 <p> |
|
25 Module implementing a function to compile all user interface files of a |
|
26 directory or directory tree. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 <table> |
|
30 <tr><td>None</td></tr> |
|
31 </table> |
|
32 <h3>Classes</h3> |
|
33 <table> |
|
34 <tr><td>None</td></tr> |
|
35 </table> |
|
36 <h3>Functions</h3> |
|
37 <table> |
|
38 <tr> |
|
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> |
|
41 </tr><tr> |
|
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> |
|
44 </tr><tr> |
|
45 <td><a href="#compile_ui">compile_ui</a></td> |
|
46 <td>Local function to compile a single .ui file.</td> |
|
47 </tr><tr> |
|
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> |
|
50 </tr> |
|
51 </table> |
|
52 <hr /><hr /> |
|
53 <a NAME="compileUiDir" ID="compileUiDir"></a> |
|
54 <h2>compileUiDir</h2> |
|
55 <b>compileUiDir</b>(<i>dir, recurse = False, map = None, **compileUi_args</i>) |
|
56 <p> |
|
57 Creates Python modules from Qt Designer .ui files in a directory or |
|
58 directory tree. |
|
59 </p><p> |
|
60 Note: This function is a modified version of the one found in PyQt4. |
|
61 </p><dl> |
|
62 <dt><i>dir</i></dt> |
|
63 <dd> |
|
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 |
|
66 directory ending with '.py'. |
|
67 </dd><dt><i>recurse</i></dt> |
|
68 <dd> |
|
69 flag indicating that any sub-directories should be scanned. |
|
70 </dd><dt><i>map</i></dt> |
|
71 <dd> |
|
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 |
|
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) |
|
76 name of the module. |
|
77 </dd><dt><i>compileUi_args</i></dt> |
|
78 <dd> |
|
79 any additional keyword arguments that are passed to |
|
80 the compileUi() function that is called to create each Python module. |
|
81 </dd> |
|
82 </dl> |
|
83 <div align="right"><a href="#top">Up</a></div> |
|
84 <hr /><hr /> |
|
85 <a NAME="compileUiFiles" ID="compileUiFiles"></a> |
|
86 <h2>compileUiFiles</h2> |
|
87 <b>compileUiFiles</b>(<i>dir, recurse = False</i>) |
|
88 <p> |
|
89 Module function to compile the .ui files of a directory tree to Python sources. |
|
90 </p><dl> |
|
91 <dt><i>dir</i></dt> |
|
92 <dd> |
|
93 name of a directory to scan for .ui files (string or QString) |
|
94 </dd><dt><i>recurse</i></dt> |
|
95 <dd> |
|
96 flag indicating to recurse into subdirectories (boolean) |
|
97 </dd> |
|
98 </dl> |
|
99 <div align="right"><a href="#top">Up</a></div> |
|
100 <hr /><hr /> |
|
101 <a NAME="compile_ui" ID="compile_ui"></a> |
|
102 <h2>compile_ui</h2> |
|
103 <b>compile_ui</b>(<i>ui_dir, ui_file</i>) |
|
104 <p> |
|
105 Local function to compile a single .ui file. |
|
106 </p><dl> |
|
107 <dt><i>ui_dir</i></dt> |
|
108 <dd> |
|
109 directory containing the .ui file (string) |
|
110 </dd><dt><i>ui_file</i></dt> |
|
111 <dd> |
|
112 file name of the .ui file (string) |
|
113 </dd> |
|
114 </dl> |
|
115 <div align="right"><a href="#top">Up</a></div> |
|
116 <hr /><hr /> |
|
117 <a NAME="pyName" ID="pyName"></a> |
|
118 <h2>pyName</h2> |
|
119 <b>pyName</b>(<i>py_dir, py_file</i>) |
|
120 <p> |
|
121 Local function to create the Python source file name for the compiled .ui file. |
|
122 </p><dl> |
|
123 <dt><i>py_dir</i></dt> |
|
124 <dd> |
|
125 suggested name of the directory (string) |
|
126 </dd><dt><i>py_file</i></dt> |
|
127 <dd> |
|
128 suggested name for the compile source file (string) |
|
129 </dd> |
|
130 </dl><dl> |
|
131 <dt>Returns:</dt> |
|
132 <dd> |
|
133 tuple of directory name (string) and source file name (string) |
|
134 </dd> |
|
135 </dl> |
|
136 <div align="right"><a href="#top">Up</a></div> |
|
137 <hr /> |
|
138 </body></html> |