KDE 4.9 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
| sliderMoved (int value)
| valueChanged (int value)
## Methods
| __init__ (self, QGraphicsWidget parent=0)
| contextMenuEvent (self, QGraphicsSceneContextMenuEvent event)
int | maximum (self)
int | minimum (self)
QScrollBar | nativeWidget (self)
Qt::Orientation | orientation (self)
int | pageStep (self)
| setMaximum (self, int max)
| setMinimum (self, int min)
| 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)

## Signal Documentation

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

Emitted when the slider has been moved by the user

Since:
  4.6

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

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

Emitted when the value of the slider changes

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

## Method Documentation

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

Creates a scrollbar; the default orientation is vertical

contextMenuEvent | ( | self, |
|  | QGraphicsSceneContextMenuEvent | event
| ) |  |  |

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

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

Returns:
  the orientation of the scrollbar

Since:
  4.4

int pageStep | ( |  | self ) |

Returns:
  the amount of the page step

setMaximum | ( | self, |
|  | int | max
| ) |  |  |

Parameters:

  | the | maximum value bound of this ScrollBar

Since:
  4.6

setMinimum | ( | self, |
|  | int | min
| ) |  |  |

Parameters:

  | the | minimum value bound of this ScrollBar

Since:
  4.6

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

Parameters:

  | val |

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

Sets the scrollbar minimum and maximum values

Parameters:

  | min | minimum value
  | 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

Parameters:

  | val |

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

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

Parameters:

  | stylesheet | a CSS string

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

Sets the current value for the ScrollBar

Parameters:

  | 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