KDE 4.5 PyKDE API Reference

- KDE's Python API

# KPixmapSequence Class Reference

`from PyKDE4.kdeui import *`

## Detailed Description

\class KPixmapSequence kpixmapsequence.h KPixmapSequence

Loads and gives access to the frames of a typical multi-row pixmap as often used for spinners.

KPixmapSequence is implicitly shared. Copying is fast.

Once typically uses the static methods loadFromPath and loadFromPixmap to create an instance of KPixmapSequence.

Author:
  Aurélien Gâteau <agateau@kde.org><br/>Sebastian Trueg <trueg@kde.org>

Since:
  4.4

## Methods
| __init__ (self)
| __init__ (self, KPixmapSequence other)
| __init__ (self, QPixmap pixmap, QSize frameSize=QSize())
| __init__ (self, QString xdgIconName, int size=KIconLoader.SizeSmall)
QPixmap | frameAt (self, int index)
int | frameCount (self)
QSize | frameSize (self)
bool | isEmpty (self)
bool | isValid (self)

## Method Documentation

__init__ | ( |  | self ) |

Create an empty sequence

__init__ | ( | self, |
|  | KPixmapSequence | other
| ) |  |  |

Copy constructor

__init__ | ( | self, |
|  | QPixmap | pixmap,
|  | QSize | frameSize=QSize()
| ) |  |  |

Load a sequence from a pixmap.

Parameters:

  | pixmap | Pixmap to load

Parameters:

  | frameSize | The size of the frames to load. The width of the file has to be a multiple of the frame width; the same is true for the height. If an invalid size is specified the file is considered to be one column of square frames.

Returns:
  The sequence loaded from path or an invalid sequence if an error occurred (file could not be opened or frameSize does not match the file's size)

__init__ | ( | self, |
|  | QString | xdgIconName,
|  | int | size=KIconLoader.SizeSmall
| ) |  |  |

Create a sequence from an xdg animation pixmap.

Parameters:

  | xdgIconName | The name of the icon (example: process-working)

Parameters:

  | size | The icon/frame size

QPixmap frameAt | ( | self, |
|  | int | index
| ) |  |  |

Retrieve the frame at index.

Parameters:

  | index | The index of the frame in question starting at 0.

int frameCount | ( |  | self ) |

The number of frames in this sequence.

QSize frameSize | ( |  | self ) |

Returns:
  The size of an individual frame in the sequence. Be aware that frames are always taken to be squared.

bool isEmpty | ( |  | self ) |

Returns:
  true if no sequence was loaded successfully.

\sa isValid

bool isValid | ( |  | self ) |

Returns:
  true if a sequence was loaded successfully.

\sa isEmpty