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);
|
||||
|
||||
// Connect sorting change signal to refresh the file list
|
||||
connect(sortComboBox, &QComboBox::currentIndexChanged, this, [this]() {
|
||||
sortOrder = static_cast<SortOrder>(sortComboBox->currentData().toInt());
|
||||
refreshBannerCards(); // Refresh the banner cards with the new sort order
|
||||
});
|
||||
connect(sortComboBox, &QComboBox::currentIndexChanged, this, &VisualDeckStorageWidget::updateSortOrder);
|
||||
}
|
||||
|
||||
void VisualDeckStorageWidget::showEvent(QShowEvent *event)
|
||||
|
|
@ -47,6 +44,12 @@ void VisualDeckStorageWidget::showEvent(QShowEvent *event)
|
|||
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)
|
||||
{
|
||||
emit imageClicked(event, instance);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ public slots:
|
|||
void imageDoubleClickedEvent(QMouseEvent *event, DeckPreviewCardPictureWidget *instance);
|
||||
void refreshBannerCards(); // Refresh the display of cards based on the current sorting option
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void updateSortOrder();
|
||||
|
||||
signals:
|
||||
void imageClicked(QMouseEvent *event, DeckPreviewCardPictureWidget *instance);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue