configtools¶
The guidata.configtools
module provides configuration related tools.
-
guidata.configtools.
get_module_data_path
(modname, relpath=None)[source]¶ Return module modname data path Handles py2exe/cx_Freeze distributions
-
guidata.configtools.
get_translation
(modname, dirname=None)[source]¶ Return translation callback for module modname
-
guidata.configtools.
get_module_locale_path
(modname)[source]¶ Return module modname gettext translation path
-
guidata.configtools.
add_image_path
(path, subfolders=True)[source]¶ Append image path (opt. with its subfolders) to global list IMG_PATH
-
guidata.configtools.
add_image_module_path
(modname, relpath, subfolders=True)[source]¶ Appends image data path relative to a module name. Used to add module local data that resides in a module directory but will be shipped under sys.prefix / share/ …
modname must be the name of an already imported module as found in sys.modules
-
guidata.configtools.
get_image_file_path
(name, default='not_found.png')[source]¶ Return the absolute path to image with specified name name, default: filenames with extensions
-
guidata.configtools.
get_icon
(name, default='not_found.png')[source]¶ Construct a QIcon from the file with specified name name, default: filenames with extensions
-
guidata.configtools.
get_image_label
(name, default='not_found.png')[source]¶ Construct a QLabel from the file with specified name name, default: filenames with extensions
-
guidata.configtools.
get_image_layout
(imagename, text='', tooltip='', alignment=None)[source]¶ Construct a QHBoxLayout including image from the file with specified name, left-aligned text [with specified tooltip] Return (layout, label)
-
guidata.configtools.
get_family
(families)[source]¶ Return the first installed font family in family list
-
guidata.configtools.
get_font
(conf, section, option='')[source]¶ Construct a QFont from the specified configuration file entry conf: UserConfig instance section [, option]: configuration entry
-
guidata.configtools.
get_pen
(conf, section, option='', color='black', width=1, style='SolidLine')[source]¶ Construct a QPen from the specified configuration file entry conf: UserConfig instance section [, option]: configuration entry [color]: default color [width]: default width [style]: default style