eric4.E4Gui.E4Action
Module implementing an Action class extending QAction.
This extension is neccessary in order to support alternate keyboard
shortcuts.
Classes
ArgumentsError |
Class implementing an exception, which is raised, if the wrong number of arguments are given. |
E4Action |
Class implementing an Action class extending QAction. |
E4ActionGroup |
Class implementing an ActionGroup class extending QActionGroup. |
Functions
ArgumentsError
Class implementing an exception, which is raised, if the wrong number of arguments
are given.
Derived from
RuntimeError
Methods
ArgumentsError |
Constructor |
__repr__ |
Private method returning a representation of the exception. |
__str__ |
Private method returning a string representation of the exception. |
ArgumentsError (Constructor)
ArgumentsError(error)
Constructor
ArgumentsError.__repr__
__repr__()
Private method returning a representation of the exception.
- Returns:
-
string representing the error message
ArgumentsError.__str__
__str__()
Private method returning a string representation of the exception.
- Returns:
-
string representing the error message
E4Action
Class implementing an Action class extending QAction.
Derived from
QAction
Methods
E4Action |
Constructor |
addTo |
Public method to add this action to a widget. |
alternateShortcut |
Public method to retrieve the alternative keyboard shortcut. |
connectIt |
Public method to connect signals of the action to a receiver. |
mapIt |
Public method to set a mapping for the action. |
setAlternateShortcut |
Public slot to set the alternative keyboard shortcut. |
E4Action (Constructor)
E4Action(*args)
Constructor
- args
-
argument list of the constructor. This list is one of
- text (string or QString), icon (QIcon), menu text (string or QString),
accelarator (QKeySequence), alternative accelerator (QKeySequence),
parent (QObject), name (string or QString), toggle (boolean)
- text (string or QString), icon (QIcon), menu text (string or QString),
accelarator (QKeySequence), alternative accelerator (QKeySequence),
parent (QObject), name (string or QString)
- text (string or QString), menu text (string or QString),
accelarator (QKeySequence), alternative accelerator (QKeySequence),
parent (QObject), name (string or QString), toggle (boolean)
- text (string or QString), menu text (string or QString),
accelarator (QKeySequence), alternative accelerator (QKeySequence),
parent (QObject), name (string or QString)
E4Action.addTo
addTo(widget)
Public method to add this action to a widget.
- widget
-
widget to add to (QWidget)
E4Action.alternateShortcut
alternateShortcut()
Public method to retrieve the alternative keyboard shortcut.
- Returns:
-
the alternative accelerator (QKeySequence)
E4Action.connectIt
connectIt(*args)
Public method to connect signals of the action to a receiver.
- args
-
argument list. This is one of
- signal (SIGNAL), receiving member (Python slot)
- signal (SIGNAL), receiver (QObject), member (SLOT)
E4Action.mapIt
mapIt(mapper, mapping)
Public method to set a mapping for the action.
- mapper
-
reference to the mapper object (QSignalMapper)
- mapping
-
identifier the id of the mapping (integer, string or QString)
E4Action.setAlternateShortcut
setAlternateShortcut(shortcut)
Public slot to set the alternative keyboard shortcut.
- shortcut
-
the alternative accelerator (QKeySequence)
E4ActionGroup
Class implementing an ActionGroup class extending QActionGroup.
Derived from
QActionGroup
Methods
E4ActionGroup (Constructor)
E4ActionGroup(parent, name = None, exclusive = False)
Constructor
- parent
-
parent object of the action group (QObject)
- name
-
name of the action group object (string or QString)
- exclusive
-
flag indicating an exclusive action group (boolean)
E4ActionGroup.addTo
addTo(widget)
Public method to add this action group to a widget.
- widget
-
widget to add to (QWidget)