KAnimatedButton Class Reference
from PyKDE4.kdeui import *
Inherits: QToolButton → QAbstractButton → QWidget → QObject
Detailed Description
An extended version of QToolButton which can display an animated icon.
This widget extends QToolButton with the ability to display animation using a sequence of individual pixmaps. All you need to do is pass along a list of icon names and their size and everything else is taken care of.
- Note:
- if you change the iconSize() via setIconSize(), you will need to call updateIcons() also to force reloading of the correct icon size.
Signals | |
clicked () | |
Methods | |
__init__ (self, QWidget parent=0) | |
__init__ (self, KAnimatedButton a0) | |
clicked (self) | |
int | iconDimensions (self) |
QString | icons (self) |
setIcons (self, QString icons) | |
slotTimerUpdate (self) | |
start (self) | |
stop (self) | |
updateIcons (self) |
Method Documentation
__init__ | ( | self, | ||
QWidget | parent=0 | |||
) |
Construct an animated tool button.
- Parameters:
-
parent The parent widget
__init__ | ( | self, | ||
KAnimatedButton | a0 | |||
) |
clicked | ( | self ) |
- Signal syntax:
QObject.connect(source, SIGNAL("clicked()"), target_slot)
int iconDimensions | ( | self ) |
Returns the current maximum dimension (width or length) for an icon.
QString icons | ( | self ) |
Returns the current icons
setIcons | ( | self, | ||
QString | icons | |||
) |
Sets the name of the animated icons to load. This will use the KIconLoader.loadAnimated method for the actual loading.
- Parameters:
-
icons The name of the icons to use for the animation
slotTimerUpdate | ( | self ) |
start | ( | self ) |
Starts the animation from frame 1
stop | ( | self ) |
Stops the animation. This will also reset the widget to frame 1.
updateIcons | ( | self ) |
Updates the icons by reloading them if required.
You must call this after you change the icon size, in order for the correct size icon to be loaded.