Plasma.AbstractToolBox

KDE 4.7 PyKDE API Reference

- KDE's Python API

# AbstractToolBox Class Reference

`from PyKDE4.plasma import *`

Inherits: QGraphicsWidget → QObject
Namespace: Plasma

## Detailed Description

## Enumerations
ToolType | { AddTool, ConfigureTool, ControlTool, MiscTool, DestructiveTool, UserToolType }
## Signals
| toggled ()
| visibilityChanged (bool open)
## Methods
| __init__ (self, Plasma.Containment parent)
| __init__ (self, QObject parent=0, [QVariant] args=QVariantList())
| addTool (self, QAction action)
Plasma.Containment | containment (self)
bool | isShowing (self)
| removeTool (self, QAction action)
| reposition (self)
| restore (self, KConfigGroup group)
| save (self, KConfigGroup group)
| setShowing (self, bool show)
## Static Methods
[KPluginInfo] | listToolBoxInfo (QString parentApp=QString())
Plasma.AbstractToolBox | load (QString name, [QVariant] args=QVariantList(), Plasma.Containment containment=0)

## Signal Documentation

toggled | ( |  | ) |

Toolbox opened or closed

Signal syntax:
  `QObject.connect(source, SIGNAL("toggled()"), target_slot)`

visibilityChanged | ( | bool | open
| ) |  |  |

Toolbox opened or closed

Parameters:

  | open | tells if the toolbox opened or closed

Signal syntax:
  `QObject.connect(source, SIGNAL("visibilityChanged(bool)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | Plasma.Containment | parent
| ) |  |  |

__init__ | ( | self, |
|  | QObject | parent=0,
|  | [QVariant] | args=QVariantList()
| ) |  |  |

addTool | ( | self, |
|  | QAction | action
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

create a toolbox tool from the given action action the action to associate the tool with

Plasma.Containment containment | ( |  | self ) |

bool isShowing | ( |  | self ) |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Returns:
  true if the ToolBox is open and shown the actions list

removeTool | ( | self, |
|  | QAction | action
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

remove the tool associated with this action

reposition | ( |  | self ) |

Inform the ToolBox it has to reposition itlself It has to be reimplemented in toolboxes that need it

Since:
  4.6

restore | ( | self, |
|  | KConfigGroup | group
| ) |  |  |

Restore the ToolBox settings It has to be reimplemented in toolboxes that need it

Since:
  4.6

save | ( | self, |
|  | KConfigGroup | group
| ) |  |  |

Save the ToolBox settings It has to be reimplemented in toolboxes that need it

Since:
  4.6

setShowing | ( | self, |
|  | bool | show
| ) |  |  |

Abstract method:
  This method is abstract and can be overridden but not called directly.

Opens or closes the ToolBox

## Static Method Documentation

[KPluginInfo] listToolBoxInfo | ( | QString | parentApp=QString()
| ) |  |  |

Returns a list of all installed ToolBox plugins

Parameters:

  | parentApp | the application to filter applets on. Uses the X-KDE-ParentApp entry (if any) in the plugin info. The default value of QString() will result in a list containing only applets not specifically registered to an application.

Since:
  4.6

Plasma.AbstractToolBox load | ( | QString | name,
|  | [QVariant] | args=QVariantList(),
|  | Plasma.Containment | containment=0
| ) |  |  |

Create a new AbstractToolBox, loading the proper plugin

Parameters:

  | name | the plugin name
  | args | the plugin arguments
  | containment | the containment parent of the toolbox

Since:
  4.6

## Enumeration Documentation

ToolType

Enumerator:

  AddTool = 0 |
  ConfigureTool = 100 |
  ControlTool = 200 |
  MiscTool = 300 |
  DestructiveTool = 400 |
  UserToolType = DestructiveTool+1000 |