Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform 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 loadDeckFromDeckLoader (DeckLoader *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 (DeckLoader &deck)
void setVisualDeckStorageExists (bool exists)

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 ()

Private Member Functions

void tryCreateVisualDeckStorageWidget ()
void sendReadyStartCommand (bool ready)

Private Attributes

QVBoxLayout * deckViewLayout
QPushButton * loadLocalButton
QPushButton * loadRemoteButton
QPushButton * loadFromClipboardButton
QPushButton * loadFromWebsiteButton
QPushButton * unloadDeckButton
QPushButton * forceStartGameButton
ToggleButtonreadyStartButton
ToggleButtonsideboardLockButton
DeckViewdeckView
VisualDeckStorageWidgetvisualDeckStorageWidget
TabGameparentGame
int playerId

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:

Member Function Documentation

◆ 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 caller graph for this function:

◆ loadDeckFromDeckLoader

void DeckViewContainer::loadDeckFromDeckLoader ( DeckLoader * 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

◆ readyAndUpdate()

void DeckViewContainer::readyAndUpdate ( )

Sends a ReadyStart command with ready=true to the server

Here is the call 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:

◆ 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 caller graph for this function:

◆ setDeck()

void DeckViewContainer::setDeck ( DeckLoader & 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.

◆ setSideboardLocked()

void DeckViewContainer::setSideboardLocked ( bool locked)

◆ 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 caller graph for this function:

◆ sideboardPlanChanged

void DeckViewContainer::sideboardPlanChanged ( )
privateslot
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

◆ deckView

DeckView* DeckViewContainer::deckView
private

◆ deckViewLayout

QVBoxLayout* DeckViewContainer::deckViewLayout
private

◆ forceStartGameButton

QPushButton * DeckViewContainer::forceStartGameButton
private

◆ 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

◆ 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: