• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

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

#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 ()
 

Protected Member Functions

virtual void drawContents (TQPainter *p)
 
virtual void leaveEvent (TQEvent *e)
 
virtual void enterEvent (TQEvent *e)
 
virtual void hideEvent (TQHideEvent *e)
 
virtual void showEvent (TQShowEvent *e)
 
virtual void mousePressEvent (TQMouseEvent *e)
 
virtual void mouseReleaseEvent (TQMouseEvent *e)
 
virtual void virtual_hook (int id, void *data)
 

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:

KAnimWidget *anim = new KAnimWidget("kde", 0, this);
anim->start();
KAnimWidget
Standard "About KDE" dialog box.
Definition: kanimwidget.h:56
KAnimWidget::start
void start()
Starts the animation from frame 1.
Definition: kanimwidget.cpp:65
KAnimWidget::KAnimWidget
KAnimWidget(const TQString &icons, int size=0, TQWidget *parent=0L, const char *name=0L)
This is the most common constructor.
Definition: kanimwidget.cpp:41

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.

Author
Kurt Granroth granr.nosp@m.oth@.nosp@m.kde.o.nosp@m.rg

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
iconsThe icons name (e.g., "kde") to use for the animation
sizeThe 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.
parentThe standard parent
nameThe standard internal name

Definition at line 41 of file kanimwidget.cpp.

◆ ~KAnimWidget()

KAnimWidget::~KAnimWidget ( )
virtual

Destructor.

Definition at line 58 of file kanimwidget.cpp.

Member Function Documentation

◆ drawContents()

void KAnimWidget::drawContents ( TQPainter *  p)
protectedvirtual

Definition at line 166 of file kanimwidget.cpp.

◆ enterEvent()

void KAnimWidget::enterEvent ( TQEvent *  e)
protectedvirtual

Definition at line 122 of file kanimwidget.cpp.

◆ hideEvent()

void KAnimWidget::hideEvent ( TQHideEvent *  e)
protectedvirtual

Definition at line 117 of file kanimwidget.cpp.

◆ icons()

TQString KAnimWidget::icons ( ) const

Returns the current icons since 3.4.

Definition at line 96 of file kanimwidget.cpp.

◆ leaveEvent()

void KAnimWidget::leaveEvent ( TQEvent *  e)
protectedvirtual

Definition at line 129 of file kanimwidget.cpp.

◆ mousePressEvent()

void KAnimWidget::mousePressEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 136 of file kanimwidget.cpp.

◆ mouseReleaseEvent()

void KAnimWidget::mouseReleaseEvent ( TQMouseEvent *  e)
protectedvirtual

Definition at line 141 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
iconsThe 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
sizeThe size of the icons

Definition at line 78 of file kanimwidget.cpp.

◆ showEvent()

void KAnimWidget::showEvent ( TQShowEvent *  e)
protectedvirtual

Definition at line 107 of file kanimwidget.cpp.

◆ size()

int KAnimWidget::size ( ) const

Returns the current size.

Since
3.4

Definition at line 101 of file kanimwidget.cpp.

◆ slotTimerUpdate

void KAnimWidget::slotTimerUpdate ( )
protectedslot

Definition at line 150 of file kanimwidget.cpp.

◆ start

void KAnimWidget::start ( )
slot

Starts the animation from frame 1.

Definition at line 65 of file kanimwidget.cpp.

◆ stop

void KAnimWidget::stop ( )
slot

Stops the animation.

This will also reset the widget to frame 1.

Definition at line 71 of file kanimwidget.cpp.

◆ updateIcons

void KAnimWidget::updateIcons ( )
protectedslot

Definition at line 178 of file kanimwidget.cpp.

◆ virtual_hook()

void KAnimWidget::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 207 of file kanimwidget.cpp.


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

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.