Cockatrice 2026-01-14-Development-2.11.0-beta.46
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
DeckEditorDeckDockWidget Class Reference

#include <deck_editor_deck_dock_widget.h>

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

Public Slots

void selectPrevCard ()
void selectNextCard ()
void updateBannerCardComboBox ()
void syncDisplayWidgetsToModel ()
void actAddCard (const ExactCard &card, const QString &zoneName)
void actIncrementSelection ()
void actDecrementCard (const ExactCard &card, QString zoneName)
void actDecrementSelection ()
void actSwapCard (const ExactCard &card, const QString &zoneName)
void actSwapSelection ()
void actRemoveCard ()
void initializeFormats ()

Signals

void selectedCardChanged (const ExactCard &card)

Public Member Functions

 DeckEditorDeckDockWidget (AbstractTabDeckEditor *parent)
void createDeckDock ()
ExactCard getCurrentCard ()
void retranslateUi ()
QComboBox * getGroupByComboBox ()
QItemSelectionModel * getSelectionModel () const

Public Attributes

DeckListStyleProxyproxy
QTreeView * deckView
QComboBox * bannerCardComboBox

Private Slots

void decklistCustomMenu (QPoint point)
void updateCard (QModelIndex, const QModelIndex &current)
void writeName ()
 Writes the contents of the name textBox to the DeckStateManager.
void writeComments ()
 Writes the contents of the comments textBox to the DeckStateManager.
void writeBannerCard (int)
 Writes the selected bannerCard to the DeckStateManager.
void applyActiveGroupCriteria ()
void setSelectedIndex (const QModelIndex &newCardIndex, bool preserveWidgetFocus)
void updateHash ()
void refreshShortcuts ()
void updateShowBannerCardComboBox (bool visible)
void updateShowTagsWidget (bool visible)
void syncBannerCardComboBoxSelectionWithDeck ()
void changeSelectedCard (int changeBy)
 Selects a card based on the change direction.
void recursiveExpand (const QModelIndex &parent)
 Expands all parents of the given index.
void expandAll ()
 Fully expands all levels of the deck view.

Private Member Functions

DeckListModelgetModel () const
 Convenience method to get the underlying model instance from the DeckStateManager.
QModelIndexList getSelectedCardNodeSourceIndices () const
void offsetCountAtIndex (const QModelIndex &idx, bool isIncrement)
 Increments or decrements the amount of the card node at the index by 1.

Private Attributes

AbstractTabDeckEditordeckEditor
DeckStateManagerdeckStateManager
DeckListHistoryManagerWidgethistoryManagerWidget
KeySignals deckViewKeySignals
QLabel * nameLabel
LineEditUnfocusablenameEdit
QTimer * nameDebounceTimer
SettingsButtonWidgetquickSettingsWidget
QCheckBox * showBannerCardCheckBox
QCheckBox * showTagsWidgetCheckBox
QLabel * commentsLabel
QTextEdit * commentsEdit
QTimer * commentsDebounceTimer
QLabel * bannerCardLabel
DeckPreviewDeckTagsDisplayWidgetdeckTagsDisplayWidget
QLabel * hashLabel1
LineEditUnfocusablehashLabel
QLabel * activeGroupCriteriaLabel
QComboBox * activeGroupCriteriaComboBox
QLabel * formatLabel
QComboBox * formatComboBox
QAction * aRemoveCard
QAction * aIncrement
QAction * aDecrement
QAction * aSwapCard

Constructor & Destructor Documentation

◆ DeckEditorDeckDockWidget()

DeckEditorDeckDockWidget::DeckEditorDeckDockWidget ( AbstractTabDeckEditor * parent)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ actAddCard

void DeckEditorDeckDockWidget::actAddCard ( const ExactCard & card,
const QString & zoneName )
slot

◆ actDecrementCard

void DeckEditorDeckDockWidget::actDecrementCard ( const ExactCard & card,
QString zoneName )
slot
Here is the call graph for this function:

◆ actDecrementSelection

void DeckEditorDeckDockWidget::actDecrementSelection ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actIncrementSelection

void DeckEditorDeckDockWidget::actIncrementSelection ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actRemoveCard

void DeckEditorDeckDockWidget::actRemoveCard ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actSwapCard

void DeckEditorDeckDockWidget::actSwapCard ( const ExactCard & card,
const QString & zoneName )
slot
Here is the call graph for this function:

◆ actSwapSelection

void DeckEditorDeckDockWidget::actSwapSelection ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyActiveGroupCriteria

void DeckEditorDeckDockWidget::applyActiveGroupCriteria ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSelectedCard

void DeckEditorDeckDockWidget::changeSelectedCard ( int changeBy)
privateslot

Selects a card based on the change direction.

Parameters
changeByThe direction to change, -1 for previous, 1 for next.
Todo
Figure out why it's happening so we can do a proper fix instead of a hacky workaround
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createDeckDock()

void DeckEditorDeckDockWidget::createDeckDock ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decklistCustomMenu

void DeckEditorDeckDockWidget::decklistCustomMenu ( QPoint point)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ expandAll

void DeckEditorDeckDockWidget::expandAll ( )
privateslot

Fully expands all levels of the deck view.

Here is the caller graph for this function:

◆ getCurrentCard()

ExactCard DeckEditorDeckDockWidget::getCurrentCard ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGroupByComboBox()

QComboBox * DeckEditorDeckDockWidget::getGroupByComboBox ( )
inline

◆ getModel()

DeckListModel * DeckEditorDeckDockWidget::getModel ( ) const
private

Convenience method to get the underlying model instance from the DeckStateManager.

Here is the caller graph for this function:

◆ getSelectedCardNodeSourceIndices()

QModelIndexList DeckEditorDeckDockWidget::getSelectedCardNodeSourceIndices ( ) const
nodiscardprivate

Gets the source index of all the currently selected card nodes in the decklist table. The list is in reverse order of the visual selection, so that rows can be deleted while iterating over them.

Returns
A list containing the source indices of all selected card nodes
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSelectionModel()

QItemSelectionModel * DeckEditorDeckDockWidget::getSelectionModel ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ initializeFormats

void DeckEditorDeckDockWidget::initializeFormats ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ offsetCountAtIndex()

void DeckEditorDeckDockWidget::offsetCountAtIndex ( const QModelIndex & idx,
bool isIncrement )
private

Increments or decrements the amount of the card node at the index by 1.

Parameters
idxThe source index
isIncrementIf true, increments the count. If false, decrements the count
Here is the call graph for this function:
Here is the caller graph for this function:

◆ recursiveExpand

void DeckEditorDeckDockWidget::recursiveExpand ( const QModelIndex & sourceIndex)
privateslot

Expands all parents of the given index.

Parameters
sourceIndexThe index to expand (model source index)
Here is the caller graph for this function:

◆ refreshShortcuts

void DeckEditorDeckDockWidget::refreshShortcuts ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

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

◆ selectedCardChanged

void DeckEditorDeckDockWidget::selectedCardChanged ( const ExactCard & card)
signal
Here is the caller graph for this function:

◆ selectNextCard

void DeckEditorDeckDockWidget::selectNextCard ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectPrevCard

void DeckEditorDeckDockWidget::selectPrevCard ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelectedIndex

void DeckEditorDeckDockWidget::setSelectedIndex ( const QModelIndex & newCardIndex,
bool preserveWidgetFocus )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ syncBannerCardComboBoxSelectionWithDeck

void DeckEditorDeckDockWidget::syncBannerCardComboBoxSelectionWithDeck ( )
privateslot
Here is the caller graph for this function:

◆ syncDisplayWidgetsToModel

void DeckEditorDeckDockWidget::syncDisplayWidgetsToModel ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateBannerCardComboBox

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

◆ updateCard

void DeckEditorDeckDockWidget::updateCard ( QModelIndex ,
const QModelIndex & current )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateHash

void DeckEditorDeckDockWidget::updateHash ( )
privateslot
Here is the caller graph for this function:

◆ updateShowBannerCardComboBox

void DeckEditorDeckDockWidget::updateShowBannerCardComboBox ( bool visible)
privateslot
Here is the caller graph for this function:

◆ updateShowTagsWidget

void DeckEditorDeckDockWidget::updateShowTagsWidget ( bool visible)
privateslot
Here is the caller graph for this function:

◆ writeBannerCard

void DeckEditorDeckDockWidget::writeBannerCard ( int index)
privateslot

Writes the selected bannerCard to the DeckStateManager.

Here is the caller graph for this function:

◆ writeComments

void DeckEditorDeckDockWidget::writeComments ( )
privateslot

Writes the contents of the comments textBox to the DeckStateManager.

Here is the caller graph for this function:

◆ writeName

void DeckEditorDeckDockWidget::writeName ( )
privateslot

Writes the contents of the name textBox to the DeckStateManager.

Here is the caller graph for this function:

Member Data Documentation

◆ activeGroupCriteriaComboBox

QComboBox* DeckEditorDeckDockWidget::activeGroupCriteriaComboBox
private

◆ activeGroupCriteriaLabel

QLabel* DeckEditorDeckDockWidget::activeGroupCriteriaLabel
private

◆ aDecrement

QAction * DeckEditorDeckDockWidget::aDecrement
private

◆ aIncrement

QAction * DeckEditorDeckDockWidget::aIncrement
private

◆ aRemoveCard

QAction* DeckEditorDeckDockWidget::aRemoveCard
private

◆ aSwapCard

QAction * DeckEditorDeckDockWidget::aSwapCard
private

◆ bannerCardComboBox

QComboBox* DeckEditorDeckDockWidget::bannerCardComboBox

◆ bannerCardLabel

QLabel* DeckEditorDeckDockWidget::bannerCardLabel
private

◆ commentsDebounceTimer

QTimer* DeckEditorDeckDockWidget::commentsDebounceTimer
private

◆ commentsEdit

QTextEdit* DeckEditorDeckDockWidget::commentsEdit
private

◆ commentsLabel

QLabel* DeckEditorDeckDockWidget::commentsLabel
private

◆ deckEditor

AbstractTabDeckEditor* DeckEditorDeckDockWidget::deckEditor
private

◆ deckStateManager

DeckStateManager* DeckEditorDeckDockWidget::deckStateManager
private

◆ deckTagsDisplayWidget

DeckPreviewDeckTagsDisplayWidget* DeckEditorDeckDockWidget::deckTagsDisplayWidget
private

◆ deckView

QTreeView* DeckEditorDeckDockWidget::deckView

◆ deckViewKeySignals

KeySignals DeckEditorDeckDockWidget::deckViewKeySignals
private

◆ formatComboBox

QComboBox* DeckEditorDeckDockWidget::formatComboBox
private

◆ formatLabel

QLabel* DeckEditorDeckDockWidget::formatLabel
private

◆ hashLabel

LineEditUnfocusable* DeckEditorDeckDockWidget::hashLabel
private

◆ hashLabel1

QLabel* DeckEditorDeckDockWidget::hashLabel1
private

◆ historyManagerWidget

DeckListHistoryManagerWidget* DeckEditorDeckDockWidget::historyManagerWidget
private

◆ nameDebounceTimer

QTimer* DeckEditorDeckDockWidget::nameDebounceTimer
private

◆ nameEdit

LineEditUnfocusable* DeckEditorDeckDockWidget::nameEdit
private

◆ nameLabel

QLabel* DeckEditorDeckDockWidget::nameLabel
private

◆ proxy

DeckListStyleProxy* DeckEditorDeckDockWidget::proxy

◆ quickSettingsWidget

SettingsButtonWidget* DeckEditorDeckDockWidget::quickSettingsWidget
private

◆ showBannerCardCheckBox

QCheckBox* DeckEditorDeckDockWidget::showBannerCardCheckBox
private

◆ showTagsWidgetCheckBox

QCheckBox* DeckEditorDeckDockWidget::showTagsWidgetCheckBox
private

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