KDE 4.7 PyKDE API Reference

- KDE's Python API

# ActionButtons Class Reference

`from PyKDE4.polkitqt import *`

Inherits: PolkitQt.ActionButton → PolkitQt.Action → QAction → QObject
Namespace: PolkitQt

## Detailed Description

\class ActionButtons actionbuttons.h ActionButtons

Author:
  Dario Freddi <drf54321@gmail.com>

Class used to hold and update a list of QAbstractButtons

This class is a convenience wrapper around ActionButton that lets you associate an undefined number of QAbstractButtons with a single action. Every button will be updated accordingly upon action's properties changes.

See also:
  ActionButton

## Methods
| __init__ (self, PolkitQt.ActionButtons a0)
| __init__ (self, [QAbstractButton] buttons, QString actionId=QString(), QObject parent=0)
| addButton (self, QAbstractButton button)
[QAbstractButton] | buttons (self)
| removeButton (self, QAbstractButton button)
| setButtons (self, [QAbstractButton] buttons)

## Method Documentation

__init__ | ( | self, |
|  | PolkitQt.ActionButtons | a0
| ) |  |  |

__init__ | ( | self, |
|  | [QAbstractButton] | buttons,
|  | QString | actionId=QString(),
|  | QObject | parent=0
| ) |  |  |

Constructs a new ActionButton. You need to pass this constructor an existing list of QAbstractButtons, whose properties will be modified according to the underlying Action object. As ActionButtons inherits from Action, you can define your buttons' behavior right through this wrapper.

See also:
  Action

Parameters:

  | buttons | the QAbstractButton to associate to this ActionButton

Parameters:

  | actionId | the action Id to create the underlying Action

Parameters:

  | parent | the parent object

addButton | ( | self, |
|  | QAbstractButton | button
| ) |  |  |

Adds a button to the current button list. The button's properties will be updated according to the action upon adding.

Parameters:

  | button | the button to add

[QAbstractButton] buttons | ( |  | self ) |

Returns the current buttons list

Returns:
  the buttons currently associated with the underlying action

removeButton | ( | self, |
|  | QAbstractButton | button
| ) |  |  |

Removes a button from the current list. Please note that Polkit-Qt does not handle the removed button's memory, so you should take care of deleting it yourself (if needed).

Parameters:

  | button | the button to remove

setButtons | ( | self, |
|  | [QAbstractButton] | buttons
| ) |  |  |

Sets a list of buttons associated to the underlying action.

Note:
  If you are calling this function, you're probably changing the buttons list the action is referring to. If this is the case, please note that Polkit-Qt does not handle the previous buttons' memory, so you should take care of deleting them yourself (if needed). You can retrieve it by using buttons()

See also:
  buttons

Parameters:

  | buttons | the new buttons associated with the underlying action