KDE 4.9 PyKDE API Reference

- KDE's Python API

# CheckBox Class Reference

`from PyKDE4.plasma import *`

Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma

## Detailed Description

CheckBox plasma/widgets/checkbox.h <Plasma/Widgets/CheckBox>

Provides a Plasma-themed checkbox.

## Signals

| toggled (bool a0)

## Methods

| __init__ (self, QGraphicsWidget parent=0)
| changeEvent (self, QEvent event)
QString | image (self)
bool | isChecked (self)
QCheckBox | nativeWidget (self)
| resizeEvent (self, QGraphicsSceneResizeEvent event)
| setChecked (self, bool checked)
| setImage (self, QString path)
| setStyleSheet (self, QString stylesheet)
| setText (self, QString text)
QString | styleSheet (self)
QString | text (self)

## Signal Documentation

toggled | ( | bool | a0
| ) |  |  |

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

## Method Documentation

__init__ | ( | self, |
|  | QGraphicsWidget | parent=0
| ) |  |  |

changeEvent | ( | self, |
|  | QEvent | event
| ) |  |  |

QString image | ( |  | self ) |

Returns:
  the image path being displayed currently, or an empty string if none.

bool isChecked | ( |  | self ) |

Returns:
  the checked state

QCheckBox nativeWidget | ( |  | self ) |

Returns:
  the native widget wrapped by this CheckBox

resizeEvent | ( | self, |
|  | QGraphicsSceneResizeEvent | event
| ) |  |  |

setChecked | ( | self, |
|  | bool | checked
| ) |  |  |

Sets the checked state.

Parameters:

  | checked | true if checked, false if not

setImage | ( | self, |
|  | QString | path
| ) |  |  |

Sets the path to an image to display.

Parameters:

  | path | the path to the image; if a relative path, then a themed image will be loaded.

setStyleSheet | ( | self, |
|  | QString | stylesheet
| ) |  |  |

Sets the stylesheet used to control the visual display of this CheckBox

Parameters:

  | stylesheet | a CSS string

setText | ( | self, |
|  | QString | text
| ) |  |  |

Sets the display text for this CheckBox

Parameters:

  | text | the text to display; should be translated.

QString styleSheet | ( |  | self ) |

Returns:
  the stylesheet currently used with this widget

QString text | ( |  | self ) |

Returns:
  the display text