Printing Selector Bulk Editor (#5993)

* Bulk editing dialog.

* Bulk editing dialog functionality.

* Performance fixes, hide sets which can't offer any new cards, better dragging indicators.

* Update count label.

* Add a display for modified cards.

* Include long setName in checkbox label

* Fix drag & drop.

* New layout updating?

* Re-layout, add instruction label.

* Qt version check.

* Add buttons to clear and set all to preferred printing.

* tr UI

* Add the button to the print selector instead.

* Qt5 compatibility stuff.

* Qt5 compatibility stuff again.

* Toggled works, I guess.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-06-22 03:15:48 +02:00 committed by GitHub
parent f4569c513f
commit 53e27ff4d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 848 additions and 9 deletions

View file

@ -1,5 +1,6 @@
#include "printing_selector.h"
#include "../../../../dialogs/dlg_select_set_for_cards.h"
#include "../../../../settings/cache_settings.h"
#include "../../picture_loader/picture_loader.h"
#include "printing_selector_card_display_widget.h"

View file

@ -9,6 +9,7 @@
#include <QCheckBox>
#include <QLabel>
#include <QPushButton>
#include <QTreeView>
#include <QVBoxLayout>
#include <QWidget>
@ -29,6 +30,10 @@ public:
void setCard(const CardInfoPtr &newCard, const QString &_currentZone);
void getAllSetsForCurrentCard();
DeckListModel *getDeckModel() const
{
return deckModel;
};
public slots:
void retranslateUi();

View file

@ -1,5 +1,7 @@
#include "printing_selector_card_selection_widget.h"
#include "../../../../dialogs/dlg_select_set_for_cards.h"
/**
* @brief Constructs a PrintingSelectorCardSelectionWidget for navigating through cards in the deck.
*
@ -16,12 +18,18 @@ PrintingSelectorCardSelectionWidget::PrintingSelectorCardSelectionWidget(Printin
previousCardButton = new QPushButton(this);
previousCardButton->setText(tr("Previous Card in Deck"));
selectSetForCardsButton = new QPushButton(this);
connect(selectSetForCardsButton, &QPushButton::clicked, this,
&PrintingSelectorCardSelectionWidget::selectSetForCards);
selectSetForCardsButton->setText(tr("Bulk Selection"));
nextCardButton = new QPushButton(this);
nextCardButton->setText(tr("Next Card in Deck"));
connectSignals();
cardSelectionBarLayout->addWidget(previousCardButton);
cardSelectionBarLayout->addWidget(selectSetForCardsButton);
cardSelectionBarLayout->addWidget(nextCardButton);
}
@ -36,3 +44,11 @@ void PrintingSelectorCardSelectionWidget::connectSignals()
connect(previousCardButton, &QPushButton::clicked, parent, &PrintingSelector::selectPreviousCard);
connect(nextCardButton, &QPushButton::clicked, parent, &PrintingSelector::selectNextCard);
}
void PrintingSelectorCardSelectionWidget::selectSetForCards()
{
DlgSelectSetForCards *setSelectionDialog = new DlgSelectSetForCards(nullptr, parent->getDeckModel());
if (!setSelectionDialog->exec()) {
return;
}
}

View file

@ -16,10 +16,14 @@ public:
void connectSignals();
public slots:
void selectSetForCards();
private:
PrintingSelector *parent;
QHBoxLayout *cardSelectionBarLayout;
QPushButton *previousCardButton;
QPushButton *selectSetForCardsButton;
QPushButton *nextCardButton;
};