#include <mouseinputcomponent.h>
Classes | |
class | MouseInputComponentPrivate |
Public Types | |
enum | MouseButton { MOUSE_BUTTON_UNKNOWN, MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_MIDDLE, MOUSE_BUTTON_FOUR, MOUSE_BUTTON_FIVE, MOUSE_BUTTON_SIX, MOUSE_BUTTON_SEVEN, MOUSE_BUTTON_EIGHT } |
Public Member Functions | |
Q_INVOKABLE | MouseInputComponent (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 () |
MouseButton | mouseButton () const |
void | setMouseButton (MouseButton button) |
virtual Q_INVOKABLE int | xAxis () |
virtual Q_INVOKABLE int | yAxis () |
virtual Q_INVOKABLE int | zAxis () |
virtual Q_INVOKABLE int | relativeXAxis () |
virtual Q_INVOKABLE int | relativeYAxis () |
virtual Q_INVOKABLE int | relativeZAxis () |
Properties | |
MouseButton | mouseButton |
Definition at line 36 of file mouseinputcomponent.h.
MOUSE_BUTTON_UNKNOWN | |
MOUSE_BUTTON_LEFT | |
MOUSE_BUTTON_RIGHT | |
MOUSE_BUTTON_MIDDLE | |
MOUSE_BUTTON_FOUR | |
MOUSE_BUTTON_FIVE | |
MOUSE_BUTTON_SIX | |
MOUSE_BUTTON_SEVEN | |
MOUSE_BUTTON_EIGHT |
Definition at line 45 of file mouseinputcomponent.h.
MouseInputComponent::MouseInputComponent | ( | QObject * | parent = 0 |
) |
Definition at line 53 of file mouseinputcomponent.cpp.
QString MouseInputComponent::category | ( | ) | const [virtual] |
Return the category of the component. Meta-data used for filtering and sorting components
Reimplemented from GluonEngine::Component.
Definition at line 67 of file mouseinputcomponent.cpp.
void MouseInputComponent::initialize | ( | ) | [virtual] |
The initialize function is called whenever an initialized object is needed. This includes scene changes.
Reimplemented from GluonEngine::Component.
Definition at line 72 of file mouseinputcomponent.cpp.
bool MouseInputComponent::isActionHeld | ( | ) |
Definition at line 144 of file mouseinputcomponent.cpp.
bool MouseInputComponent::isActionStarted | ( | ) |
Definition at line 138 of file mouseinputcomponent.cpp.
bool MouseInputComponent::isActionStopped | ( | ) |
Definition at line 150 of file mouseinputcomponent.cpp.
MouseButton GluonEngine::MouseInputComponent::mouseButton | ( | ) | const |
int MouseInputComponent::relativeXAxis | ( | ) | [virtual] |
Definition at line 165 of file mouseinputcomponent.cpp.
int MouseInputComponent::relativeYAxis | ( | ) | [virtual] |
Definition at line 170 of file mouseinputcomponent.cpp.
int MouseInputComponent::relativeZAxis | ( | ) | [virtual] |
Definition at line 175 of file mouseinputcomponent.cpp.
void MouseInputComponent::setMouseButton | ( | MouseInputComponent::MouseButton | button | ) |
Definition at line 160 of file mouseinputcomponent.cpp.
void MouseInputComponent::start | ( | ) | [virtual] |
The start function is run once after each scene change, immediately before the first update
Reimplemented from GluonEngine::Component.
Definition at line 81 of file mouseinputcomponent.cpp.
void MouseInputComponent::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 125 of file mouseinputcomponent.cpp.
void MouseInputComponent::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 94 of file mouseinputcomponent.cpp.
int MouseInputComponent::xAxis | ( | ) | [virtual] |
Definition at line 180 of file mouseinputcomponent.cpp.
int MouseInputComponent::yAxis | ( | ) | [virtual] |
Definition at line 185 of file mouseinputcomponent.cpp.
int MouseInputComponent::zAxis | ( | ) | [virtual] |
Definition at line 190 of file mouseinputcomponent.cpp.
MouseInputComponent::MouseButton MouseInputComponent::mouseButton [read, write] |
Definition at line 38 of file mouseinputcomponent.h.