#include <view_zone_logic.h>
|
| | ZoneViewZoneLogic (Player *_player, CardZoneLogic *_origZone, int _numberCards, bool _revealZone, bool _writeableRevealZone, bool _isReversed, QObject *parent=nullptr) |
| bool | prepareAddCard (int x) |
| void | removeCard (int position, bool toNewZone) |
| void | updateCardIds (CardAction action) |
| int | getNumberCards () const |
| bool | getRevealZone () const |
| bool | getWriteableRevealZone () const |
| void | setWriteableRevealZone (bool _writeableRevealZone) |
| bool | getIsReversed () const |
| CardZoneLogic * | getOriginalZone () const |
| | CardZoneLogic (Player *_player, const QString &_name, bool _hasCardAttr, bool _isShufflable, bool _contentsKnown, QObject *parent=nullptr) |
| void | addCard (CardItem *card, bool reorganize, int x, int y=-1) |
| CardItem * | getCard (int cardId) |
| void | removeCard (CardItem *card) |
| virtual CardItem * | takeCard (int position, int cardId, bool canResize=true) |
| void | rawInsertCard (CardItem *card, int index) |
| const CardList & | getCards () const |
| void | sortCards (const QList< CardList::SortOption > &options) |
| QString | getName () const |
| QString | getTranslatedName (bool theirOwn, GrammaticalCase gc) const |
| Player * | getPlayer () const |
| bool | contentsKnown () const |
| QList< ZoneViewZone * > & | getViews () |
| void | setAlwaysRevealTopCard (bool _alwaysRevealTopCard) |
| bool | getAlwaysRevealTopCard () const |
| bool | getHasCardAttr () const |
| bool | getIsShufflable () const |
| void | clearContents () |
◆ CardAction
| Enumerator |
|---|
| INITIALIZE | |
| ADD_CARD | |
| REMOVE_CARD | |
◆ ZoneViewZoneLogic()
| ZoneViewZoneLogic::ZoneViewZoneLogic |
( |
Player * | _player, |
|
|
CardZoneLogic * | _origZone, |
|
|
int | _numberCards, |
|
|
bool | _revealZone, |
|
|
bool | _writeableRevealZone, |
|
|
bool | _isReversed, |
|
|
QObject * | parent = nullptr ) |
- Parameters
-
| _player | the player that the cards are revealed to. |
| _origZone | the zone the cards were revealed from. |
| _revealZone | if false, the cards will be face down. |
| _writeableRevealZone | whether the player can interact with the revealed cards. |
◆ addCardImpl()
| void ZoneViewZoneLogic::addCardImpl |
( |
CardItem * | card, |
|
|
int | x, |
|
|
int | y ) |
|
overrideprotectedvirtual |
◆ addToViews
| void ZoneViewZoneLogic::addToViews |
( |
| ) |
|
|
signal |
◆ closeView
| void ZoneViewZoneLogic::closeView |
( |
| ) |
|
|
signal |
◆ getIsReversed()
| bool ZoneViewZoneLogic::getIsReversed |
( |
| ) |
const |
|
inline |
◆ getNumberCards()
| int ZoneViewZoneLogic::getNumberCards |
( |
| ) |
const |
|
inline |
◆ getOriginalZone()
◆ getRevealZone()
| bool ZoneViewZoneLogic::getRevealZone |
( |
| ) |
const |
|
inline |
◆ getWriteableRevealZone()
| bool ZoneViewZoneLogic::getWriteableRevealZone |
( |
| ) |
const |
|
inline |
◆ prepareAddCard()
| bool ZoneViewZoneLogic::prepareAddCard |
( |
int | x | ) |
|
Checks if inserting a card at the given position requires an actual new card to be created and added to the view. Also does any cardId updates that would be required if a card is inserted in that position.
Note that this method can end up modifying the cardIds despite returning false. (for example, if the card is inserted into a hidden portion of the deck while the view is reversed)
Make sure to call this method once before calling addCard(), so that you skip creating a new CardItem and calling addCard() if it's not required.
- Parameters
-
| x | The position to insert the card at. |
- Returns
- Whether to proceed with calling addCard.
◆ removeCard()
| void ZoneViewZoneLogic::removeCard |
( |
int | position, |
|
|
bool | toNewZone ) |
◆ removeFromViews
| void ZoneViewZoneLogic::removeFromViews |
( |
| ) |
|
|
signal |
◆ setWriteableRevealZone()
| void ZoneViewZoneLogic::setWriteableRevealZone |
( |
bool | _writeableRevealZone | ) |
|
◆ updateCardIds()
| void ZoneViewZoneLogic::updateCardIds |
( |
CardAction | action | ) |
|
◆ isReversed
| bool ZoneViewZoneLogic::isReversed |
|
private |
◆ numberCards
| int ZoneViewZoneLogic::numberCards |
|
private |
◆ origZone
◆ revealZone
| bool ZoneViewZoneLogic::revealZone |
|
private |
◆ writeableRevealZone
| bool ZoneViewZoneLogic::writeableRevealZone |
|
private |
The documentation for this class was generated from the following files: