.TH "KAnimWidget" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KAnimWidget \- This is a widget used to display animation using multiple individual pixmaps. Widget animated using individual icons.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kanimwidget.h>\fP
.PP
Inherits \fBQFrame\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBclicked\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKAnimWidget\fP (const  \fBQString\fP &icons, int size=0, \fBQWidget\fP *parent=0L, const  char *name=0L)"
.br
.RI "\fIThis is the most common constructor. \fP"
.ti -1c
.RI "\fBKAnimWidget\fP (\fBQWidget\fP *parent=0L, const  char *name=0L)"
.br
.RI "\fIDefault constructor. \fP"
.ti -1c
.RI "virtual \fB~KAnimWidget\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "void \fBstart\fP ()"
.br
.RI "\fIStarts the animation from frame 1. \fP"
.ti -1c
.RI "void \fBstop\fP ()"
.br
.RI "\fIStops the animation. \fP"
.ti -1c
.RI "void \fBsetSize\fP (int size)"
.br
.RI "\fISets the size of the icons. \fP"
.ti -1c
.RI "void \fBsetIcons\fP (const  \fBQString\fP &icons)"
.br
.RI "\fISets the name of the animated icons to load. \fP"
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotTimerUpdate\fP ()"
.br
.ti -1c
.RI "void \fBupdateIcons\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdrawContents\fP (\fBQPainter\fP *p)"
.br
.ti -1c
.RI "virtual void \fBleaveEvent\fP (\fBQEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBenterEvent\fP (\fBQEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBhideEvent\fP (\fBQHideEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBshowEvent\fP (\fBQShowEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBmousePressEvent\fP (\fBQMouseEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBmouseReleaseEvent\fP (\fBQMouseEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is a widget used to display animation using multiple individual pixmaps. Widget animated using individual icons. 

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.
.PP
This widget also emits a 'clicked()' signal when it received a mouse press event.
.PP
A quick example: 
.PP
.nf

 \fBQStringList\fP icons;
 icons.append('one');
 icons.append('two');
 icons.append('three');
 KAnimWidget *anim = new KAnimWidget(icons, 0, this);
 anim->\fBstart()\fP;
 
.PP
.PP
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.
.PP
\fBAuthor:\fP
.RS 4
Kurt Granroth <granroth@kde.org> 
.RE
.PP

.PP
Definition at line 56 of file kanimwidget.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KAnimWidget::KAnimWidget (const \fBQString\fP & icons, int size = 0, \fBQWidget\fP * parent = 0L, const char * name = 0L)"
.PP
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.
.PP
\fBParameters:\fP
.RS 4
\fIicons\fP The icons name (e.g., 'kde') to use for the animation 
.br
\fIsize\fP The size to load You don't have to set it if the parent is a \fBKToolBar\fP; in this case it will use the toolbar's size. 
.br
\fIparent\fP The standard parent 
.br
\fIname\fP The standard internal name 
.RE
.PP
Definition at line 42 of file kanimwidget.cpp.
.PP
References KStdAccel::name(), QFrame::setFrameStyle(), and setIcons().
.SS "KAnimWidget::KAnimWidget (\fBQWidget\fP * parent = 0L, const char * name = 0L)"
.PP
Default constructor. This will not do anything until you use \fBsetIcons\fP() later.
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP The standard parent 
.br
\fIname\fP The standard internal name 
.RE
.PP

.SS "KAnimWidget::~\fBKAnimWidget\fP ()\fC [virtual]\fP"
.PP
Destructor. Definition at line 59 of file kanimwidget.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KAnimWidget::start ()"
.PP
Starts the animation from frame 1. Definition at line 66 of file kanimwidget.cpp.
.SS "void KAnimWidget::stop ()"
.PP
Stops the animation. This will also reset the widget to frame 1. Definition at line 72 of file kanimwidget.cpp.
.SS "void KAnimWidget::setSize (int size)"
.PP
Sets the size of the icons. \fBParameters:\fP
.RS 4
\fIsize\fP The size of the icons 
.RE
.PP
Definition at line 79 of file kanimwidget.cpp.
.SS "void KAnimWidget::setIcons (const \fBQString\fP & icons)"
.PP
Sets the name of the animated icons to load. This will use the \fBKIconLoader::loadAnimated\fP method for the actual loading.
.PP
\fBParameters:\fP
.RS 4
\fIicons\fP The name of the icons to use for the animation 
.RE
.PP
Definition at line 88 of file kanimwidget.cpp.
.PP
Referenced by KAnimWidget().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
