eric4.Utilities.uic

Module implementing a function to compile all user interface files of a directory or directory tree.

Global Attributes

None

Classes

None

Functions

compileUiDir Creates Python modules from Qt Designer .ui files in a directory or directory tree.
compileUiFiles Module function to compile the .ui files of a directory tree to Python sources.
compile_ui Local function to compile a single .ui file.
pyName Local function to create the Python source file name for the compiled .ui file.


compileUiDir

compileUiDir(dir, recurse = False, map = None, **compileUi_args)

Creates Python modules from Qt Designer .ui files in a directory or directory tree.

Note: This function is a modified version of the one found in PyQt4.

dir
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'.
recurse
flag indicating that any sub-directories should be scanned.
map
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.
compileUi_args
any additional keyword arguments that are passed to the compileUi() function that is called to create each Python module.
Up


compileUiFiles

compileUiFiles(dir, recurse = False)

Module function to compile the .ui files of a directory tree to Python sources.

dir
name of a directory to scan for .ui files (string or QString)
recurse
flag indicating to recurse into subdirectories (boolean)
Up


compile_ui

compile_ui(ui_dir, ui_file)

Local function to compile a single .ui file.

ui_dir
directory containing the .ui file (string)
ui_file
file name of the .ui file (string)
Up


pyName

pyName(py_dir, py_file)

Local function to create the Python source file name for the compiled .ui file.

py_dir
suggested name of the directory (string)
py_file
suggested name for the compile source file (string)
Returns:
tuple of directory name (string) and source file name (string)
Up