Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
DeckViewContainer Class Reference

#include <deck_view_container.h>

Inheritance diagram for DeckViewContainer:
[legend]
Collaboration diagram for DeckViewContainer:
[legend]

Public Slots

void loadDeckFromFile (const QString &filePath)
void loadDeckFromDeckList (const DeckList &deck)

Signals

void newCardAdded (AbstractCardItem *card)
void notIdle ()

Public Member Functions

 DeckViewContainer (int _playerId, TabGame *parent)
void retranslateUi ()
void setReadyStart (bool ready)
void readyAndUpdate ()
void setSideboardLocked (bool locked)
void setDeck (const DeckList &deck)
void setVisualDeckStorageExists (bool exists)
void advancePlaymatRotation ()
void resolveAndSendPlaymat ()

Private Slots

void switchToDeckSelectView ()
void switchToDeckLoadedView ()
void loadLocalDeck ()
void loadRemoteDeck ()
void loadFromClipboard ()
void loadFromWebsite ()
void unloadDeck ()
void readyStart ()
void forceStart ()
void deckSelectFinished (const Response &r)
void sideboardPlanChanged ()
void sideboardLockButtonClicked ()
void updateSideboardLockButtonText ()
void refreshShortcuts ()
void onPlaymatSettingsChanged ()

Private Member Functions

void tryCreateVisualDeckStorageWidget ()
void sendReadyStartCommand (bool ready)
void notifyPlaymatBlacklisted (const QString &cardName, const QString &message)

Private Attributes

QVBoxLayout * deckViewLayout
QPushButton * loadLocalButton
QPushButton * loadRemoteButton
QPushButton * loadFromClipboardButton
QPushButton * loadFromWebsiteButton
QPushButton * unloadDeckButton
QPushButton * forceStartGameButton
ToggleButton * readyStartButton
ToggleButton * sideboardLockButton
DeckView * deckView
VisualDeckStorageWidget * visualDeckStorageWidget
TabGame * parentGame
int playerId
int playmatRotationIndex = 0
 Per-match cursor for round-robin playmat mode.
DeckList currentDeck
 Cached deck for live settings re-resolution.
PlaymatInfo lastResolvedPlaymat
 Tracks last sent playmat to avoid repeats in random mode.
QString lastBlacklistedPlaymatNotice
 Card name already reported as blacklisted, to avoid repeat popups.

Detailed Description

This widget contains the deck selection view that is used before a game begins.

Constructor & Destructor Documentation

◆ DeckViewContainer()

DeckViewContainer::DeckViewContainer ( int _playerId,
TabGame * parent )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ advancePlaymatRotation()

void DeckViewContainer::advancePlaymatRotation ( )
Here is the caller graph for this function:

◆ deckSelectFinished

void DeckViewContainer::deckSelectFinished ( const Response & r)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ forceStart

void DeckViewContainer::forceStart ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadDeckFromDeckList

void DeckViewContainer::loadDeckFromDeckList ( const DeckList & deck)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadDeckFromFile

void DeckViewContainer::loadDeckFromFile ( const QString & filePath)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromClipboard

void DeckViewContainer::loadFromClipboard ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromWebsite

void DeckViewContainer::loadFromWebsite ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadLocalDeck

void DeckViewContainer::loadLocalDeck ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadRemoteDeck

void DeckViewContainer::loadRemoteDeck ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newCardAdded

void DeckViewContainer::newCardAdded ( AbstractCardItem * card)
signal
Here is the caller graph for this function:

◆ notIdle

void DeckViewContainer::notIdle ( )
signal
Here is the call graph for this function:

◆ notifyPlaymatBlacklisted()

void DeckViewContainer::notifyPlaymatBlacklisted ( const QString & cardName,
const QString & message )
private
Here is the caller graph for this function:

◆ onPlaymatSettingsChanged

void DeckViewContainer::onPlaymatSettingsChanged ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readyAndUpdate()

void DeckViewContainer::readyAndUpdate ( )

Sends a ReadyStart command with ready=true to the server

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readyStart

void DeckViewContainer::readyStart ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshShortcuts

void DeckViewContainer::refreshShortcuts ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolveAndSendPlaymat()

void DeckViewContainer::resolveAndSendPlaymat ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void DeckViewContainer::retranslateUi ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendReadyStartCommand()

void DeckViewContainer::sendReadyStartCommand ( bool ready)
private

Sends the basic ReadyStart command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDeck()

void DeckViewContainer::setDeck ( const DeckList & deck)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setReadyStart()

void DeckViewContainer::setReadyStart ( bool ready)

Updates the buttons to make the client-side ready state match the given state.

Notably, this method only updates the client and does not send a ReadyStart command to the server. This method is intended to be called upon receiving the response from a ReadyStart command.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSideboardLocked()

void DeckViewContainer::setSideboardLocked ( bool locked)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVisualDeckStorageExists()

void DeckViewContainer::setVisualDeckStorageExists ( bool exists)

Updates the existence of the embedded Visual Deck Storage, destroying or creating it if needed. Note that this change is temporary; the VDS may get recreated when the view transitions to the deck select state, depending on current settings.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sideboardLockButtonClicked

void DeckViewContainer::sideboardLockButtonClicked ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sideboardPlanChanged

void DeckViewContainer::sideboardPlanChanged ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ switchToDeckLoadedView

void DeckViewContainer::switchToDeckLoadedView ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ switchToDeckSelectView

void DeckViewContainer::switchToDeckSelectView ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryCreateVisualDeckStorageWidget()

void DeckViewContainer::tryCreateVisualDeckStorageWidget ( )
private

Creates the VDS widget and inserts it into the layout. No-ops if the widget already exists

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unloadDeck

void DeckViewContainer::unloadDeck ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSideboardLockButtonText

void DeckViewContainer::updateSideboardLockButtonText ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ currentDeck

DeckList DeckViewContainer::currentDeck
private

Cached deck for live settings re-resolution.

◆ deckView

DeckView* DeckViewContainer::deckView
private

◆ deckViewLayout

QVBoxLayout* DeckViewContainer::deckViewLayout
private

◆ forceStartGameButton

QPushButton * DeckViewContainer::forceStartGameButton
private

◆ lastBlacklistedPlaymatNotice

QString DeckViewContainer::lastBlacklistedPlaymatNotice
private

Card name already reported as blacklisted, to avoid repeat popups.

◆ lastResolvedPlaymat

PlaymatInfo DeckViewContainer::lastResolvedPlaymat
private

Tracks last sent playmat to avoid repeats in random mode.

◆ loadFromClipboardButton

QPushButton * DeckViewContainer::loadFromClipboardButton
private

◆ loadFromWebsiteButton

QPushButton * DeckViewContainer::loadFromWebsiteButton
private

◆ loadLocalButton

QPushButton* DeckViewContainer::loadLocalButton
private

◆ loadRemoteButton

QPushButton * DeckViewContainer::loadRemoteButton
private

◆ parentGame

TabGame* DeckViewContainer::parentGame
private

◆ playerId

int DeckViewContainer::playerId
private

◆ playmatRotationIndex

int DeckViewContainer::playmatRotationIndex = 0
private

Per-match cursor for round-robin playmat mode.

◆ readyStartButton

ToggleButton* DeckViewContainer::readyStartButton
private

◆ sideboardLockButton

ToggleButton * DeckViewContainer::sideboardLockButton
private

◆ unloadDeckButton

QPushButton* DeckViewContainer::unloadDeckButton
private

◆ visualDeckStorageWidget

VisualDeckStorageWidget* DeckViewContainer::visualDeckStorageWidget
private

The documentation for this class was generated from the following files: