Plasma.SpinBox

KDE 4.5 PyKDE API Reference

- KDE's Python API

# SpinBox Class Reference

`from PyKDE4.plasma import *`

Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma

## Detailed Description

SpinBox plasma/widgets/slider.h <Plasma/Widgets/SpinBox>

Provides a plasma-themed KIntSpinBox.

## Signals
| editingFinished ()
| sliderMoved (int value)
| valueChanged (int value)
## Methods
| __init__ (self, QGraphicsWidget parent=0)
| changeEvent (self, QEvent event)
| focusOutEvent (self, QFocusEvent event)
| hoverEnterEvent (self, QGraphicsSceneHoverEvent event)
| hoverLeaveEvent (self, QGraphicsSceneHoverEvent event)
int | maximum (self)
int | minimum (self)
| mousePressEvent (self, QGraphicsSceneMouseEvent event)
KIntSpinBox | nativeWidget (self)
| paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget)
| resizeEvent (self, QGraphicsSceneResizeEvent event)
| setMaximum (self, int maximum)
| setMinimum (self, int minimum)
| setRange (self, int minimum, int maximum)
| setStyleSheet (self, QString stylesheet)
| setValue (self, int value)
QString | styleSheet (self)
int | value (self)

## Signal Documentation

editingFinished | ( |  | ) |

This signal is emitted when editing is finished. This happens when the spinbox loses focus and when enter is pressed.

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

sliderMoved | ( | int | value
| ) |  |  |

This signal is emitted when the user drags the slider.

In fact, it is emitted whenever the sliderMoved(int) signal of KIntSpinBox would be emitted. See the Qt documentation for more information.

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

valueChanged | ( | int | value
| ) |  |  |

This signal is emitted when the slider value has changed, with the new slider value as argument.

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

## Method Documentation

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

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

focusOutEvent | ( | self, |
|  | QFocusEvent | event
| ) |  |  |

hoverEnterEvent | ( | self, |
|  | QGraphicsSceneHoverEvent | event
| ) |  |  |

hoverLeaveEvent | ( | self, |
|  | QGraphicsSceneHoverEvent | event
| ) |  |  |

int maximum | ( |  | self ) |

Returns:
  the maximum value

int minimum | ( |  | self ) |

Returns:
  the minimum value

mousePressEvent | ( | self, |
|  | QGraphicsSceneMouseEvent | event
| ) |  |  |

KIntSpinBox nativeWidget | ( |  | self ) |

Returns:
  the native widget wrapped by this SpinBox

paint | ( | self, |
|  | QPainter | painter,
|  | QStyleOptionGraphicsItem | option,
|  | QWidget | widget
| ) |  |  |

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

setMaximum | ( | self, |
|  | int | maximum
| ) |  |  |

Sets the maximum value the slider can take.

setMinimum | ( | self, |
|  | int | minimum
| ) |  |  |

Sets the minimum value the slider can take.

setRange | ( | self, |
|  | int | minimum,
|  | int | maximum
| ) |  |  |

Sets the minimum and maximum values the slider can take.

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

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

@arg stylesheet a CSS string

setValue | ( | self, |
|  | int | value
| ) |  |  |

Sets the value of the slider.

If it is outside the range specified by minimum() and maximum(), it will be adjusted to fit.

QString styleSheet | ( |  | self ) |

Returns:
  the stylesheet currently used with this widget

int value | ( |  | self ) |

Returns:
  the current value