![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <deck_preview_widget.h>
Public Slots | |
| void | syncFromModel () |
| Re-reads the row's data from the model and syncs every child widget. Connected to the model's dataChanged signal. | |
| void | reloadIfModified () |
| Reloads the deck file if its modification time is newer than the stored one. | |
| void | refreshBannerCardToolTip () |
| void | updateColorIdentityVisibility (bool visible) |
| void | updateBannerCardComboBoxVisibility (bool visible) |
| void | updateTagsVisibility (bool visible) |
| void | setBannerCard (int) |
| void | setTags (const QStringList &tags) |
Signals | |
| void | deckLoadRequested (const QString &filePath) |
| void | openDeckEditor (const LoadedDeck &deck) |
| void | shareDeckRequested (const QString &filePath) |
| void | shareSelectionToggled (bool selected) |
Public Member Functions | |
| DeckPreviewWidget (QWidget *parent, VisualDeckStorageWidget *_visualDeckStorageWidget, VisualDeckStorageModel *_model, const QString &_filePath) | |
| void | retranslateUi () |
| void | setShareSelectable (bool selectable) |
| void | setShareSelected (bool selected) |
| bool | isShareSelected () const |
| bool | isShareSelectable () const |
Public Attributes | |
| DeckPreviewCardPictureWidget * | bannerCardDisplayWidget |
| The banner card picture; the parent widget wires its size to the card size setting. | |
| QString | filePath |
| The path of the deck file backing this preview. | |
Protected Member Functions | |
| void | enterEvent (QEnterEvent *event) override |
| void | resizeEvent (QResizeEvent *event) override |
| bool | eventFilter (QObject *watched, QEvent *event) override |
Private Member Functions | |
| int | row () const |
| The row of this deck in the source model, or -1 if it no longer exists. | |
| QString | getDisplayName () const |
| The display name is given by the deck name, or the filename if the deck name is not set. | |
| void | refreshBannerCardText () |
| void | updateBannerCardComboBox (const QString ¤tText) |
| bool | promptFileConversionIfRequired () |
| QMenu * | createRightClickMenu () |
| void | addSetBannerCardMenu (QMenu *menu) |
| void | imageClickedEvent (QMouseEvent *event, DeckPreviewCardPictureWidget *instance) |
| void | imageSingleClicked () |
| void | imageDoubleClickedEvent (QMouseEvent *event, DeckPreviewCardPictureWidget *instance) |
| void | actRenameDeck () |
| void | actRenameFile () |
| void | actDeleteFile () |
| void | updateSelectionStyle () |
| void | updateSelectionFrameGeometry () |
Private Attributes | |
| VisualDeckStorageWidget * | visualDeckStorageWidget |
| VisualDeckStorageModel * | model |
| QVBoxLayout * | layout |
| ColorIdentityWidget * | colorIdentityWidget |
| DeckPreviewDeckTagsDisplayWidget * | deckTagsDisplayWidget |
| QLabel * | bannerCardLabel |
| QComboBox * | bannerCardComboBox |
| QList< QWidget * > | fixedWidthChildren |
| Children clamped to the picture width on resize. | |
| int | lastKnownBannerWidth = -1 |
| The picture width last applied to the children. | |
| QFrame * | selectionFrame = nullptr |
| bool | shareSelectable = false |
| bool | shareSelected = false |
|
explicit |
|
private |
|
private |
|
private |
|
private |
Adds the "Set Banner Card" submenu to the given menu. Does nothing if bannerCardComboBox is null.
| menu | The menu to add the submenu to |
|
private |
|
signal |
|
overrideprotected |
|
overrideprotected |
|
nodiscardprivate |
The display name is given by the deck name, or the filename if the deck name is not set.
|
private |
|
private |
|
private |
|
nodiscard |
|
nodiscard |
|
signal |
|
private |
Checks if the deck's file format supports tags. If not, then prompt the user for file conversion.
|
private |
Refreshes the banner card text. This also calls refreshBannerCardToolTip, since those two often need to be updated together.
|
slot |
|
slot |
Reloads the deck file if its modification time is newer than the stored one.
Reloads the deck if the file's last modified time has increased since we last checked.
|
overrideprotected |
| void DeckPreviewWidget::retranslateUi | ( | ) |
|
nodiscardprivate |
The row of this deck in the source model, or -1 if it no longer exists.
|
slot |
| void DeckPreviewWidget::setShareSelectable | ( | bool | selectable | ) |
| void DeckPreviewWidget::setShareSelected | ( | bool | selected | ) |
|
slot |
|
signal |
|
signal |
|
slot |
Re-reads the row's data from the model and syncs every child widget. Connected to the model's dataChanged signal.
Syncs the contents of the child widgets with the current row's data.
|
private |
|
slot |
|
slot |
|
private |
|
private |
|
slot |
|
private |
| DeckPreviewCardPictureWidget* DeckPreviewWidget::bannerCardDisplayWidget |
The banner card picture; the parent widget wires its size to the card size setting.
|
private |
|
private |
|
private |
| QString DeckPreviewWidget::filePath |
The path of the deck file backing this preview.
|
private |
Children clamped to the picture width on resize.
|
private |
The picture width last applied to the children.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |