Plasma.Slider

KDE 4.9 PyKDE API Reference

- KDE's Python API

# Slider Class Reference

`from PyKDE4.plasma import *`

Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma

## Detailed Description

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

Provides a plasma-themed QSlider.

## Signals
| sliderMoved (int value)
| valueChanged (int value)
## Methods
| __init__ (self, QGraphicsWidget parent=0)
int | maximum (self)
int | minimum (self)
QSlider | nativeWidget (self)
Qt::Orientation | orientation (self)
| paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget)
| setMaximum (self, int maximum)
| setMinimum (self, int minimum)
| setOrientation (self, Qt::Orientation orientation)
| setRange (self, int minimum, int maximum)
| setStyleSheet (self, QString stylesheet)
| setValue (self, int value)
QString | styleSheet (self)
int | value (self)
| wheelEvent (self, QGraphicsSceneWheelEvent event)

## Signal Documentation

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

This signal is emitted when the user drags the slider.

In fact, it is emitted whenever the sliderMoved(int) signal of QSlider 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
| ) |  |  |

int maximum | ( |  | self ) |

Returns:
  the maximum value

int minimum | ( |  | self ) |

Returns:
  the minimum value

QSlider nativeWidget | ( |  | self ) |

Returns:
  the native widget wrapped by this Slider

Qt::Orientation orientation | ( |  | self ) |

Returns:
  the orientation of the slider

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

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

Sets the maximum value the slider can take.

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

Sets the minimum value the slider can take.

setOrientation | ( | self, |
|  | Qt::Orientation | orientation
| ) |  |  |

Sets the orientation of the slider.

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 Slider

Parameters:

  | 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

wheelEvent | ( | self, |
|  | QGraphicsSceneWheelEvent | event
| ) |  |  |