Documentation/Source/eric4.compileUiFiles.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
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.compileUiFiles</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.compileUiFiles</h1>
24 <p>
25 Script for eric4 to compile all .ui files to Python source.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr><td>None</td></tr>
34 </table>
35 <h3>Functions</h3>
36 <table>
37 <tr>
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>
40 </tr><tr>
41 <td><a href="#compileUiFiles">compileUiFiles</a></td>
42 <td>Compile the .ui files to Python sources.</td>
43 </tr><tr>
44 <td><a href="#compile_ui">compile_ui</a></td>
45 <td>Local function to compile a single .ui file.</td>
46 </tr><tr>
47 <td><a href="#main">main</a></td>
48 <td>The main function of the script.</td>
49 </tr><tr>
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>
52 </tr>
53 </table>
54 <hr /><hr />
55 <a NAME="compileUiDir" ID="compileUiDir"></a>
56 <h2>compileUiDir</h2>
57 <b>compileUiDir</b>(<i>dir, recurse = False, map = None, **compileUi_args</i>)
58 <p>
59 Creates Python modules from Qt Designer .ui files in a directory or
60 directory tree.
61 </p><p>
62 Note: This function is a modified version of the one found in PyQt4.
63 </p><dl>
64 <dt><i>dir</i></dt>
65 <dd>
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
68 directory ending with '.py'.
69 </dd><dt><i>recurse</i></dt>
70 <dd>
71 flag indicating that any sub-directories should be scanned.
72 </dd><dt><i>map</i></dt>
73 <dd>
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
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)
78 name of the module.
79 </dd><dt><i>compileUi_args</i></dt>
80 <dd>
81 any additional keyword arguments that are passed to
82 the compileUi() function that is called to create each Python module.
83 </dd>
84 </dl>
85 <div align="right"><a href="#top">Up</a></div>
86 <hr /><hr />
87 <a NAME="compileUiFiles" ID="compileUiFiles"></a>
88 <h2>compileUiFiles</h2>
89 <b>compileUiFiles</b>(<i></i>)
90 <p>
91 Compile the .ui files to Python sources.
92 </p>
93 <div align="right"><a href="#top">Up</a></div>
94 <hr /><hr />
95 <a NAME="compile_ui" ID="compile_ui"></a>
96 <h2>compile_ui</h2>
97 <b>compile_ui</b>(<i>ui_dir, ui_file</i>)
98 <p>
99 Local function to compile a single .ui file.
100 </p><dl>
101 <dt><i>ui_dir</i></dt>
102 <dd>
103 directory containing the .ui file (string)
104 </dd><dt><i>ui_file</i></dt>
105 <dd>
106 file name of the .ui file (string)
107 </dd>
108 </dl>
109 <div align="right"><a href="#top">Up</a></div>
110 <hr /><hr />
111 <a NAME="main" ID="main"></a>
112 <h2>main</h2>
113 <b>main</b>(<i>argv</i>)
114 <p>
115 The main function of the script.
116 </p><dl>
117 <dt><i>argv</i></dt>
118 <dd>
119 the list of command line arguments.
120 </dd>
121 </dl>
122 <div align="right"><a href="#top">Up</a></div>
123 <hr /><hr />
124 <a NAME="pyName" ID="pyName"></a>
125 <h2>pyName</h2>
126 <b>pyName</b>(<i>py_dir, py_file</i>)
127 <p>
128 Local function to create the Python source file name for the compiled .ui file.
129 </p><dl>
130 <dt><i>py_dir</i></dt>
131 <dd>
132 suggested name of the directory (string)
133 </dd><dt><i>py_file</i></dt>
134 <dd>
135 suggested name for the compile source file (string)
136 </dd>
137 </dl><dl>
138 <dt>Returns:</dt>
139 <dd>
140 tuple of directory name (string) and source file name (string)
141 </dd>
142 </dl>
143 <div align="right"><a href="#top">Up</a></div>
144 <hr />
145 </body></html>

eric ide

mercurial