18. widgets — A collection of custom widgets used in the pyFormex GUI
20. colorscale — Color mapping of a range of values.
Enter search terms or a module, class or function name.
This modules implements specialized classes and functions for building the pyFormex GUI menu system.
Classes defined in module menu
A general menu class.
A hierarchical menu that keeps a list of its item names and actions. The item names are normalized by removing all ‘&’ characters and converting the result to lower case. It thus becomes easy to search for an existing item in a menu.
This class is not intended for direct use, but through subclasses. Subclasses should implement at least the following methods:
QtGui.Menu and QtGui.MenuBar provide these methods.
Return a list with the current actions.
Return a list with the current actions of given class.
Return a list with the submenus
Return the index of the specified item in the actionlist.
If the requested item is not in the actionlist, -1 is returned.
Return the action with specified text.
First, a normal action is tried. If none is found, a separator is tried.
Return the item with specified text.
For a normal action or a separator, an action is returned. For a menu action, a menu is returned.
Returns the name of the next item.
This can be used to replace the current item with another menu. If the item is the last, None is returned.
Remove an item from this menu.
Create and insert a separator
Insert an existing menu.
Insert an action.
Create and insert an action.
Insert a list of items in the menu.
Parameters:
A popup/pulldown menu.
Return a list with the current actions.
Return a list with the current actions of given class.
Return a list with the submenus
Return the index of the specified item in the actionlist.
If the requested item is not in the actionlist, -1 is returned.
Return the action with specified text.
First, a normal action is tried. If none is found, a separator is tried.
Return the item with specified text.
For a normal action or a separator, an action is returned. For a menu action, a menu is returned.
Returns the name of the next item.
This can be used to replace the current item with another menu. If the item is the last, None is returned.
Remove an item from this menu.
Create and insert a separator
Insert an existing menu.
Insert an action.
Create and insert an action.
Insert a list of items in the menu.
Parameters:
A menu bar allowing easy menu creation.
Return a list with the current actions.
Return a list with the current actions of given class.
Return a list with the submenus
Return the index of the specified item in the actionlist.
If the requested item is not in the actionlist, -1 is returned.
Return the action with specified text.
First, a normal action is tried. If none is found, a separator is tried.
Return the item with specified text.
For a normal action or a separator, an action is returned. For a menu action, a menu is returned.
Returns the name of the next item.
This can be used to replace the current item with another menu. If the item is the last, None is returned.
Remove an item from this menu.
Create and insert a separator
Insert an existing menu.
Insert an action.
Create and insert an action.
Insert a list of items in the menu.
Parameters:
A DAction is a QAction that emits a signal with a string parameter.
When triggered, this action sends a signal (default ‘CLICKED’) with a custom string as parameter. The connected slot can then act depending on this parameter.
Menu and toolbar with named actions.
An action list is a list of strings, each connected to some action. The actions can be presented in a menu and/or a toolbar. On activating one of the menu or toolbar buttons, a given signal is emitted with the button string as parameter. A fixed function can be connected to this signal to act dependent on the string value.
Add a new name to the actions list and create a matching DAction.
If the actions list has an associated menu or toolbar, a matching button will be inserted in each of these. If an icon is specified, it will be used on the menu and toolbar. The icon is either a filename or a QIcon object. If text is specified, it is displayed instead of the action’s name.
Return an ordered list of names of the action items.
Create a new toolbar corresponding to the menu.
Functions defined in module menu
Reset the warning filters to the default.
Returns the default pyFormex GUI menu data.