mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add a button to swap the card between mainboard and sideboard to the DeckEditor (#5175)
* Add a button to swap the card between mainboard and sideboard to the deck editor. * Add new icon to cockatrice.qrc and force update. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
b8cf3e2cab
commit
7496e79e8c
4 changed files with 23 additions and 2 deletions
|
|
@ -114,6 +114,12 @@ void TabDeckEditor::createDeckDock()
|
|||
auto *tbRemoveCard = new QToolButton(this);
|
||||
tbRemoveCard->setDefaultAction(aRemoveCard);
|
||||
|
||||
aSwapCard = new QAction(QString(), this);
|
||||
aSwapCard->setIcon(QPixmap("theme:icons/swap"));
|
||||
connect(aSwapCard, SIGNAL(triggered()), this, SLOT(actSwapCard()));
|
||||
auto *tbSwapCard = new QToolButton(this);
|
||||
tbSwapCard->setDefaultAction(aSwapCard);
|
||||
|
||||
auto *upperLayout = new QGridLayout;
|
||||
upperLayout->setObjectName("upperLayout");
|
||||
upperLayout->addWidget(nameLabel, 0, 0);
|
||||
|
|
@ -139,7 +145,8 @@ void TabDeckEditor::createDeckDock()
|
|||
lowerLayout->addWidget(tbIncrement, 0, 2);
|
||||
lowerLayout->addWidget(tbDecrement, 0, 3);
|
||||
lowerLayout->addWidget(tbRemoveCard, 0, 4);
|
||||
lowerLayout->addWidget(deckView, 1, 0, 1, 5);
|
||||
lowerLayout->addWidget(tbSwapCard, 0, 5);
|
||||
lowerLayout->addWidget(deckView, 1, 0, 1, 6);
|
||||
|
||||
// Create widgets for both layouts to make splitter work correctly
|
||||
auto *topWidget = new QWidget;
|
||||
|
|
@ -1298,6 +1305,7 @@ void TabDeckEditor::actSwapCard()
|
|||
|
||||
setModified(true);
|
||||
setSaveStatus(true);
|
||||
update();
|
||||
}
|
||||
|
||||
void TabDeckEditor::actAddCard()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue