\section{KAnim\-Widget Class Reference}
\label{classKAnimWidget}\index{KAnimWidget@{KAnimWidget}}
This is a widget used to display animation using multiple individual pixmaps. Widget animated using individual icons.  


{\tt \#include $<$kanimwidget.h$>$}

Inheritance diagram for KAnim\-Widget:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=60pt]{classKAnimWidget__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAnim\-Widget:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=60pt]{classKAnimWidget__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf clicked} ()\label{classKAnimWidget_l0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAnim\-Widget} (const  {\bf QString} \&icons, int size=0, {\bf QWidget} $\ast$parent=0L, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em This is the most common constructor. \item\end{CompactList}\item 
{\bf KAnim\-Widget} ({\bf QWidget} $\ast$parent=0L, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$KAnim\-Widget} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void {\bf start} ()
\begin{CompactList}\small\item\em Starts the animation from frame 1. \item\end{CompactList}\item 
void {\bf stop} ()
\begin{CompactList}\small\item\em Stops the animation. \item\end{CompactList}\item 
void {\bf set\-Size} (int size)
\begin{CompactList}\small\item\em Sets the size of the icons. \item\end{CompactList}\item 
void {\bf set\-Icons} (const  {\bf QString} \&icons)
\begin{CompactList}\small\item\em Sets the name of the animated icons to load. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Timer\-Update} ()\label{classKAnimWidget_j0}

\item 
void {\bf update\-Icons} ()\label{classKAnimWidget_j1}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf draw\-Contents} ({\bf QPainter} $\ast$p)\label{classKAnimWidget_b0}

\item 
virtual void {\bf leave\-Event} ({\bf QEvent} $\ast$e)\label{classKAnimWidget_b1}

\item 
virtual void {\bf enter\-Event} ({\bf QEvent} $\ast$e)\label{classKAnimWidget_b2}

\item 
virtual void {\bf hide\-Event} ({\bf QHide\-Event} $\ast$e)\label{classKAnimWidget_b3}

\item 
virtual void {\bf show\-Event} ({\bf QShow\-Event} $\ast$e)\label{classKAnimWidget_b4}

\item 
virtual void {\bf mouse\-Press\-Event} ({\bf QMouse\-Event} $\ast$e)\label{classKAnimWidget_b5}

\item 
virtual void {\bf mouse\-Release\-Event} ({\bf QMouse\-Event} $\ast$e)\label{classKAnimWidget_b6}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKAnimWidget_b7}

\end{CompactItemize}


\subsection{Detailed Description}
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.

This widget also emits a 'clicked()' signal when it received a mouse press event.

A quick example: \small\begin{alltt}
 {\bf QStringList} icons;
 icons.append("one");
 icons.append("two");
 icons.append("three");
 KAnimWidget *anim = new KAnimWidget(icons, 0, this);
 anim-$>${\bf start()}{\rm (p.\,\pageref{classKAnimWidget_a3})};
 \end{alltt}\normalsize 


That example will search for the pixmaps \char`\"{}one.png\char`\"{}, \char`\"{}two.png\char`\"{}, and \char`\"{}three.png\char`\"{} in the share/icons/small/ directories as well as the app's pics directory.

\begin{Desc}
\item[Author:]Kurt Granroth $<${\tt granroth@kde.org}$>$ \end{Desc}




Definition at line 56 of file kanimwidget.h.

\subsection{Constructor \& Destructor Documentation}
\index{KAnimWidget@{KAnim\-Widget}!KAnimWidget@{KAnimWidget}}
\index{KAnimWidget@{KAnimWidget}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAnim\-Widget::KAnim\-Widget (const {\bf QString} \& {\em icons}, int {\em size} = 0, {\bf QWidget} $\ast$ {\em parent} = 0L, const char $\ast$ {\em name} = 0L)}\label{classKAnimWidget_a0}


This is the most common constructor. 

Pass along the name of the animated icons to use (e.g., \char`\"{}kde\char`\"{}) for the animation and an optional size to load and you're set. If you omit the size, the default size will be used.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icons}]The icons name (e.g., \char`\"{}kde\char`\"{}) to use for the animation \item[{\em size}]The size to load You don't have to set it if the parent is a {\bf KTool\-Bar}{\rm (p.\,\pageref{classKToolBar})}; in this case it will use the toolbar's size. \item[{\em parent}]The standard parent \item[{\em name}]The standard internal name \end{description}
\end{Desc}


Definition at line 42 of file kanimwidget.cpp.

References KStd\-Accel::name(), QFrame::set\-Frame\-Style(), and set\-Icons().\index{KAnimWidget@{KAnim\-Widget}!KAnimWidget@{KAnimWidget}}
\index{KAnimWidget@{KAnimWidget}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAnim\-Widget::KAnim\-Widget ({\bf QWidget} $\ast$ {\em parent} = 0L, const char $\ast$ {\em name} = 0L)}\label{classKAnimWidget_a1}


Default constructor. 

This will not do anything until you use {\bf set\-Icons}{\rm (p.\,\pageref{classKAnimWidget_a6})}() later.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]The standard parent \item[{\em name}]The standard internal name \end{description}
\end{Desc}
\index{KAnimWidget@{KAnim\-Widget}!~KAnimWidget@{$\sim$KAnimWidget}}
\index{~KAnimWidget@{$\sim$KAnimWidget}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KAnim\-Widget::$\sim${\bf KAnim\-Widget} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKAnimWidget_a2}


Destructor. 



Definition at line 59 of file kanimwidget.cpp.

\subsection{Member Function Documentation}
\index{KAnimWidget@{KAnim\-Widget}!start@{start}}
\index{start@{start}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAnim\-Widget::start ()}\label{classKAnimWidget_a3}


Starts the animation from frame 1. 



Definition at line 66 of file kanimwidget.cpp.\index{KAnimWidget@{KAnim\-Widget}!stop@{stop}}
\index{stop@{stop}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAnim\-Widget::stop ()}\label{classKAnimWidget_a4}


Stops the animation. 

This will also reset the widget to frame 1. 

Definition at line 72 of file kanimwidget.cpp.\index{KAnimWidget@{KAnim\-Widget}!setSize@{setSize}}
\index{setSize@{setSize}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAnim\-Widget::set\-Size (int {\em size})}\label{classKAnimWidget_a5}


Sets the size of the icons. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em size}]The size of the icons \end{description}
\end{Desc}


Definition at line 79 of file kanimwidget.cpp.\index{KAnimWidget@{KAnim\-Widget}!setIcons@{setIcons}}
\index{setIcons@{setIcons}!KAnimWidget@{KAnim\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAnim\-Widget::set\-Icons (const {\bf QString} \& {\em icons})}\label{classKAnimWidget_a6}


Sets the name of the animated icons to load. 

This will use the {\bf KIcon\-Loader::load\-Animated} method for the actual loading.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icons}]The name of the icons to use for the animation \end{description}
\end{Desc}


Definition at line 88 of file kanimwidget.cpp.

Referenced by KAnim\-Widget().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kanimwidget.h\item 
kanimwidget.cpp\end{CompactItemize}
