IntroSprite Class Reference

The sprite to display the introduction pieces and their animation. More...

#include <introsprite.h>

Inheritance diagram for IntroSprite:

Inheritance graph
[legend]
Collaboration diagram for IntroSprite:

Collaboration graph
[legend]
List of all members.

Public Types

enum  MovementState {
  Idle, IntroDelay, IntroLinear1, IntroCircle,
  IntroLinear2, LinearMove
}

Public Member Functions

 IntroSprite (QString id, ThemeManager *theme, int advancePeriod, int no, QGraphicsScene *scence)
 Constructor for the sprite.
 ~IntroSprite ()
 Destructor.
void startIntro (QPointF start, QPointF end, double radius, double duration, double delay)
 Start an intro move.
void startLinear (QPointF start, QPointF end, double duration)
 Start a linear movement from start to end with the given duration.
void startLinear (QPointF end, double duration)
 Start a linear movement from the current position to end with the given duration.
virtual void advance (int phase)
 Standard QGI advance function.
virtual int type () const
 Retrieve the type of QGI.
int number ()
 Retrieve the sprite numbers (which introsprite e.g.
virtual void changeTheme ()
 Main theme notification method.

Detailed Description

The sprite to display the introduction pieces and their animation.

Definition at line 35 of file introsprite.h.


Member Enumeration Documentation

enum IntroSprite::MovementState
 

Enumerator:
Idle 
IntroDelay 
IntroLinear1 
IntroCircle 
IntroLinear2 
LinearMove 

Definition at line 79 of file introsprite.h.


Constructor & Destructor Documentation

IntroSprite::IntroSprite QString  id,
ThemeManager theme,
int  advancePeriod,
int  no,
QGraphicsScene *  scence
 

Constructor for the sprite.

Parameters:
id The theme id
theme The theme manager
advancePeriod The canvas advance period
no The sprite number [0..41]
scence The scene

Definition at line 34 of file introsprite.cpp.

References Idle, PixmapSprite::mAdvancePeriod, PixmapSprite::mNo, and ThemeManager::updateTheme().

Here is the call graph for this function:

IntroSprite::~IntroSprite  ) 
 

Destructor.

Definition at line 48 of file introsprite.cpp.


Member Function Documentation

void IntroSprite::advance int  phase  )  [virtual]
 

Standard QGI advance function.

Parameters:
phase The advance phase

Reimplemented from PixmapSprite.

Definition at line 101 of file introsprite.cpp.

References Themable::getScale(), Idle, IntroCircle, IntroDelay, IntroLinear1, IntroLinear2, LinearMove, and PixmapSprite::mAdvancePeriod.

Here is the call graph for this function:

void IntroSprite::changeTheme  )  [virtual]
 

Main theme notification method.

Is called for any theme changes. It must be implemented so that the item redraws correctly when the theme changed.

Reimplemented from PixmapSprite.

Definition at line 54 of file introsprite.cpp.

References PixmapSprite::changeTheme().

Here is the call graph for this function:

int IntroSprite::number  )  [inline]
 

Retrieve the sprite numbers (which introsprite e.g.

0-42)

Returns:
The sprite numbers.

Reimplemented from PixmapSprite.

Definition at line 94 of file introsprite.h.

References PixmapSprite::mNo.

Referenced by DisplayIntro::advance().

void IntroSprite::startIntro QPointF  start,
QPointF  end,
double  radius,
double  duration,
double  delay
 

Start an intro move.

The first half of the move is is on a straight line from start to end. The second part of the move is a circle with the given radius and the final part of the move is again a straight line to the end location. The sprite movement is started delayed with the given delay factor.

Parameters:
start The start point [rel. coord]
end The end point [rel. coord]
radius The radius of the circle [rel. coord]
duration The duration of the move [ms]
delay The initial movement delay [ms]

Definition at line 61 of file introsprite.cpp.

References Themable::getScale(), and IntroDelay.

Referenced by DisplayIntro::advance().

Here is the call graph for this function:

void IntroSprite::startLinear QPointF  end,
double  duration
 

Start a linear movement from the current position to end with the given duration.

Parameters:
end The end point [rel. coord]
duration The duration of the move [ms]

Definition at line 89 of file introsprite.cpp.

References Themable::getScale(), and LinearMove.

Here is the call graph for this function:

void IntroSprite::startLinear QPointF  start,
QPointF  end,
double  duration
 

Start a linear movement from start to end with the given duration.

Parameters:
start The start point [rel. coord]
end The end point [rel. coord]
duration The duration of the move [ms]

Definition at line 76 of file introsprite.cpp.

References Themable::getScale(), and LinearMove.

Here is the call graph for this function:

virtual int IntroSprite::type  )  const [inline, virtual]
 

Retrieve the type of QGI.

This item is UserType+1

Returns:
The type of item.

Reimplemented from PixmapSprite.

Definition at line 89 of file introsprite.h.


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 10:56:43 2007 for KWin4 by  doxygen 1.4.6