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

KDEUI

Public Slots | Signals | Public Member Functions | Protected Slots | Properties | List of all members
KAnimatedButton Class Reference

#include <kanimatedbutton.h>

Inheritance diagram for KAnimatedButton:
Inheritance graph
[legend]

Public Slots

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

Signals

void clicked ()
 

Public Member Functions

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

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 granr.nosp@m.oth@.nosp@m.kde.o.nosp@m.rg

Definition at line 38 of file kanimatedbutton.h.

Constructor & Destructor Documentation

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

Construct an animated tool button.

Parameters
parentThe 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 199 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
iconsThe name of the icons to use for the animation

Definition at line 97 of file kanimatedbutton.cpp.

void KAnimatedButton::slotTimerUpdate ( )
protectedslot

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
readwrite

Definition at line 41 of file kanimatedbutton.h.


The documentation for this class was generated from the following files:
  • kanimatedbutton.h
  • kanimatedbutton.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal