Solid.AcAdapter

KDE 4.5 PyKDE API Reference

- KDE's Python API

# AcAdapter Class Reference

`from PyKDE4.solid import *`

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

## Detailed Description

This device interface is available on AC adapters.

## Signals
| plugStateChanged (bool newState, QString udi)
## Methods
| __init__ (self, QObject backendObject)
bool | isPlugged (self)
## Static Methods
Solid.DeviceInterface.Type | deviceInterfaceType ()

## Signal Documentation

plugStateChanged | ( | bool | newState,
|  | QString | udi
| ) |  |  |

This signal is emitted when the AC adapter is plugged or unplugged.

Parameters:

  | newState | true if the AC adapter is plugged, false otherwise
  | udi | the UDI of the AC adapter

Signal syntax:
  `QObject.connect(source, SIGNAL("plugStateChanged(bool, const QString&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QObject | backendObject
| ) |  |  |

Creates a new AcAdapter object. You generally won't need this. It's created when necessary using Device.as().

Parameters:

  | backendObject | the device interface object provided by the backend

See also:
  Solid.Device.as()

bool isPlugged | ( |  | self ) |

Indicates if this AC adapter is plugged.

Returns:
  true if the adapter is plugged, false otherwise

## Static Method Documentation

Solid.DeviceInterface.Type deviceInterfaceType | ( |  | ) |

Get the Solid.DeviceInterface.Type of the AcAdapter device interface.

Returns:
  the AcAdapter device interface type

See also:
  Solid.Ifaces.Enums.DeviceInterface.Type