KardPlayer Class Reference
#include <kardplayer.h>
List of all members.
Detailed Description
This is the graphical representation of a player.
- Author:
- John Schneiderman
Constructor & Destructor Documentation
KardPlayer::KardPlayer |
( |
QWidget * |
parent = 0 |
) |
|
KardPlayer constructor
- Parameters:
-
| parent | is the parent window. |
Member Function Documentation
const QString & KardPlayer::caption |
( |
|
) |
const |
This is the accessor to what the player "said".
void KardPlayer::clear |
( |
|
) |
|
This clears what the player has said.
void KardPlayer::paintEvent |
( |
QPaintEvent * |
event |
) |
[protected, virtual] |
This draws the players image.
- Parameters:
-
| event | is the generating event. |
QPixmap KardPlayer::playerImage |
( |
|
) |
const |
This is the accessor for the current player's image.
void KardPlayer::setCaption |
( |
const QString & |
caption, |
|
|
int |
length | |
|
) |
| | |
This causes the player to "say" something.
- Parameters:
-
| caption | is what the player says. |
| length | is how many seconds to display the message |
- Note:
- if we're still showing a previous caption, we'll combine the messages.
void KardPlayer::setCaption |
( |
const QString & |
caption |
) |
|
This causes the player to "say" something.
- Parameters:
-
| caption | is what the player says. |
- Note:
- if we're still showing a previous caption, we'll combine the messages.
void KardPlayer::setDealer |
( |
bool |
dealer |
) |
|
Updates the icon notification for the player dealer status.
- Parameters:
-
| dealer | is true if we are the dealer, false elsewise. |
void KardPlayer::setPlayerImage |
( |
const QString & |
imageFilename |
) |
|
This sets the image of the player.
- Parameters:
-
| imageFilename | is the name of the file for the player. |
- Note:
- The image file-name can be either a built in image or a file-name to an image.
- Exceptions:
-
void KardPlayer::setPlayerImage |
( |
const QPixmap & |
playerImage |
) |
|
This sets the image of the player.
- Parameters:
-
| playerImage | is what to set the player's image to. |
- Exceptions:
-
Updates the icon notification for the player level status.
- Parameters:
-
| level | is the level the player has attained. |
- Exceptions:
-
void KardPlayer::setTurn |
( |
bool |
turn |
) |
|
Updates the icon notification for the player turn status.
- Parameters:
-
| turn | is true if it is the player's turn, false elsewise. |
QSize KardPlayer::sizeHint |
( |
|
) |
const |
This gives the preferred size of the player's image.
- Returns:
- the size of the player's image.
void KardPlayer::timerEvent |
( |
QTimerEvent * |
event |
) |
[protected, virtual] |
This will erase the caption.
- Parameters:
-
| event | is the timer event to clear our caption. |
Property Documentation
QString KardPlayer::m_caption [read, write] |
- Parameters:
-
| m_caption | is the caption for the player. |
QPixmap KardPlayer::m_playerImage [read, write] |
- Parameters:
-
| m_playerImage | is the players image. |
The documentation for this class was generated from the following files:
- gamebase/widgets/kardplayer.h
- gamebase/widgets/kardplayer.cpp