# eric3.UI.E3Action

Module implementing an Action class substituting QAction.

This substitution 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.
E3Action | Class implementing an Action class substituting QAction.
E3ActionGroup | Class implementing an ActionGroup class substituting QActionGroup.

### Functions

None

## 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

Up

## E3Action

Class implementing an Action class substituting QAction.

### Derived from

QObject

### Methods

E3Action | Constructor
accel | Public method to retrieve the accelerator.
addTo | Public method to add this action to a widget.
alternateAccel | Public method to retrieve the alternative accelerator.
connectIt | Public method to connect signals of the action to a receiver.
isOn | Public slot to retrieve the toggle status.
mapIt | Public method to set a mapping for the action.
menuText | Public method to retrieve the actions menu text.
setAccel | Public slot to set the accelerator.
setAlternateAccel | Public slot to set the alternative accelerator.
setEnabled | Public slot to set the enabled status.
setIconSet | Public slot to set the icon set.
setOn | Public slot to set the toggle status.
setStatusTip | Public slot to set the text of the status tip.
setWhatsThis | Public slot to set the text of the What's This help.
statusTip | Public method to retrieve the text for the status tip.
text | Public method to retrieve the actions text.
whatsThis | Public method to retrieve the text for the What's This help.

### E3Action (Constructor)

E3Action(*args)

Constructor

args
  argument list of the constructor. This list is one of
  - text (string or QString), icon (QIconSet), menu text (string or QString), accelarator (QKeySequence), alternative accelerator (QKeySequence), parent (QObject), name (string or QString), toggle (boolean)
  - text (string or QString), icon (QIconSet), 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)

### E3Action.accel

accel()

Public method to retrieve the accelerator.

Returns:
  the accelerator (QKeySequence)

### E3Action.addTo

addTo(widget)

Public method to add this action to a widget.

widget
  widget to add to (QWidget)

### E3Action.alternateAccel

alternateAccel()

Public method to retrieve the alternative accelerator.

Returns:
  the alternative accelerator (QKeySequence)

### E3Action.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)

### E3Action.isOn

isOn()

Public slot to retrieve the toggle status.

Returns:
  the toggle status (boolean)

### E3Action.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)

### E3Action.menuText

menuText()

Public method to retrieve the actions menu text.

Returns:
  the menu text (QString)

### E3Action.setAccel

setAccel(accel)

Public slot to set the accelerator.

accel
  the accelerator (QKeySequence)

### E3Action.setAlternateAccel

setAlternateAccel(accel)

Public slot to set the alternative accelerator.

accel
  the alternative accelerator (QKeySequence)

### E3Action.setEnabled

setEnabled(on)

Public slot to set the enabled status.

on
  the enabled status (boolean)

### E3Action.setIconSet

setIconSet(iconSet)

Public slot to set the icon set.

iconSet
  the new icon set (QIconSet)

### E3Action.setOn

setOn(on)

Public slot to set the toggle status.

on
  the toggle status (boolean)

### E3Action.setStatusTip

setStatusTip(text)

Public slot to set the text of the status tip.

text
  text to be shown (string or QString)

### E3Action.setWhatsThis

setWhatsThis(text)

Public slot to set the text of the What's This help.

text
  text to be shown (string or QString)

### E3Action.statusTip

statusTip()

Public method to retrieve the text for the status tip.

Returns:
  text for the status tip (QString)

### E3Action.text

text()

Public method to retrieve the actions text.

Returns:
  the actions text (QString)

### E3Action.whatsThis

whatsThis()

Public method to retrieve the text for the What's This help.

Returns:
  text for the What's This help (QString)

Up

## E3ActionGroup

Class implementing an ActionGroup class substituting QActionGroup.

### Derived from

QObject

### Methods

E3ActionGroup | Constructor
addTo | Public method to add this action group to a widget.
getActionGroups | Public method to retrieve the underlying action group objects.
getAlternateActionGroup | Public method to retrieve the alternative action group object.
getMainActionGroup | Public method to retrieve the primary action group object.
setEnabled | Public slot to set the enabled status.

### E3ActionGroup (Constructor)

E3ActionGroup(parent, name = None, exclusive = 0)

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)

### E3ActionGroup.addTo

addTo(widget)

Public method to add this action group to a widget.

widget
  widget to add to (QWidget)

### E3ActionGroup.getActionGroups

getActionGroups()

Public method to retrieve the underlying action group objects.

Returns:
  tuple containing the underlying action groups (tuple of two QActionGroup)

### E3ActionGroup.getAlternateActionGroup

getAlternateActionGroup()

Public method to retrieve the alternative action group object.

Returns:
  alternative action group (QActionGroup)

### E3ActionGroup.getMainActionGroup

getMainActionGroup()

Public method to retrieve the primary action group object.

Returns:
  primary action group (QActionGroup)

### E3ActionGroup.setEnabled

setEnabled(on)

Public slot to set the enabled status.

on
  the enabled status (boolean)

Up