#include <touchinputcomponent.h>
Public Types | |
enum | TouchName { UNKNOWN, ONE } |
Public Member Functions | |
Q_INVOKABLE | TouchInputComponent (QObject *parent=0) |
virtual QString | category () const |
Q_INVOKABLE bool | isActionHeld () |
Q_INVOKABLE bool | isActionStarted () |
Q_INVOKABLE bool | isActionStopped () |
virtual void | initialize () |
virtual void | start () |
virtual void | update (int elapsedMilliseconds) |
virtual void | stop () |
TouchName | touchCode () const |
void | setTouchCode (TouchName newTouchCode) |
Properties | |
TouchName | touchCode |
Definition at line 36 of file touchinputcomponent.h.
Definition at line 45 of file touchinputcomponent.h.
TouchInputComponent::TouchInputComponent | ( | QObject * | parent = 0 |
) |
Definition at line 34 of file touchinputcomponent.cpp.
QString TouchInputComponent::category | ( | ) | const [virtual] |
Return the category of the component. Meta-data used for filtering and sorting components
Reimplemented from GluonEngine::Component.
Definition at line 43 of file touchinputcomponent.cpp.
void TouchInputComponent::initialize | ( | ) | [virtual] |
The initialize function is called whenever an initialized object is needed. This includes scene changes.
Reimplemented from GluonEngine::Component.
Definition at line 48 of file touchinputcomponent.cpp.
bool TouchInputComponent::isActionHeld | ( | ) |
Definition at line 110 of file touchinputcomponent.cpp.
bool TouchInputComponent::isActionStarted | ( | ) |
Definition at line 105 of file touchinputcomponent.cpp.
bool TouchInputComponent::isActionStopped | ( | ) |
Definition at line 115 of file touchinputcomponent.cpp.
void TouchInputComponent::setTouchCode | ( | TouchInputComponent::TouchName | newTouchCode | ) |
Definition at line 126 of file touchinputcomponent.cpp.
void TouchInputComponent::start | ( | ) | [virtual] |
The start function is run once after each scene change, immediately before the first update
Reimplemented from GluonEngine::Component.
Definition at line 54 of file touchinputcomponent.cpp.
void TouchInputComponent::stop | ( | ) | [virtual] |
The stop function is run once when the gameloop is stopped. Use it for removing temporary data between runs. Reimplement this function if you have something that needs cleaning up between runs.
Reimplemented from GluonEngine::Component.
Definition at line 93 of file touchinputcomponent.cpp.
TouchName GluonEngine::TouchInputComponent::touchCode | ( | ) | const |
void TouchInputComponent::update | ( | int | elapsedMilliseconds | ) | [virtual] |
The update function is run each time the game logic needs to be updated. Implement this function in inherited classed to allow for updates along with the rest of the GameObject hierarchy. Note that this is only for updating the game logic - any drawing functionality should be put into the draw function.
elapsedMilliseconds | The amount of time in milliseconds which has passed since the last update
|
Reimplemented from GluonEngine::Component.
Definition at line 66 of file touchinputcomponent.cpp.
TouchInputComponent::TouchName TouchInputComponent::touchCode [read, write] |
Definition at line 38 of file touchinputcomponent.h.