GluonEngine::TextRendererComponent Class Reference

#include <textrenderercomponent.h>

Inheritance diagram for GluonEngine::TextRendererComponent:
GluonEngine::Component GluonCore::GluonObject QObject

List of all members.

Classes

class  TextRendererComponentPrivate

Public Slots

virtual void setText (const QString &text)
virtual void setFont (const QFont &font)
virtual void setColor (const QColor &color)

Public Member Functions

Q_INVOKABLE TextRendererComponent (QObject *parent=0)
 ~TextRendererComponent ()
virtual QString category () const
virtual QString text () const
virtual QFont font () const
virtual QColor color () const
virtual void initialize ()
virtual void start ()
virtual void draw (int timeLapse)
virtual void cleanup ()

Properties

QString text
QFont font
QColor color

Detailed Description

Definition at line 32 of file textrenderercomponent.h.


Constructor & Destructor Documentation

TextRendererComponent::TextRendererComponent ( QObject parent = 0  ) 

Definition at line 48 of file textrenderercomponent.cpp.

TextRendererComponent::~TextRendererComponent (  ) 

Definition at line 54 of file textrenderercomponent.cpp.


Member Function Documentation

QString TextRendererComponent::category (  )  const [virtual]

Return the category of the component. Meta-data used for filtering and sorting components

Reimplemented from GluonEngine::Component.

Definition at line 59 of file textrenderercomponent.cpp.

void TextRendererComponent::cleanup (  )  [virtual]

The cleanup function is called whenever an object is no longer needed. This happens mostly during scene changes.

Reimplemented from GluonEngine::Component.

Definition at line 116 of file textrenderercomponent.cpp.

virtual QColor GluonEngine::TextRendererComponent::color (  )  const [virtual]
void TextRendererComponent::draw ( int  timeLapse  )  [virtual]

The draw function is run every time the engine requests a redraw of the screen. Avoid putting any game logic in this function. The optional timeLapse depends on gameloop being used. By default Gluon uses a gameloop which runs update a fixed number of times per second, while draw is called as often as it can be. The timeLapse parameter then tells you how many milliseconds have passed since the last time update was run. This allows you to extrapolate draw positions of items and thus create a potentially smoother gaming experience.

Parameters:
timeLapse The number of milliseconds passed since the last update
See also:
Game::runGame, update

Reimplemented from GluonEngine::Component.

Definition at line 110 of file textrenderercomponent.cpp.

virtual QFont GluonEngine::TextRendererComponent::font (  )  const [virtual]
void TextRendererComponent::initialize (  )  [virtual]

The initialize function is called whenever an initialized object is needed. This includes scene changes.

Reimplemented from GluonEngine::Component.

Definition at line 100 of file textrenderercomponent.cpp.

void TextRendererComponent::setColor ( const QColor &  color  )  [virtual, slot]

Definition at line 93 of file textrenderercomponent.cpp.

void TextRendererComponent::setFont ( const QFont &  font  )  [virtual, slot]

Definition at line 81 of file textrenderercomponent.cpp.

void TextRendererComponent::setText ( const QString &  text  )  [virtual, slot]

Definition at line 69 of file textrenderercomponent.cpp.

void TextRendererComponent::start (  )  [virtual]

The start function is run once after each scene change, immediately before the first update

See also:
Game::setCurrentScene, update

Reimplemented from GluonEngine::Component.

Definition at line 105 of file textrenderercomponent.cpp.

virtual QString GluonEngine::TextRendererComponent::text (  )  const [virtual]

Property Documentation

QColor TextRendererComponent::color [read, write]

Definition at line 38 of file textrenderercomponent.h.

QFont TextRendererComponent::font [read, write]

Definition at line 37 of file textrenderercomponent.h.

QString TextRendererComponent::text [read, write]

Definition at line 36 of file textrenderercomponent.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:43 2010 for Gluon by  doxygen 1.6.3