Documentation/Source/eric5.compileUiFiles.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
--- a/Documentation/Source/eric5.compileUiFiles.html	Thu Jan 14 17:27:31 2010 +0000
+++ b/Documentation/Source/eric5.compileUiFiles.html	Thu Jan 14 18:35:52 2010 +0000
@@ -22,7 +22,7 @@
 <body><a NAME="top" ID="top"></a>
 <h1>eric5.compileUiFiles</h1>
 <p>
-&#83;&#99;&#114;&#105;&#112;&#116; &#102;&#111;&#114; &#101;&#114;&#105;&#99;&#53; &#116;&#111; &#99;&#111;&#109;&#112;&#105;&#108;&#101; &#97;&#108;&#108; .&#117;&#105; &#102;&#105;&#108;&#101;&#115; &#116;&#111; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101;.
+Script for eric5 to compile all .ui files to Python source.
 </p>
 <h3>Global Attributes</h3>
 <table>
@@ -36,19 +36,19 @@
 <table>
 <tr>
 <td><a href="#compileUiDir">compileUiDir</a></td>
-<td>&#67;&#114;&#101;&#97;&#116;&#101;&#115; &#80;y&#116;&#104;&#111;&#110; &#109;&#111;&#100;&#117;&#108;&#101;&#115; &#102;&#114;&#111;&#109; &#81;&#116; &#68;&#101;&#115;&#105;&#103;&#110;&#101;&#114; .&#117;&#105; &#102;&#105;&#108;&#101;&#115; &#105;&#110; &#97; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#111;&#114; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#116;&#114;&#101;&#101;.</td>
+<td>Creates Python modules from Qt Designer .ui files in a directory or directory tree.</td>
 </tr><tr>
 <td><a href="#compileUiFiles">compileUiFiles</a></td>
-<td>&#67;&#111;&#109;&#112;&#105;&#108;&#101; &#116;&#104;&#101; .&#117;&#105; &#102;&#105;&#108;&#101;&#115; &#116;&#111; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101;&#115;.</td>
+<td>Compile the .ui files to Python sources.</td>
 </tr><tr>
 <td><a href="#compile_ui">compile_ui</a></td>
-<td>&#76;&#111;&#99;&#97;&#108; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#99;&#111;&#109;&#112;&#105;&#108;&#101; &#97; &#115;&#105;&#110;&#103;&#108;&#101; .&#117;&#105; &#102;&#105;&#108;&#101;.</td>
+<td>Local function to compile a single .ui file.</td>
 </tr><tr>
 <td><a href="#main">main</a></td>
-<td>&#84;&#104;&#101; &#109;&#97;&#105;&#110; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#111;&#102; &#116;&#104;&#101; &#115;&#99;&#114;&#105;&#112;&#116;.</td>
+<td>The main function of the script.</td>
 </tr><tr>
 <td><a href="#pyName">pyName</a></td>
-<td>&#76;&#111;&#99;&#97;&#108; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#99;&#114;&#101;&#97;&#116;&#101; &#116;&#104;&#101; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101; &#110;&#97;&#109;&#101; &#102;&#111;&#114; &#116;&#104;&#101; &#99;&#111;&#109;&#112;&#105;&#108;&#101;&#100; .&#117;&#105; &#102;&#105;&#108;&#101;.</td>
+<td>Local function to create the Python source file name for the compiled .ui file.</td>
 </tr>
 </table>
 <hr /><hr />
@@ -56,30 +56,30 @@
 <h2>compileUiDir</h2>
 <b>compileUiDir</b>(<i>dir, recurse = False, map = None, **compileUi_args</i>)
 <p>
-            &#67;&#114;&#101;&#97;&#116;&#101;&#115; &#80;y&#116;&#104;&#111;&#110; &#109;&#111;&#100;&#117;&#108;&#101;&#115; &#102;&#114;&#111;&#109; &#81;&#116; &#68;&#101;&#115;&#105;&#103;&#110;&#101;&#114; .&#117;&#105; &#102;&#105;&#108;&#101;&#115; &#105;&#110; &#97; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#111;&#114;
-            &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#116;&#114;&#101;&#101;.
+            Creates Python modules from Qt Designer .ui files in a directory or
+            directory tree.
 </p><p>
-            &#78;&#111;&#116;&#101;&#58; &#84;&#104;&#105;&#115; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#105;&#115; &#97; &#109;&#111;&#100;&#105;&#102;&#105;&#101;&#100; v&#101;&#114;&#115;&#105;&#111;&#110; &#111;&#102; &#116;&#104;&#101; &#111;&#110;&#101; &#102;&#111;&#117;&#110;&#100; &#105;&#110; &#80;y&#81;&#116;&#52;.
+            Note: This function is a modified version of the one found in PyQt4.
 </p><dl>
 <dt><i>dir</i></dt>
 <dd>
-&#78;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#116;&#111; &#115;&#99;&#97;&#110; &#102;&#111;&#114; &#102;&#105;&#108;&#101;&#115; w&#104;&#111;&#115;&#101; &#110;&#97;&#109;&#101; &#101;&#110;&#100;&#115; w&#105;&#116;&#104;
-                '.&#117;&#105;'. &#66;y &#100;&#101;&#102;&#97;&#117;&#108;&#116; &#116;&#104;&#101; &#103;&#101;&#110;&#101;&#114;&#97;&#116;&#101;&#100; &#80;y&#116;&#104;&#111;&#110; &#109;&#111;&#100;&#117;&#108;&#101; &#105;&#115; &#99;&#114;&#101;&#97;&#116;&#101;&#100; &#105;&#110; &#116;&#104;&#101; &#115;&#97;&#109;&#101;
-                &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#101;&#110;&#100;&#105;&#110;&#103; w&#105;&#116;&#104; '.&#112;y'.
+Name of the directory to scan for files whose name ends with
+                '.ui'. By default the generated Python module is created in the same
+                directory ending with '.py'.
 </dd><dt><i>recurse</i></dt>
 <dd>
-&#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#116;&#104;&#97;&#116; &#97;&#110;y &#115;&#117;&#98;-&#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;&#105;&#101;&#115; &#115;&#104;&#111;&#117;&#108;&#100; &#98;&#101; &#115;&#99;&#97;&#110;&#110;&#101;&#100;.
+flag indicating that any sub-directories should be scanned.
 </dd><dt><i>map</i></dt>
 <dd>
-&#97;&#110; &#111;&#112;&#116;&#105;&#111;&#110;&#97;&#108; &#99;&#97;&#108;&#108;&#97;&#98;&#108;&#101; &#116;&#104;&#97;&#116; &#105;&#115; &#112;&#97;&#115;&#115;&#101;&#100; &#116;&#104;&#101; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y
-                &#99;&#111;&#110;&#116;&#97;&#105;&#110;&#105;&#110;&#103; &#116;&#104;&#101; '.&#117;&#105;' &#102;&#105;&#108;&#101; &#97;&#110;&#100; &#116;&#104;&#101; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#80;y&#116;&#104;&#111;&#110; &#109;&#111;&#100;&#117;&#108;&#101; &#116;&#104;&#97;&#116; w&#105;&#108;&#108; &#98;&#101;
-                &#99;&#114;&#101;&#97;&#116;&#101;&#100;. &#84;&#104;&#101; &#99;&#97;&#108;&#108;&#97;&#98;&#108;&#101; &#115;&#104;&#111;&#117;&#108;&#100; &#114;&#101;&#116;&#117;&#114;&#110; &#97; &#116;&#117;&#112;&#108;&#101; &#111;&#102; &#116;&#104;&#101; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y
-                &#105;&#110; w&#104;&#105;&#99;&#104; &#116;&#104;&#101; &#80;y&#116;&#104;&#111;&#110; &#109;&#111;&#100;&#117;&#108;&#101; w&#105;&#108;&#108; &#98;&#101; &#99;&#114;&#101;&#97;&#116;&#101;&#100; &#97;&#110;&#100; &#116;&#104;&#101; (&#112;&#111;&#115;&#115;&#105;&#98;&#108;y &#109;&#111;&#100;&#105;&#102;&#105;&#101;&#100;)
-                &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#109;&#111;&#100;&#117;&#108;&#101;.
+an optional callable that is passed the name of the directory
+                containing the '.ui' file and the name of the Python module that will be
+                created. The callable should return a tuple of the name of the directory
+                in which the Python module will be created and the (possibly modified)
+                name of the module.
 </dd><dt><i>compileUi_args</i></dt>
 <dd>
-&#97;&#110;y &#97;&#100;&#100;&#105;&#116;&#105;&#111;&#110;&#97;&#108; &#107;&#101;yw&#111;&#114;&#100; &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116;&#115; &#116;&#104;&#97;&#116; &#97;&#114;&#101; &#112;&#97;&#115;&#115;&#101;&#100; &#116;&#111;
-                &#116;&#104;&#101; &#99;&#111;&#109;&#112;&#105;&#108;&#101;&#85;&#105;() &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#104;&#97;&#116; &#105;&#115; &#99;&#97;&#108;&#108;&#101;&#100; &#116;&#111; &#99;&#114;&#101;&#97;&#116;&#101; &#101;&#97;&#99;&#104; &#80;y&#116;&#104;&#111;&#110; &#109;&#111;&#100;&#117;&#108;&#101;.
+any additional keyword arguments that are passed to
+                the compileUi() function that is called to create each Python module.
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -88,7 +88,7 @@
 <h2>compileUiFiles</h2>
 <b>compileUiFiles</b>(<i></i>)
 <p>
-    &#67;&#111;&#109;&#112;&#105;&#108;&#101; &#116;&#104;&#101; .&#117;&#105; &#102;&#105;&#108;&#101;&#115; &#116;&#111; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101;&#115;.
+    Compile the .ui files to Python sources.
 </p>
 <div align="right"><a href="#top">Up</a></div>
 <hr /><hr />
@@ -96,14 +96,14 @@
 <h2>compile_ui</h2>
 <b>compile_ui</b>(<i>ui_dir, ui_file</i>)
 <p>
-                &#76;&#111;&#99;&#97;&#108; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#99;&#111;&#109;&#112;&#105;&#108;&#101; &#97; &#115;&#105;&#110;&#103;&#108;&#101; .&#117;&#105; &#102;&#105;&#108;&#101;.
+                Local function to compile a single .ui file.
 </p><dl>
 <dt><i>ui_dir</i></dt>
 <dd>
-&#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#99;&#111;&#110;&#116;&#97;&#105;&#110;&#105;&#110;&#103; &#116;&#104;&#101; .&#117;&#105; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+directory containing the .ui file (string)
 </dd><dt><i>ui_file</i></dt>
 <dd>
-&#102;&#105;&#108;&#101; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; .&#117;&#105; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+file name of the .ui file (string)
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -112,11 +112,11 @@
 <h2>main</h2>
 <b>main</b>(<i>argv</i>)
 <p>
-    &#84;&#104;&#101; &#109;&#97;&#105;&#110; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#111;&#102; &#116;&#104;&#101; &#115;&#99;&#114;&#105;&#112;&#116;.
+    The main function of the script.
 </p><dl>
 <dt><i>argv</i></dt>
 <dd>
-&#116;&#104;&#101; &#108;&#105;&#115;&#116; &#111;&#102; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#108;&#105;&#110;&#101; &#97;&#114;&#103;&#117;&#109;&#101;&#110;&#116;&#115;.
+the list of command line arguments.
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>
@@ -125,19 +125,19 @@
 <h2>pyName</h2>
 <b>pyName</b>(<i>py_dir, py_file</i>)
 <p>
-        &#76;&#111;&#99;&#97;&#108; &#102;&#117;&#110;&#99;&#116;&#105;&#111;&#110; &#116;&#111; &#99;&#114;&#101;&#97;&#116;&#101; &#116;&#104;&#101; &#80;y&#116;&#104;&#111;&#110; &#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101; &#110;&#97;&#109;&#101; &#102;&#111;&#114; &#116;&#104;&#101; &#99;&#111;&#109;&#112;&#105;&#108;&#101;&#100; .&#117;&#105; &#102;&#105;&#108;&#101;.
+        Local function to create the Python source file name for the compiled .ui file.
 </p><dl>
 <dt><i>py_dir</i></dt>
 <dd>
-&#115;&#117;&#103;&#103;&#101;&#115;&#116;&#101;&#100; &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y (&#115;&#116;&#114;&#105;&#110;&#103;)
+suggested name of the directory (string)
 </dd><dt><i>py_file</i></dt>
 <dd>
-&#115;&#117;&#103;&#103;&#101;&#115;&#116;&#101;&#100; &#110;&#97;&#109;&#101; &#102;&#111;&#114; &#116;&#104;&#101; &#99;&#111;&#109;&#112;&#105;&#108;&#101; &#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+suggested name for the compile source file (string)
 </dd>
 </dl><dl>
 <dt>Returns:</dt>
 <dd>
-&#116;&#117;&#112;&#108;&#101; &#111;&#102; &#100;&#105;&#114;&#101;&#99;&#116;&#111;&#114;y &#110;&#97;&#109;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;) &#97;&#110;&#100; &#115;&#111;&#117;&#114;&#99;&#101; &#102;&#105;&#108;&#101; &#110;&#97;&#109;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;)
+tuple of directory name (string) and source file name (string)
 </dd>
 </dl>
 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial