Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
DeckPreviewWidget Class Referencefinal

#include <deck_preview_widget.h>

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

Public Slots

void setFilePath (const QString &filePath)
void refreshBannerCardText ()
void refreshBannerCardToolTip ()
void updateBannerCardComboBox ()
void setBannerCard (int)
void imageClickedEvent (QMouseEvent *event, DeckPreviewCardPictureWidget *instance)
void imageDoubleClickedEvent (QMouseEvent *event, DeckPreviewCardPictureWidget *instance)
void initializeUi (bool deckLoadSuccess)
void updateVisibility ()
void updateBannerCardComboBoxVisibility (bool visible)
void updateTagsVisibility (bool visible)
void resizeEvent (QResizeEvent *event) override

Signals

void deckLoadRequested (const QString &filePath)
void openDeckEditor (DeckLoader *deck)

Public Member Functions

 DeckPreviewWidget (QWidget *_parent, VisualDeckStorageWidget *_visualDeckStorageWidget, const QString &_filePath)
void retranslateUi ()
QString getColorIdentity ()
QString getDisplayName () const
bool checkVisibility () const

Public Attributes

VisualDeckStorageWidgetvisualDeckStorageWidget
QVBoxLayout * layout
QString filePath
DeckLoader * deckLoader
DeckPreviewCardPictureWidgetbannerCardDisplayWidget = nullptr
ColorIdentityWidgetcolorIdentityWidget = nullptr
DeckPreviewDeckTagsDisplayWidgetdeckTagsDisplayWidget = nullptr
QLabel * bannerCardLabel = nullptr
QComboBox * bannerCardComboBox = nullptr
bool filteredBySearch = false
bool filteredByColor = false
bool filteredByTags = false

Private Slots

void actRenameDeck ()
void actRenameFile ()
void actDeleteFile ()

Private Member Functions

QMenu * createRightClickMenu ()
void addSetBannerCardMenu (QMenu *menu)

Constructor & Destructor Documentation

◆ DeckPreviewWidget()

DeckPreviewWidget::DeckPreviewWidget ( QWidget * _parent,
VisualDeckStorageWidget * _visualDeckStorageWidget,
const QString & _filePath )
explicit
Here is the call graph for this function:

Member Function Documentation

◆ actDeleteFile

void DeckPreviewWidget::actDeleteFile ( )
privateslot
Here is the caller graph for this function:

◆ actRenameDeck

void DeckPreviewWidget::actRenameDeck ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actRenameFile

void DeckPreviewWidget::actRenameFile ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSetBannerCardMenu()

void DeckPreviewWidget::addSetBannerCardMenu ( QMenu * menu)
private

Adds the "Set Banner Card" submenu to the given menu. Does nothing if bannerCardComboBox is null.

Parameters
menuThe menu to add the submenu to
Here is the caller graph for this function:

◆ checkVisibility()

bool DeckPreviewWidget::checkVisibility ( ) const
nodiscard
Here is the caller graph for this function:

◆ createRightClickMenu()

QMenu * DeckPreviewWidget::createRightClickMenu ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deckLoadRequested

void DeckPreviewWidget::deckLoadRequested ( const QString & filePath)
signal
Here is the caller graph for this function:

◆ getColorIdentity()

QString DeckPreviewWidget::getColorIdentity ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDisplayName()

QString DeckPreviewWidget::getDisplayName ( ) const
nodiscard

The display name is given by the deck name, or the filename if the deck name is not set.

Here is the caller graph for this function:

◆ imageClickedEvent

void DeckPreviewWidget::imageClickedEvent ( QMouseEvent * event,
DeckPreviewCardPictureWidget * instance )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ imageDoubleClickedEvent

void DeckPreviewWidget::imageDoubleClickedEvent ( QMouseEvent * event,
DeckPreviewCardPictureWidget * instance )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeUi

void DeckPreviewWidget::initializeUi ( bool deckLoadSuccess)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openDeckEditor

void DeckPreviewWidget::openDeckEditor ( DeckLoader * deck)
signal
Here is the caller graph for this function:

◆ refreshBannerCardText

void DeckPreviewWidget::refreshBannerCardText ( )
slot

Refreshes the banner card text. This also calls refreshBannerCardToolTip, since those two often need to be updated together.

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

◆ refreshBannerCardToolTip

void DeckPreviewWidget::refreshBannerCardToolTip ( )
slot
Here is the caller graph for this function:

◆ resizeEvent

void DeckPreviewWidget::resizeEvent ( QResizeEvent * event)
overrideslot

◆ retranslateUi()

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

◆ setBannerCard

void DeckPreviewWidget::setBannerCard ( int )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFilePath

void DeckPreviewWidget::setFilePath ( const QString & filePath)
slot
Here is the caller graph for this function:

◆ updateBannerCardComboBox

void DeckPreviewWidget::updateBannerCardComboBox ( )
slot
Here is the caller graph for this function:

◆ updateBannerCardComboBoxVisibility

void DeckPreviewWidget::updateBannerCardComboBoxVisibility ( bool visible)
slot
Here is the caller graph for this function:

◆ updateTagsVisibility

void DeckPreviewWidget::updateTagsVisibility ( bool visible)
slot
Here is the caller graph for this function:

◆ updateVisibility

void DeckPreviewWidget::updateVisibility ( )
slot
Here is the call graph for this function:

Member Data Documentation

◆ bannerCardComboBox

QComboBox* DeckPreviewWidget::bannerCardComboBox = nullptr

◆ bannerCardDisplayWidget

DeckPreviewCardPictureWidget* DeckPreviewWidget::bannerCardDisplayWidget = nullptr

◆ bannerCardLabel

QLabel* DeckPreviewWidget::bannerCardLabel = nullptr

◆ colorIdentityWidget

ColorIdentityWidget* DeckPreviewWidget::colorIdentityWidget = nullptr

◆ deckLoader

DeckLoader* DeckPreviewWidget::deckLoader

◆ deckTagsDisplayWidget

DeckPreviewDeckTagsDisplayWidget* DeckPreviewWidget::deckTagsDisplayWidget = nullptr

◆ filePath

QString DeckPreviewWidget::filePath

◆ filteredByColor

bool DeckPreviewWidget::filteredByColor = false

◆ filteredBySearch

bool DeckPreviewWidget::filteredBySearch = false

◆ filteredByTags

bool DeckPreviewWidget::filteredByTags = false

◆ layout

QVBoxLayout* DeckPreviewWidget::layout

◆ visualDeckStorageWidget

VisualDeckStorageWidget* DeckPreviewWidget::visualDeckStorageWidget

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