|
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>eric5.Utilities.uic</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.Utilities.uic</h1> |
|
12 <p> |
|
13 Module implementing a function to compile all user interface files of a |
|
14 directory or directory tree. |
|
15 </p> |
|
16 <h3>Global Attributes</h3> |
|
17 <table> |
|
18 <tr><td>None</td></tr> |
|
19 </table> |
|
20 <h3>Classes</h3> |
|
21 <table> |
|
22 <tr><td>None</td></tr> |
|
23 </table> |
|
24 <h3>Functions</h3> |
|
25 <table> |
|
26 <tr> |
|
27 <td><a href="#compileUiDir">compileUiDir</a></td> |
|
28 <td>Creates Python modules from Qt Designer .ui files in a directory or directory tree.</td> |
|
29 </tr><tr> |
|
30 <td><a href="#compileUiFiles">compileUiFiles</a></td> |
|
31 <td>Module function to compile the .ui files of a directory tree to Python sources.</td> |
|
32 </tr><tr> |
|
33 <td><a href="#compile_ui">compile_ui</a></td> |
|
34 <td>Local function to compile a single .ui file.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#pyName">pyName</a></td> |
|
37 <td>Local function to create the Python source file name for the compiled .ui file.</td> |
|
38 </tr> |
|
39 </table> |
|
40 <hr /><hr /> |
|
41 <a NAME="compileUiDir" ID="compileUiDir"></a> |
|
42 <h2>compileUiDir</h2> |
|
43 <b>compileUiDir</b>(<i>dir, recurse = False, map = None, **compileUi_args</i>) |
|
44 <p> |
|
45 Creates Python modules from Qt Designer .ui files in a directory or |
|
46 directory tree. |
|
47 </p><p> |
|
48 Note: This function is a modified version of the one found in PyQt4. |
|
49 </p><dl> |
|
50 <dt><i>dir</i></dt> |
|
51 <dd> |
|
52 Name of the directory to scan for files whose name ends with |
|
53 '.ui'. By default the generated Python module is created in the same |
|
54 directory ending with '.py'. |
|
55 </dd><dt><i>recurse</i></dt> |
|
56 <dd> |
|
57 flag indicating that any sub-directories should be scanned. |
|
58 </dd><dt><i>map</i></dt> |
|
59 <dd> |
|
60 an optional callable that is passed the name of the directory |
|
61 containing the '.ui' file and the name of the Python module that will be |
|
62 created. The callable should return a tuple of the name of the directory |
|
63 in which the Python module will be created and the (possibly modified) |
|
64 name of the module. |
|
65 </dd><dt><i>compileUi_args</i></dt> |
|
66 <dd> |
|
67 any additional keyword arguments that are passed to |
|
68 the compileUi() function that is called to create each Python module. |
|
69 </dd> |
|
70 </dl> |
|
71 <div align="right"><a href="#top">Up</a></div> |
|
72 <hr /><hr /> |
|
73 <a NAME="compileUiFiles" ID="compileUiFiles"></a> |
|
74 <h2>compileUiFiles</h2> |
|
75 <b>compileUiFiles</b>(<i>dir, recurse = False</i>) |
|
76 <p> |
|
77 Module function to compile the .ui files of a directory tree to Python sources. |
|
78 </p><dl> |
|
79 <dt><i>dir</i></dt> |
|
80 <dd> |
|
81 name of a directory to scan for .ui files (string or QString) |
|
82 </dd><dt><i>recurse</i></dt> |
|
83 <dd> |
|
84 flag indicating to recurse into subdirectories (boolean) |
|
85 </dd> |
|
86 </dl> |
|
87 <div align="right"><a href="#top">Up</a></div> |
|
88 <hr /><hr /> |
|
89 <a NAME="compile_ui" ID="compile_ui"></a> |
|
90 <h2>compile_ui</h2> |
|
91 <b>compile_ui</b>(<i>ui_dir, ui_file</i>) |
|
92 <p> |
|
93 Local function to compile a single .ui file. |
|
94 </p><dl> |
|
95 <dt><i>ui_dir</i></dt> |
|
96 <dd> |
|
97 directory containing the .ui file (string) |
|
98 </dd><dt><i>ui_file</i></dt> |
|
99 <dd> |
|
100 file name of the .ui file (string) |
|
101 </dd> |
|
102 </dl> |
|
103 <div align="right"><a href="#top">Up</a></div> |
|
104 <hr /><hr /> |
|
105 <a NAME="pyName" ID="pyName"></a> |
|
106 <h2>pyName</h2> |
|
107 <b>pyName</b>(<i>py_dir, py_file</i>) |
|
108 <p> |
|
109 Local function to create the Python source file name for the compiled .ui file. |
|
110 </p><dl> |
|
111 <dt><i>py_dir</i></dt> |
|
112 <dd> |
|
113 suggested name of the directory (string) |
|
114 </dd><dt><i>py_file</i></dt> |
|
115 <dd> |
|
116 suggested name for the compile source file (string) |
|
117 </dd> |
|
118 </dl><dl> |
|
119 <dt>Returns:</dt> |
|
120 <dd> |
|
121 tuple of directory name (string) and source file name (string) |
|
122 </dd> |
|
123 </dl> |
|
124 <div align="right"><a href="#top">Up</a></div> |
|
125 <hr /> |
|
126 </body></html> |