#include <kanimwidget.h>
Inherits TQFrame.
Public Slots | |
void | start () |
void | stop () |
Signals | |
void | clicked () |
Public Member Functions | |
KAnimWidget (const TQString &icons, int size=0, TQWidget *parent=0L, const char *name=0L) | |
virtual | ~KAnimWidget () |
void | setSize (int size) |
int | size () const |
TQString | icons () const |
void | setIcons (const TQString &icons) |
Protected Slots | |
void | slotTimerUpdate () |
void | updateIcons () |
Detailed Description
Standard "About KDE" dialog box.
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:
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.
Definition at line 55 of file kanimwidget.h.
Constructor & Destructor Documentation
◆ KAnimWidget()
KAnimWidget::KAnimWidget | ( | const TQString & | icons, |
int | size = 0 , |
||
TQWidget * | parent = 0L , |
||
const char * | name = 0L |
||
) |
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 TDEToolBar; in this case it will use the toolbar's size. parent The standard parent name The standard internal name
Definition at line 41 of file kanimwidget.cpp.
◆ ~KAnimWidget()
|
virtual |
Destructor.
Definition at line 58 of file kanimwidget.cpp.
Member Function Documentation
◆ icons()
TQString KAnimWidget::icons | ( | ) | const |
Returns the current icons since 3.4.
Definition at line 96 of file kanimwidget.cpp.
◆ setIcons()
void KAnimWidget::setIcons | ( | const TQString & | icons | ) |
Sets the name of the animated icons to load.
This will use the TDEIconLoader::loadAnimated method for the actual loading.
- Parameters
-
icons The name of the icons to use for the animation
Definition at line 87 of file kanimwidget.cpp.
◆ setSize()
void KAnimWidget::setSize | ( | int | size | ) |
Sets the size of the icons.
- Parameters
-
size The size of the icons
Definition at line 78 of file kanimwidget.cpp.
◆ size()
int KAnimWidget::size | ( | ) | const |
◆ start
|
slot |
Starts the animation from frame 1.
Definition at line 65 of file kanimwidget.cpp.
◆ stop
|
slot |
Stops the animation.
This will also reset the widget to frame 1.
Definition at line 71 of file kanimwidget.cpp.
The documentation for this class was generated from the following files: