Cockatrice 2026-06-27-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
VisualDatabaseDisplayWidget Class Reference

#include <visual_database_display_widget.h>

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

Public Slots

void onSearchModelChanged ()

Signals

void cardClickedDatabaseDisplay (QMouseEvent *event, const ExactCard &card)
void cardHoveredDatabaseDisplay (const ExactCard &hoveredCard)
void cardAdded (const ExactCard &card, const QString &zoneName)
void cardDecremented (const ExactCard &card, const QString &zoneName)
void edhrecRequested (const CardInfoPtr &cardInfo, bool isCommander)
void printingSelectorRequested ()
void cardInfoRequested (const ExactCard &cardName)

Public Member Functions

 VisualDatabaseDisplayWidget (QWidget *parent, CardDatabaseModel *database_model, DeckListModel *deckListModel=nullptr)
void retranslateUi ()
void adjustCardsPerPage ()
void populateCards ()
void loadPage (int start, int end)
void loadNextPage ()
void loadCurrentPage ()
void sortCardList (const QStringList &properties, Qt::SortOrder order) const
void setDeckList (const DeckList &new_deck_list_model)
CardDatabaseDisplayModelgetDatabaseDisplayModel ()
CardDatabaseViewgetDatabaseView ()
FilterTreeModelgetFilterModel ()
bool isVisualDisplayMode () const

Protected Slots

void initialize ()
void onClick (QMouseEvent *event, const ExactCard &card)
void onHover (const ExactCard &hoveredCard)
void addCardToDisplay (const ExactCard &cardToAdd)
void databaseDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
void modelDirty () const
void onDisplayModeChanged (bool checked)
void onSelectedCardChanged (const QString &cardName)
void actAddCard (const QString &cardName, const QString &zoneName)
void actDecrementCard (const QString &cardName, const QString &zoneName)
void onRelatedCardClicked (const QString &relatedCard)

Protected Member Functions

void resizeEvent (QResizeEvent *event) override

Private Member Functions

void highlightAllSearchEdit ()
bool nearEndOfPage () const

Private Attributes

FlowWidgetsearchContainer
SearchLineEditsearchEdit
QPushButton * displayModeButton
FilterTreeModelfilterModel
VisualDatabaseDisplayColorFilterWidgetcolorFilterWidget
QLabel * databaseLoadIndicator
QToolButton * clearFilterWidget
VisualDatabaseDisplayFilterToolbarWidgetfilterContainer
CardDatabaseDisplayModeldatabaseDisplayModel
CardDatabaseViewdatabaseView
QList< ExactCard > * cards
QVBoxLayout * mainLayout
QScrollArea * scrollArea
FlowWidgetflowWidget
QWidget * overlapCategories
QVBoxLayout * overlapCategoriesLayout
OverlapControlWidgetoverlapControlWidget
CardSizeWidgetcardSizeWidget
QTimer * debounceTimer
QTimer * loadCardsTimer
int debounceTime = 300
int currentPage = 0
int cardsPerPage = 100

Constructor & Destructor Documentation

◆ VisualDatabaseDisplayWidget()

VisualDatabaseDisplayWidget::VisualDatabaseDisplayWidget ( QWidget * parent,
CardDatabaseModel * database_model,
DeckListModel * deckListModel = nullptr )
explicit
Here is the call graph for this function:

Member Function Documentation

◆ actAddCard

void VisualDatabaseDisplayWidget::actAddCard ( const QString & cardName,
const QString & zoneName )
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actDecrementCard

void VisualDatabaseDisplayWidget::actDecrementCard ( const QString & cardName,
const QString & zoneName )
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCardToDisplay

void VisualDatabaseDisplayWidget::addCardToDisplay ( const ExactCard & cardToAdd)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjustCardsPerPage()

void VisualDatabaseDisplayWidget::adjustCardsPerPage ( )

◆ cardAdded

void VisualDatabaseDisplayWidget::cardAdded ( const ExactCard & card,
const QString & zoneName )
signal
Here is the caller graph for this function:

◆ cardClickedDatabaseDisplay

void VisualDatabaseDisplayWidget::cardClickedDatabaseDisplay ( QMouseEvent * event,
const ExactCard & card )
signal
Here is the caller graph for this function:

◆ cardDecremented

void VisualDatabaseDisplayWidget::cardDecremented ( const ExactCard & card,
const QString & zoneName )
signal
Here is the caller graph for this function:

◆ cardHoveredDatabaseDisplay

void VisualDatabaseDisplayWidget::cardHoveredDatabaseDisplay ( const ExactCard & hoveredCard)
signal
Here is the caller graph for this function:

◆ cardInfoRequested

void VisualDatabaseDisplayWidget::cardInfoRequested ( const ExactCard & cardName)
signal
Here is the caller graph for this function:

◆ databaseDataChanged

void VisualDatabaseDisplayWidget::databaseDataChanged ( const QModelIndex & topLeft,
const QModelIndex & bottomRight )
protectedslot

◆ edhrecRequested

void VisualDatabaseDisplayWidget::edhrecRequested ( const CardInfoPtr & cardInfo,
bool isCommander )
signal
Here is the caller graph for this function:

◆ getDatabaseDisplayModel()

CardDatabaseDisplayModel * VisualDatabaseDisplayWidget::getDatabaseDisplayModel ( )
inline

◆ getDatabaseView()

CardDatabaseView * VisualDatabaseDisplayWidget::getDatabaseView ( )
inline

◆ getFilterModel()

FilterTreeModel * VisualDatabaseDisplayWidget::getFilterModel ( )
inline

◆ highlightAllSearchEdit()

void VisualDatabaseDisplayWidget::highlightAllSearchEdit ( )
private
Here is the caller graph for this function:

◆ initialize

void VisualDatabaseDisplayWidget::initialize ( )
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isVisualDisplayMode()

bool VisualDatabaseDisplayWidget::isVisualDisplayMode ( ) const
Returns
False if the widget is in database display mode and true if it's in visual display mode

◆ loadCurrentPage()

void VisualDatabaseDisplayWidget::loadCurrentPage ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadNextPage()

void VisualDatabaseDisplayWidget::loadNextPage ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadPage()

void VisualDatabaseDisplayWidget::loadPage ( int start,
int end )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ modelDirty

void VisualDatabaseDisplayWidget::modelDirty ( ) const
protectedslot
Here is the caller graph for this function:

◆ nearEndOfPage()

bool VisualDatabaseDisplayWidget::nearEndOfPage ( ) const
private
Here is the caller graph for this function:

◆ onClick

void VisualDatabaseDisplayWidget::onClick ( QMouseEvent * event,
const ExactCard & card )
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onDisplayModeChanged

void VisualDatabaseDisplayWidget::onDisplayModeChanged ( bool checked)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onHover

void VisualDatabaseDisplayWidget::onHover ( const ExactCard & hoveredCard)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onRelatedCardClicked

void VisualDatabaseDisplayWidget::onRelatedCardClicked ( const QString & relatedCard)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onSearchModelChanged

void VisualDatabaseDisplayWidget::onSearchModelChanged ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onSelectedCardChanged

void VisualDatabaseDisplayWidget::onSelectedCardChanged ( const QString & cardName)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ populateCards()

void VisualDatabaseDisplayWidget::populateCards ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printingSelectorRequested

void VisualDatabaseDisplayWidget::printingSelectorRequested ( )
signal
Here is the caller graph for this function:

◆ resizeEvent()

void VisualDatabaseDisplayWidget::resizeEvent ( QResizeEvent * event)
overrideprotected
Here is the call graph for this function:

◆ retranslateUi()

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

◆ setDeckList()

void VisualDatabaseDisplayWidget::setDeckList ( const DeckList & new_deck_list_model)

◆ sortCardList()

void VisualDatabaseDisplayWidget::sortCardList ( const QStringList & properties,
Qt::SortOrder order = Qt::AscendingOrder ) const

Member Data Documentation

◆ cards

QList<ExactCard>* VisualDatabaseDisplayWidget::cards
private

◆ cardSizeWidget

CardSizeWidget* VisualDatabaseDisplayWidget::cardSizeWidget
private

◆ cardsPerPage

int VisualDatabaseDisplayWidget::cardsPerPage = 100
private

◆ clearFilterWidget

QToolButton* VisualDatabaseDisplayWidget::clearFilterWidget
private

◆ colorFilterWidget

VisualDatabaseDisplayColorFilterWidget* VisualDatabaseDisplayWidget::colorFilterWidget
private

◆ currentPage

int VisualDatabaseDisplayWidget::currentPage = 0
private

◆ databaseDisplayModel

CardDatabaseDisplayModel* VisualDatabaseDisplayWidget::databaseDisplayModel
private

◆ databaseLoadIndicator

QLabel* VisualDatabaseDisplayWidget::databaseLoadIndicator
private

◆ databaseView

CardDatabaseView* VisualDatabaseDisplayWidget::databaseView
private

◆ debounceTime

int VisualDatabaseDisplayWidget::debounceTime = 300
private

◆ debounceTimer

QTimer* VisualDatabaseDisplayWidget::debounceTimer
private

◆ displayModeButton

QPushButton* VisualDatabaseDisplayWidget::displayModeButton
private

◆ filterContainer

VisualDatabaseDisplayFilterToolbarWidget* VisualDatabaseDisplayWidget::filterContainer
private

◆ filterModel

FilterTreeModel* VisualDatabaseDisplayWidget::filterModel
private

◆ flowWidget

FlowWidget* VisualDatabaseDisplayWidget::flowWidget
private

◆ loadCardsTimer

QTimer* VisualDatabaseDisplayWidget::loadCardsTimer
private

◆ mainLayout

QVBoxLayout* VisualDatabaseDisplayWidget::mainLayout
private

◆ overlapCategories

QWidget* VisualDatabaseDisplayWidget::overlapCategories
private

◆ overlapCategoriesLayout

QVBoxLayout* VisualDatabaseDisplayWidget::overlapCategoriesLayout
private

◆ overlapControlWidget

OverlapControlWidget* VisualDatabaseDisplayWidget::overlapControlWidget
private

◆ scrollArea

QScrollArea* VisualDatabaseDisplayWidget::scrollArea
private

◆ searchContainer

FlowWidget* VisualDatabaseDisplayWidget::searchContainer
private

◆ searchEdit

SearchLineEdit* VisualDatabaseDisplayWidget::searchEdit
private

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