AbstractInput Class Reference

Abstract input device for the game. More...

#include <abstractinput.h>

Inheritance diagram for AbstractInput:

Inheritance graph
[legend]
List of all members.

Signals

void signalPlayerInput (int id, int playerNumber, int cardNumber)
 Signals the availability of player input.

Public Member Functions

 AbstractInput (QObject *parent)
 Constructor for the input.
virtual void setInputAllowed (bool allowed)
 Allow or disallow input with this device.
virtual bool inputAllowed ()
 Retrieve whether input is allowed or not.
virtual void setId (int id)
 Set the player id number to whom this input belongs to.
virtual InputDevice::InputDeviceType type ()=0
 Retrieve the type of device.

Protected Attributes

int mId
 Player id to whom this input belongs.
bool mInputAllowed
 Is input allowed ?

Detailed Description

Abstract input device for the game.

Definition at line 41 of file abstractinput.h.


Constructor & Destructor Documentation

AbstractInput::AbstractInput QObject *  parent  ) 
 

Constructor for the input.

Parameters:
parent The parent object

Definition at line 31 of file abstractinput.cpp.

References mId, and mInputAllowed.


Member Function Documentation

bool AbstractInput::inputAllowed  )  [virtual]
 

Retrieve whether input is allowed or not.

Returns:
True if input from this device is allowed.

Definition at line 54 of file abstractinput.cpp.

References mInputAllowed.

Referenced by Player::setInput().

void AbstractInput::setId int  id  )  [virtual]
 

Set the player id number to whom this input belongs to.

Parameters:
id The id number

Definition at line 40 of file abstractinput.cpp.

References mId.

Referenced by Player::setInput().

void AbstractInput::setInputAllowed bool  allowed  )  [virtual]
 

Allow or disallow input with this device.

Parameters:
allowed True if input is allowed

Reimplemented in AiInput.

Definition at line 47 of file abstractinput.cpp.

References mInputAllowed.

Referenced by Player::setInput(), AiInput::setInputAllowed(), Player::startTurn(), and Player::stopTurn().

void AbstractInput::signalPlayerInput int  id,
int  playerNumber,
int  cardNumber
[signal]
 

Signals the availability of player input.

Parameters:
id The input device id
playerNumber The player number [0-1]
cardNumber The card number [0-7]

Referenced by MouseInput::mousePress().

virtual InputDevice::InputDeviceType AbstractInput::type  )  [pure virtual]
 

Retrieve the type of device.

Returns:
The decice type.

Implemented in AiInput, and MouseInput.

Referenced by DisplayTwo::updatePlayer().


Member Data Documentation

int AbstractInput::mId [protected]
 

Player id to whom this input belongs.

Definition at line 85 of file abstractinput.h.

Referenced by AbstractInput(), AiInput::aiTurn(), MouseInput::mousePress(), and setId().

bool AbstractInput::mInputAllowed [protected]
 

Is input allowed ?

Definition at line 87 of file abstractinput.h.

Referenced by AbstractInput(), AiInput::aiTurn(), inputAllowed(), MouseInput::mousePress(), and setInputAllowed().


The documentation for this class was generated from the following files:
Generated on Tue May 1 09:34:40 2007 for LSkat by  doxygen 1.4.6