mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-22 14:53:53 -07:00
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:
parent
f4569c513f
commit
53e27ff4d3
12 changed files with 848 additions and 9 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,10 +16,14 @@ public:
|
|||
|
||||
void connectSignals();
|
||||
|
||||
public slots:
|
||||
void selectSetForCards();
|
||||
|
||||
private:
|
||||
PrintingSelector *parent;
|
||||
QHBoxLayout *cardSelectionBarLayout;
|
||||
QPushButton *previousCardButton;
|
||||
QPushButton *selectSetForCardsButton;
|
||||
QPushButton *nextCardButton;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue