eric7.EricGui.EricAction
Module implementing an Action class extending QAction.
This extension is necessary in order to support alternate keyboard
shortcuts.
Global Attributes
Classes
| ArgumentsError | Class implementing an exception, which is raised, if the wrong number of arguments are given. | 
| EricAction | Class implementing an Action class extending QAction. | 
Functions
ArgumentsError
    Class implementing an exception, which is raised, if the wrong number of
    arguments are given.
Derived from
RuntimeError
Class Attributes
Class Methods
Methods
| ArgumentsError | Constructor | 
| __repr__ | Special method returning a representation of the exception. | 
| __str__ | Special method returning a string representation of the exception. | 
Static Methods
ArgumentsError (Constructor)
ArgumentsError(error)
        Constructor
- error (str)
- 
error message of the exception
ArgumentsError.__repr__
__repr__()
        Special method returning a representation of the exception.
- Return:
- 
string representing the error message
- Return Type:
- 
str
ArgumentsError.__str__
__str__()
        Special method returning a string representation of the exception.
- Return:
- 
string representing the error message
- Return Type:
- 
str
EricAction
    Class implementing an Action class extending QAction.
Derived from
QAction
Class Attributes
Class Methods
Methods
Static Methods
EricAction (Constructor)
EricAction(*args)
        Constructor
- args (list of one of the following)
- 
argument list of the constructor. This list is one of
            
            - text, icon, menu text, accelarator, alternative accelerator, parent,
                name, toggle
- text, icon, menu text, accelarator, alternative accelerator, parent,
                name
- text, menu text, accelarator, alternative accelerator, parent, name,
                toggle
- text, menu text, accelarator, alternative accelerator, parent, name
 
            - str, QIcon, str, QKeySequence, QKeySequence, QObject, str, bool
- str, QIcon, str, QKeySequence, QKeySequemce, QObject, str
- str, str, QKeySequence, QKeySequence, QObject, str, bool
- str, str, QKeySequence, QKeySequence, QObject, str
 
- Raises ArgumentsError:
- 
raised to indicate invalid arguments
EricAction.__ammendToolTip
__ammendToolTip()
        Private slot to add the primary keyboard accelerator to the tooltip.
EricAction.alternateShortcut
alternateShortcut()
        Public method to retrieve the alternative keyboard shortcut.
- Return:
- 
the alternative accelerator
- Return Type:
- 
QKeySequence
EricAction.setAlternateShortcut
setAlternateShortcut(shortcut, removeEmpty=False)
        Public slot to set the alternative keyboard shortcut.
- shortcut (QKeySequence)
- 
the alternative accelerator
- removeEmpty (bool)
- 
flag indicating to remove the alternate shortcut,
            if it is empty
EricAction.setIconText
setIconText(text)
        Public slot to set the icon text of the action.
- text (str)
- 
new icon text
EricAction.setShortcut
setShortcut(shortcut)
        Public slot to set the keyboard shortcut.
- shortcut (QKeySequence)
- 
the accelerator
EricAction.setShortcuts
setShortcuts(shortcuts)
        Public slot to set the list of keyboard shortcuts.
- shortcuts (list of QKeySequence or QKeySequence.StandardKey)
- 
list of keyboard accelerators or key for a platform
            dependent list of accelerators
addActions
addActions(target, actions)
    Module function to add a list of actions to a widget.
- target (QWidget)
- 
reference to the target widget
- actions (list of QAction)
- 
list of actions to be added to the target. A
        None indicates a separator
createActionGroup
createActionGroup(parent, name=None, exclusive=False)
    Module function to create an action group.
- parent (QObject)
- 
parent object of the action group
- name (str)
- 
name of the action group object
- exclusive (bool)
- 
flag indicating an exclusive action group
- Return:
- 
reference to the created action group
- Return Type:
- 
QActionGroup