org.kde.koala

Class KAnimWidget

public class KAnimWidget extends QFrame

This is a widget used to display animation using multiple individual pixmaps. This widget allows you to deal with variable size icons (e.g., ones that will change based on a global setting) as it loads the icons internally. All you need to do is pass along a list of icon names and their size and everything else is taken care of. This widget also emits a 'clicked()' signal when it received a mouse press event. A quick example:
 KAnimWidget anim = new KAnimWidget("kde", 0, this);
 anim.start();
 
That example will search for the pixmaps "one.png", "two.png", and "three.png" in the share/icons/small/ directories as well as the app's pics directory. See KAnimWidgetSignals for signals emitted by KAnimWidget

Author: Kurt Granroth

UNKNOWN: Standard "About KDE" dialog box.

Constructor Summary
protected KAnimWidget(Class dummy)
KAnimWidget(String icons, int size, QWidget parent, String name)
This is the most common constructor.
KAnimWidget(String icons, int size, QWidget parent)
KAnimWidget(String icons, int size)
KAnimWidget(String icons)
Method Summary
StringclassName()
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voiddrawContents(QPainter p)
protected voidenterEvent(QEvent e)
protected voidfinalize()
Deletes the wrapped C++ instance
protected voidhideEvent(QHideEvent e)
Stringicons()
Returns the current icons since 3.4
inticonSize()
Returns the current size.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected voidleaveEvent(QEvent e)
QMetaObjectmetaObject()
protected voidmousePressEvent(QMouseEvent e)
protected voidmouseReleaseEvent(QMouseEvent e)
voidsetIcons(String icons)
Sets the name of the animated icons to load.
voidsetSize(int size)
Sets the size of the icons.
voidshowEvent(QShowEvent e)
protected voidslotTimerUpdate()
voidstart()
Starts the animation from frame 1
voidstop()
Stops the animation.
protected voidupdateIcons()

Constructor Detail

KAnimWidget

protected KAnimWidget(Class dummy)

KAnimWidget

public KAnimWidget(String icons, int size, QWidget parent, String name)
This is the most common constructor. Pass along the name of the animated icons to use (e.g., "kde") for the animation and an optional size to load and you're set. If you omit the size, the default size will be used.

Parameters: icons The icons name (e.g., "kde") to use for the animation size The size to load You don't have to set it if the parent is a KToolBar; in this case it will use the toolbar's size. parent The standard parent name The standard internal name

UNKNOWN: This is the most common constructor.

KAnimWidget

public KAnimWidget(String icons, int size, QWidget parent)

KAnimWidget

public KAnimWidget(String icons, int size)

KAnimWidget

public KAnimWidget(String icons)

Method Detail

className

public String className()

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

drawContents

protected void drawContents(QPainter p)

enterEvent

protected void enterEvent(QEvent e)

finalize

protected void finalize()
Deletes the wrapped C++ instance

hideEvent

protected void hideEvent(QHideEvent e)

icons

public String icons()
Returns the current icons since 3.4

UNKNOWN: Returns the current icons since 3.

iconSize

public int iconSize()
Returns the current size.

UNKNOWN: Returns the current size.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

leaveEvent

protected void leaveEvent(QEvent e)

metaObject

public QMetaObject metaObject()

mousePressEvent

protected void mousePressEvent(QMouseEvent e)

mouseReleaseEvent

protected void mouseReleaseEvent(QMouseEvent e)

setIcons

public void setIcons(String 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

UNKNOWN: Sets the name of the animated icons to load.

setSize

public void setSize(int size)
Sets the size of the icons.

Parameters: size The size of the icons

UNKNOWN: Sets the size of the icons.

showEvent

public void showEvent(QShowEvent e)

slotTimerUpdate

protected void slotTimerUpdate()

start

public void start()
Starts the animation from frame 1

UNKNOWN: Starts the animation from frame 1

stop

public void stop()
Stops the animation. This will also reset the widget to frame 1.

UNKNOWN: Stops the animation.

updateIcons

protected void updateIcons()