KDE 4.2 PyKDE API Reference

- KDE's Python API

# ScrollBar Class Reference

`from PyKDE4.plasma import *`

Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma

## Detailed Description

ScrollBar plasma/widgets/scrollbar.h <Plasma/Widgets/ScrollBar>

Provides a plasma-themed QScrollBar.

## Signals

| valueChanged (int value)

## Methods

| __init__ (self, QGraphicsWidget parent)
int | maximum (self)
int | minimum (self)
QScrollBar | nativeWidget (self)
int | pageStep (self)
| setOrientation (self, Qt.Orientation orientation)
| setPageStep (self, int val)
| setRange (self, int min, int max)
| setSingleStep (self, int val)
| setStyleSheet (self, QString stylesheet)
| setValue (self, int val)
int | singleStep (self)
QString | styleSheet (self)
int | value (self)
| valueChanged (self, int value)

## Method Documentation

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

Creates a scrollbar; the default orientation is vertical

int maximum | ( |  | self ) |

Returns:
  the maximum value bound of this ScrollBar

int minimum | ( |  | self ) |

Returns:
  the minimum value bound of this ScrollBar

QScrollBar nativeWidget | ( |  | self ) |

Returns:
  the native widget wrapped by this ScrollBar

int pageStep | ( |  | self ) |

Returns:
  the amount of the page step

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

Sets the orientation of the ScrollBar.

setPageStep | ( | self, |
|  | int | val
| ) |  |  |

Sets the amount the slider will scroll when the user press page up or page down @arg val

setRange | ( | self, |
|  | int | min,
|  | int | max
| ) |  |  |

Sets the scrollbar minimum and maximum values @arg min minimum value @arg max maximum value

setSingleStep | ( | self, |
|  | int | val
| ) |  |  |

Sets the amount of the single step i.e how much the slider will move when the user press an arrow button @arg val

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

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

@arg stylesheet a CSS string

setValue | ( | self, |
|  | int | val
| ) |  |  |

Sets the current value for the ScrollBar @arg value must be minimum() <= value <= maximum()

int singleStep | ( |  | self ) |

Returns:
  the amount of the single step

QString styleSheet | ( |  | self ) |

Returns:
  the stylesheet currently used with this widget

int value | ( |  | self ) |

Returns:
  the current scrollbar value

valueChanged | ( | self, |
|  | int | value
| ) |  |  |

Emitted when the value of the slider changes

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