Add some todos.

This commit is contained in:
Lukas Brübach 2025-01-06 11:28:44 +01:00
parent f5dcf522f1
commit 0bf61191a8
2 changed files with 3 additions and 0 deletions

View file

@ -26,6 +26,7 @@ DeckPreviewCardPictureWidget::DeckPreviewCardPictureWidget(QWidget *parent,
const Qt::Alignment alignment)
: CardInfoPictureWithTextOverlayWidget(parent, hoverToZoomEnabled, textColor, outlineColor, fontSize, alignment)
{
// TODO Make this hold the deckloader
singleClickTimer = new QTimer(this);
singleClickTimer->setSingleShot(true);
connect(singleClickTimer, &QTimer::timeout, this, [this]() { emit imageClicked(lastMouseEvent, this); });

View file

@ -96,6 +96,8 @@ void VisualDeckStorageWidget::refreshBannerCards()
flowWidget->clearLayout(); // Clear existing widgets in the flow layout
foreach (const QString &file, filteredFiles) {
// TODO: We load the deck here to retrieve information (we sorta really have to) but since we do the work,
// we may as well persist the deckLoader to save ourselves some heavy lifting later?
auto deckLoader = new DeckLoader();
deckLoader->loadFromFile(file, DeckLoader::CockatriceFormat);
deckListModel->setDeckList(new DeckLoader(*deckLoader));