KardPile Class Reference
#include <kardpile.h>
List of all members.
Detailed Description
This displays a pile of cards.
- Author:
- John Schneiderman
Constructor & Destructor Documentation
KardPile::KardPile |
( |
QWidget * |
parent = 0 |
) |
|
General constructor for our widget.
- Parameters:
-
| parent | is parent of the KardPile widget. |
KardPile::KardPile |
( |
CardPile |
pile, |
|
|
QWidget * |
parent = 0 | |
|
) |
| | |
General constructor for our widget.
- Parameters:
-
| pile | is the pile to display |
| parent | is parent of the KardPile widget. |
General destructor for our widget.
Member Function Documentation
void KardPile::addCardToBottom |
( |
const Card & |
card |
) |
|
Adds a card to the bottom of the card pile.
- Parameters:
-
| card | is the card to be inserted into the bottom of the pile. |
const CardPile & KardPile::cardPile |
( |
|
) |
const |
This is an accessor for our card pile.
- Returns:
- our card pile.
This clears the kard pile.
void KardPile::dragEnterEvent |
( |
QDragEnterEvent * |
event |
) |
[protected, virtual] |
These are the types of objects we can accept for dropping.
- Parameters:
-
| event | is the generating event. |
void KardPile::dropEvent |
( |
QDropEvent * |
event |
) |
[protected, virtual] |
This handles when an object is dropped into us.
- Parameters:
-
| event | is the generating event. |
bool KardPile::isTopCardUp |
( |
|
) |
const |
Tells us if our widget is displaying the top card face up.
- Returns:
- true if we are displaying the top card face up, false if we are not.
void KardPile::kardSelected |
( |
Kard & |
kard |
) |
[signal] |
This is a signal that notifies a slot that a card has been selected.
- Parameters:
-
| kard | is the kard that was selected. |
void KardPile::paintEvent |
( |
QPaintEvent * |
event |
) |
[protected, virtual] |
This draws our widget.
- Parameters:
-
| event | is the event that caused our widget to be drawn. |
void KardPile::removeCard |
( |
|
) |
|
This will remove the top card from the card pile.
void KardPile::selectTopCard |
( |
|
) |
|
This selects the top card.
void KardPile::setCardBackImage |
( |
const QString & |
backImage |
) |
|
Sets the image to use for the back of the cards.
- Parameters:
-
| backImage | is the file-name for the image on the back of the kards. |
void KardPile::setCardFrontImagePath |
( |
const QString & |
imagePath |
) |
|
Sets the path to the directory that contains the images for the front of our kards.
- Parameters:
-
| imagePath | is the path to the images. |
void KardPile::setCardPile |
( |
const CardPile & |
cardPile |
) |
|
This will set our displaying card pile.
- Parameters:
-
| cardPile | is the pile of cards to set our widget to. |
void KardPile::setSelected |
( |
const Card & |
card |
) |
|
This will select a specific card in our kard pile.
- Parameters:
-
| card | is the card we want to select. |
- Exceptions:
-
void KardPile::setTopCardUp |
( |
bool |
topUp |
) |
|
Sets our widget to display the top card face up or not.
- Parameters:
-
| topUp | true if we want to have our top card face up, false elsewise. |
QSize KardPile::sizeHint |
( |
|
) |
const |
Provides the size hint for our widget.
- Returns:
- the preferred size of our widget.
Property Documentation
bool KardPile::m_topCardUp [read, write] |
- Parameters:
-
| m_topCardUp | is true if we are displaying the front of the top card and false if ware displaying the back of the card. |
The documentation for this class was generated from the following files:
- gamebase/widgets/kardpile.h
- gamebase/widgets/kardpile.cpp