![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
A selectable preview tile for a deck that has no local file. More...
#include <shared_deck_preview_widget.h>
Signals | |
| void | selectionToggled (bool selected) |
| void | activated () |
Public Member Functions | |
| SharedDeckPreviewWidget (QWidget *parent, const CardDatabaseQuerier *querier, const QString &deckName, const QString &bannerCardName, const QString &colorIdentity, const QString &gameFormat=QString(), const QString &deckToolTip=QString()) | |
| bool | isSelected () const |
| void | setSelected (bool selected) |
| void | setBaseAccessibleName (const QString &name) |
Protected Member Functions | |
| void | resizeEvent (QResizeEvent *event) override |
| void | keyPressEvent (QKeyEvent *event) override |
Private Slots | |
| void | toggleSelection () |
| void | activate () |
Private Member Functions | |
| void | updateSelectionVisual (bool selected) |
| void | updateSelectionFrameGeometry () |
Private Attributes | |
| DeckPreviewCardPictureWidget * | bannerCardDisplayWidget |
| ColorIdentityWidget * | colorIdentityWidget |
| QLabel * | gameFormatLabel |
| QCheckBox * | selectionCheckBox |
| QFrame * | selectionFrame |
| QString | baseAccessibleName |
A selectable preview tile for a deck that has no local file.
Renders a banner card picture (looked up by name in the card database), the deck name, color identity and game format. Used to preview decks shared via a cockatrice:// link (metadata from Command_DeckShareList) and the deck currently open in the deck editor.
Selection follows the deck-preview covenant: the tile reports its click immediately (no double-click interval delay), a palette(highlight) frame marks the selected tile, and Space/Enter toggles selection from the keyboard. A double click selects the tile and emits activated() so the caller can open just that deck.
|
explicit |
|
privateslot |
|
signal |
|
nodiscard |
|
overrideprotected |
|
overrideprotected |
|
signal |
| void SharedDeckPreviewWidget::setBaseAccessibleName | ( | const QString & | name | ) |
| void SharedDeckPreviewWidget::setSelected | ( | bool | selected | ) |
|
privateslot |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |