84. gui.menus.Settings — Settings menu.

84.1. Functions defined in module gui.menus.Settings

gui.menus.Settings.updateSettings(res, save=None)[source]

Update the current settings (store) with the values in res.

res is a dictionary with configuration values. The current settings will be updated with the values in res.

If res contains a key ‘_save_’, or a save argument is supplied, and its value is True, the preferences will also be saved to the user’s preference file. Else, the user will be asked whether he wants to save the changes. Add ‘_save_:False’ to res or use save=False to not save and not being asked.

gui.menus.Settings.settings()[source]

Interactively change the pyformex settings.

Creates a dialog to change (most of) the pyformex user configuration. To change the canvas setttings, use menus.Viewport.canvasSettings.

gui.menus.Settings.askConfigPreferences(items, prefix=None, store=None)[source]

Ask preferences stored in config variables.

Items in list should only be keys. store is usually a dictionary, but can be any class that allow the setdefault method for lookup while setting the default, and the store[key]=val syntax for setting the value. If a prefix is given, actual keys will be ‘prefix/key’. The current values are retrieved from the store, and the type returned will be in accordance. If no store is specified, the global config pf.cfg is used.

This function can be used to change individual values by a simpler interface than the full settings dialog.

gui.menus.Settings.setRendering()[source]

Interactively change the render parameters.

gui.menus.Settings.addAppdir(path, name=None, dircfg='appdirs')[source]

Add a path to the appdirs

gui.menus.Settings.setDirs(dircfg)[source]

Configure the paths from which to read apps/scripts

Parameters:

dircfg (str) – The name of a config variable that holds a list of directories. It should be one of ‘appdirs’ or ‘scriptdirs’. The config value should be a list of tuples (‘label’,’path’).

gui.menus.Settings.resetWarnings()[source]

Reset the warning filters to the default.

gui.menus.Settings.coordsbox()[source]

Toggle the coordinate display box on or off

gui.menus.Settings.timeoutbutton()[source]

Toggle the timeout button on or off

gui.menus.Settings.reloadPreferences(preffile=None)[source]

Reload the preferences from the user preferences file

gui.menus.Settings.editAutorun()[source]

Edit the Autorun script

The Autorun script is a script file that is always executed at the start of the GUI. This allows the user to customize the GUI before the user can start interacting with it. The path of the autorun script is stored in the pf.cfg[‘autorun’] variable and can be customized from the settings dialog. The default value is $HOME/.config/pyformex/startup.py.

gui.menus.Settings.editPreferences()[source]

Edit the preferences file

This allows the user to edit all his stored preferences through his normal editor. The current preferences are saved to the user preferences file before it is loaded in the editor. When the user saves the preferences file, the stored preferences will be reloaded into pyFormex. This will remain active until the user selects the ‘File->Save Preferences Now’ option from the GUI.

gui.menus.Settings.saveAndUnwatchPreferences()[source]

Save the current preferences to the user preferences file.

This also has the side effect of no longer watching the preferences file for changes, if the user has loaded it into the editor.

gui.menus.Settings.reloadAndUnwatchPreferences()[source]

Reload the current preferences from the user preferences file.

This also has the side effect of no longer watching the preferences file for changes, if the user has loaded it into the editor.