mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
Non-lambda.
This commit is contained in:
parent
ac3a128c85
commit
1d093d62b5
2 changed files with 8 additions and 4 deletions
|
|
@ -35,10 +35,7 @@ VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(pare
|
||||||
layout->addWidget(cardSizeWidget);
|
layout->addWidget(cardSizeWidget);
|
||||||
|
|
||||||
// Connect sorting change signal to refresh the file list
|
// Connect sorting change signal to refresh the file list
|
||||||
connect(sortComboBox, &QComboBox::currentIndexChanged, this, [this]() {
|
connect(sortComboBox, &QComboBox::currentIndexChanged, this, &VisualDeckStorageWidget::updateSortOrder);
|
||||||
sortOrder = static_cast<SortOrder>(sortComboBox->currentData().toInt());
|
|
||||||
refreshBannerCards(); // Refresh the banner cards with the new sort order
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDeckStorageWidget::showEvent(QShowEvent *event)
|
void VisualDeckStorageWidget::showEvent(QShowEvent *event)
|
||||||
|
|
@ -47,6 +44,12 @@ void VisualDeckStorageWidget::showEvent(QShowEvent *event)
|
||||||
refreshBannerCards();
|
refreshBannerCards();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VisualDeckStorageWidget::updateSortOrder()
|
||||||
|
{
|
||||||
|
sortOrder = static_cast<SortOrder>(sortComboBox->currentData().toInt());
|
||||||
|
refreshBannerCards(); // Refresh the banner cards with the new sort order
|
||||||
|
}
|
||||||
|
|
||||||
void VisualDeckStorageWidget::imageClickedEvent(QMouseEvent *event, DeckPreviewCardPictureWidget *instance)
|
void VisualDeckStorageWidget::imageClickedEvent(QMouseEvent *event, DeckPreviewCardPictureWidget *instance)
|
||||||
{
|
{
|
||||||
emit imageClicked(event, instance);
|
emit imageClicked(event, instance);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ public slots:
|
||||||
void imageDoubleClickedEvent(QMouseEvent *event, DeckPreviewCardPictureWidget *instance);
|
void imageDoubleClickedEvent(QMouseEvent *event, DeckPreviewCardPictureWidget *instance);
|
||||||
void refreshBannerCards(); // Refresh the display of cards based on the current sorting option
|
void refreshBannerCards(); // Refresh the display of cards based on the current sorting option
|
||||||
void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
|
void updateSortOrder();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void imageClicked(QMouseEvent *event, DeckPreviewCardPictureWidget *instance);
|
void imageClicked(QMouseEvent *event, DeckPreviewCardPictureWidget *instance);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue