• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KAnimatedButton Class Reference

An extended version of QToolButton which can display an animated icon. More...

#include <kanimatedbutton.h>

Inheritance diagram for KAnimatedButton:

Inheritance graph
[legend]

List of all members.


Public Slots

void start ()
void stop ()
void updateIcons ()

Signals

void clicked ()

Public Member Functions

int iconDimensions () const
QString icons () const
 KAnimatedButton (QWidget *parent=0L)
void setIcons (const QString &icons)
virtual ~KAnimatedButton ()

Protected Slots

void slotTimerUpdate ()

Properties

QString icons

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.
Author:
Kurt Granroth <granroth@kde.org>

Definition at line 38 of file kanimatedbutton.h.


Constructor & Destructor Documentation

KAnimatedButton::KAnimatedButton ( QWidget *  parent = 0L  )  [explicit]

Construct an animated tool button.

Parameters:
parent The parent widget

Definition at line 59 of file kanimatedbutton.cpp.

KAnimatedButton::~KAnimatedButton (  )  [virtual]

Destructor.

Definition at line 65 of file kanimatedbutton.cpp.


Member Function Documentation

void KAnimatedButton::clicked (  )  [signal]

int KAnimatedButton::iconDimensions (  )  const

Returns the current maximum dimension (width or length) for an icon.

Definition at line 198 of file kanimatedbutton.cpp.

QString KAnimatedButton::icons (  )  const

Returns the current icons.

void KAnimatedButton::setIcons ( const 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

Definition at line 97 of file kanimatedbutton.cpp.

void KAnimatedButton::slotTimerUpdate (  )  [protected, slot]

Definition at line 112 of file kanimatedbutton.cpp.

void KAnimatedButton::start (  )  [slot]

Starts the animation from frame 1.

Definition at line 74 of file kanimatedbutton.cpp.

void KAnimatedButton::stop (  )  [slot]

Stops the animation.

This will also reset the widget to frame 1.

Definition at line 84 of file kanimatedbutton.cpp.

void KAnimatedButton::updateIcons (  )  [slot]

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.

Definition at line 161 of file kanimatedbutton.cpp.


Property Documentation

QString KAnimatedButton::icons [read, write]

Definition at line 41 of file kanimatedbutton.h.


The documentation for this class was generated from the following files:
  • kanimatedbutton.h
  • kanimatedbutton.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal