KPixmapSequenceOverlayPainter

KDE 4.7 PyKDE API Reference

- KDE's Python API

# KPixmapSequenceOverlayPainter Class Reference

`from PyKDE4.kdeui import *`

Inherits: QObject

## Detailed Description

\class KPixmapSequenceOverlayPainter kpixmapsequenceoverlaypainter.h KPixmapSequenceOverlayPainter

Paints a KPixmapSequence on top of any widget at any position.

The KPixmapSequenceOverlayPainter paints an overlay on top of an arbitrary QWidget using a KPixmapSequence. This is typically used for spinners indicating that a process is not finished yet.

Author:
  Sebastian Trueg <trueg@kde.org>

Since:
  4.4

## Methods
| __init__ (self, QObject parent=0)
Qt::Alignment | alignment (self)
int | interval (self)
QPoint | offset (self)
QRect | rect (self)
KPixmapSequence | sequence (self)
| setAlignment (self, Qt::Alignment align)
| setInterval (self, int msecs)
| setOffset (self, QPoint offset)
| setRect (self, QRect rect)
| setSequence (self, KPixmapSequence seq)
| setWidget (self, QWidget w)
| start (self)
| stop (self)

## Method Documentation

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

Constructor

Qt::Alignment alignment | ( |  | self ) |

The alignment of the pixmaps in the rect. \sa setAlignment

int interval | ( |  | self ) |

The interval between frames.

\sa setInterval

QPoint offset | ( |  | self ) |

The optional offset within the rect. \sa setOffset

QRect rect | ( |  | self ) |

The optional rect to draw the pixmaps in. \sa setRect

KPixmapSequence sequence | ( |  | self ) |

The sequence used to draw the overlay.

\sa setSequence

setAlignment | ( | self, |
|  | Qt::Alignment | align
| ) |  |  |

Set the alignment of the sequence in rect.

Parameters:

  | align | alignment of the overlay. Qt.AlignJustify does not make sense here. Defaults to Qt.Center.

setInterval | ( | self, |
|  | int | msecs
| ) |  |  |

Set the interval between frames. The default is 200.

setOffset | ( | self, |
|  | QPoint | offset
| ) |  |  |

Set the offset relative to the placement determined by alignment and rect.

Parameters:

  | offset | An optional offset which allows an absolute placement.

Defaults to an empty point.

setRect | ( | self, |
|  | QRect | rect
| ) |  |  |

Set the rect in which to place the sequence. Be aware that this optional property does not scale the pixmaps (except if it is smaller) but allows to change the placement.

Parameters:

  | rect | The rect in which to draw the pixmap using alignment and offset. Be aware that setting a rect bigger than the widget can lead to weird painting errors.

Defaults to the widget's rect.

setSequence | ( | self, |
|  | KPixmapSequence | seq
| ) |  |  |

Set the sequence to be used. By default the KDE busy sequence is used.

setWidget | ( | self, |
|  | QWidget | w
| ) |  |  |

Set the widget to draw the overlay on.

start | ( |  | self ) |

Start drawing the sequence.

The overlay will be drawn until a call to stop()

stop | ( |  | self ) |

Stop drawing the overlay.