Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

ThemeAnimationItem Class Reference
[QtBaseModule]

The ThemeAnimationItem class represents a pixmap-based animation in a ThemedView. More...

    #include <ThemeAnimationItem>

Inherits ThemePixmapItem.

Inherited by ThemeLevelItem.

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The ThemeAnimationItem class represents a pixmap-based animation in a ThemedView.

The ThemeAnimationItem class implements the anim element from the theme XML.

It gets its frames from a single image which has frames at predefined intervals side-by-side. You can monitor and control the playing of the animation using the frame(), setFrame(), stop() and start() functions.

Normally you do not want to call this item's functions directly, but rather specify the relevant attributes and data for this item in the themed view XML.

See also anim element.


Member Function Documentation

ThemeAnimationItem::ThemeAnimationItem ( ThemeItem * parent, ThemedView * view, const ThemeAttributes & atts )

Constructs a ThemeAnimationitem parent, view and atts are passed to the base class constructor.

ThemeAnimationItem::~ThemeAnimationItem ()

Destroys a ThemeAnimationItem

void ThemeAnimationItem::advance ()   [protected]

Advances the animation by one frame. If the current frame is the last frame in the animation but a loop point has been set, the animation jumps to that frame.

int ThemeAnimationItem::frame () const

Returns the index of the current frame. Returns 0 if frameCount() returns 0.

See also setFrame().

int ThemeAnimationItem::frameCount () const

Returns the total number of frames in this animation.

void ThemeAnimationItem::setFrame ( int frame )   [virtual]

Sets the current frame to frame. If the animation is currently playing, the animation will jump to the frame at frame. Otherwise, the animation will begin playing from the frame at frame.

See also frame().

void ThemeAnimationItem::start ()   [virtual]

Starts the animation. If a call to setFrame has been made, the animation will start from that position, otherwise starts playing from frame 0.

void ThemeAnimationItem::stop ()   [virtual]

Stops the animation. The current frame is not reset, so calling play will continue from the frame the animation was stopped at.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3