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

A visual grid of the public decks published by another user. More...

#include <tab_public_decks.h>

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

Signals

void closing (TabPublicDecks *tab)
Signals inherited from Tab
void userEvent (bool globalEvent=true)
void tabTextChanged (Tab *tab, const QString &newTabText)
void cockatriceLinkActivated (const QString &url)

Public Member Functions

 TabPublicDecks (TabSupervisor *tabSupervisor, AbstractClient *client, const QString &userName)
QString getTabText () const override
void retranslateUi () override
bool closeRequest () override
QString getUserName () const
Public Member Functions inherited from Tab
 Tab (TabSupervisor *_tabSupervisor)
const QList< QMenu * > & getTabMenus () const
TabSupervisor * getTabSupervisor () const
bool getContentsChanged () const
void setContentsChanged (bool _contentsChanged)
virtual void tabActivated ()

Private Slots

void openDeck (int deckId)
void openDeckFinished (const Response &response, const CommandContainer &commandContainer)
void updateColorFilter ()
void updateTagFilter ()
void updateCardSize (int scale)
void updateTagsVisibility (bool visible)
void updateLoadingState (bool loading)

Private Member Functions

void rebuildGrid ()
void applyCardSize (int scale)

Private Attributes

AbstractClient * client
QString userName
RemotePublicDecksModel * model
FlowWidget * flowWidget
VisualDeckStorageSearchWidget * searchWidget
DeckPreviewColorIdentityFilterWidget * colorIdentityFilter
VisualDeckStorageTagFilterWidget * tagFilterWidget
QToolButton * refreshButton
VisualDeckStorageQuickSettingsWidget * quickSettingsWidget
QLabel * titleLabel
QLabel * statusLabel
QLabel * emptyLabel
QString lastFailureMessage
 Last load-failure text, re-shown on retranslate.
int cardSize = 100

Additional Inherited Members

Protected Slots inherited from Tab
void showCardInfoPopup (const QPoint &pos, const CardRef &cardRef)
void deleteCardInfoPopup (const QString &cardName)
Protected Member Functions inherited from Tab
void addTabMenu (QMenu *menu)
Protected Attributes inherited from Tab
TabSupervisor * tabSupervisor

Detailed Description

A visual grid of the public decks published by another user.

The grid is rendered from the preview metadata the server stores for the decks, so browsing costs no downloads; the deck list is fetched via Command_DeckDownloadPublic only when the user opens a deck. Multiple users can be browsed simultaneously; each gets its own tab.

Constructor & Destructor Documentation

◆ TabPublicDecks()

TabPublicDecks::TabPublicDecks ( TabSupervisor * tabSupervisor,
AbstractClient * client,
const QString & userName )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ applyCardSize()

void TabPublicDecks::applyCardSize ( int scale)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeRequest()

bool TabPublicDecks::closeRequest ( )
overridevirtual

Nicely asks to close the tab. Override this method to do checks or ask for confirmation before closing the tab. If you need to force close the tab, just call close() instead.

Returns
True if the tab is successfully closed.

Reimplemented from Tab.

Here is the call graph for this function:

◆ closing

void TabPublicDecks::closing ( TabPublicDecks * tab)
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTabText()

QString TabPublicDecks::getTabText ( ) const
nodiscardoverridevirtual

Implements Tab.

Here is the caller graph for this function:

◆ getUserName()

QString TabPublicDecks::getUserName ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ openDeck

void TabPublicDecks::openDeck ( int deckId)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openDeckFinished

void TabPublicDecks::openDeckFinished ( const Response & response,
const CommandContainer & commandContainer )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rebuildGrid()

void TabPublicDecks::rebuildGrid ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void TabPublicDecks::retranslateUi ( )
overridevirtual

Implements Tab.

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

◆ updateCardSize

void TabPublicDecks::updateCardSize ( int scale)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateColorFilter

void TabPublicDecks::updateColorFilter ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateLoadingState

void TabPublicDecks::updateLoadingState ( bool loading)
privateslot
Here is the caller graph for this function:

◆ updateTagFilter

void TabPublicDecks::updateTagFilter ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateTagsVisibility

void TabPublicDecks::updateTagsVisibility ( bool visible)
privateslot
Here is the caller graph for this function:

Member Data Documentation

◆ cardSize

int TabPublicDecks::cardSize = 100
private

◆ client

AbstractClient* TabPublicDecks::client
private

◆ colorIdentityFilter

DeckPreviewColorIdentityFilterWidget* TabPublicDecks::colorIdentityFilter
private

◆ emptyLabel

QLabel* TabPublicDecks::emptyLabel
private

◆ flowWidget

FlowWidget* TabPublicDecks::flowWidget
private

◆ lastFailureMessage

QString TabPublicDecks::lastFailureMessage
private

Last load-failure text, re-shown on retranslate.

◆ model

RemotePublicDecksModel* TabPublicDecks::model
private

◆ quickSettingsWidget

VisualDeckStorageQuickSettingsWidget* TabPublicDecks::quickSettingsWidget
private

◆ refreshButton

QToolButton* TabPublicDecks::refreshButton
private

◆ searchWidget

VisualDeckStorageSearchWidget* TabPublicDecks::searchWidget
private

◆ statusLabel

QLabel* TabPublicDecks::statusLabel
private

◆ tagFilterWidget

VisualDeckStorageTagFilterWidget* TabPublicDecks::tagFilterWidget
private

◆ titleLabel

QLabel* TabPublicDecks::titleLabel
private

◆ userName

QString TabPublicDecks::userName
private

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