mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-22 22:53:55 -07:00
[TabDeckEditor] Refactor: pull up showPrintingSelector (#6964)
* [TabDeckEditor] Refactor: pull up showPrintingSelector * trailing newline
This commit is contained in:
parent
e0cbb7f06c
commit
46d3b820db
6 changed files with 9 additions and 29 deletions
|
|
@ -588,3 +588,10 @@ bool AbstractTabDeckEditor::closeRequest()
|
||||||
}
|
}
|
||||||
return close();
|
return close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AbstractTabDeckEditor::showPrintingSelector()
|
||||||
|
{
|
||||||
|
printingSelectorDockWidget->printingSelector->setCard(cardInfoDockWidget->cardInfo->getCard().getCardPtr());
|
||||||
|
printingSelectorDockWidget->printingSelector->updateDisplay();
|
||||||
|
printingSelectorDockWidget->setVisible(true);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,8 +172,8 @@ public slots:
|
||||||
/** @brief Requests closing the tab. */
|
/** @brief Requests closing the tab. */
|
||||||
bool closeRequest() override;
|
bool closeRequest() override;
|
||||||
|
|
||||||
/** @brief Shows the printing selector dock. Pure virtual. */
|
/** @brief Shows the printing selector dock and updates it with the current card. */
|
||||||
virtual void showPrintingSelector() = 0;
|
void showPrintingSelector();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/** @brief Emitted when a deck should be opened in a new editor tab. */
|
/** @brief Emitted when a deck should be opened in a new editor tab. */
|
||||||
|
|
|
||||||
|
|
@ -120,16 +120,6 @@ void TabDeckEditor::refreshShortcuts()
|
||||||
aResetLayout->setShortcuts(shortcuts.getShortcut("TabDeckEditor/aResetLayout"));
|
aResetLayout->setShortcuts(shortcuts.getShortcut("TabDeckEditor/aResetLayout"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Displays the printing selector dock with the current card.
|
|
||||||
*/
|
|
||||||
void TabDeckEditor::showPrintingSelector()
|
|
||||||
{
|
|
||||||
printingSelectorDockWidget->printingSelector->setCard(cardInfoDockWidget->cardInfo->getCard().getCardPtr());
|
|
||||||
printingSelectorDockWidget->printingSelector->updateDisplay();
|
|
||||||
printingSelectorDockWidget->setVisible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Loads deck editor layout from settings or resets to default.
|
* @brief Loads deck editor layout from settings or resets to default.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ public:
|
||||||
|
|
||||||
/** @brief Creates menus for deck editing and view options. */
|
/** @brief Creates menus for deck editing and view options. */
|
||||||
void createMenus() override;
|
void createMenus() override;
|
||||||
|
|
||||||
public slots:
|
|
||||||
/** @brief Shows the printing selector dock and updates it with current card. */
|
|
||||||
void showPrintingSelector() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -233,14 +233,6 @@ bool TabDeckEditorVisual::actSaveDeckAs()
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief Shows the printing selector dock and updates it with the current card. */
|
|
||||||
void TabDeckEditorVisual::showPrintingSelector()
|
|
||||||
{
|
|
||||||
printingSelectorDockWidget->printingSelector->setCard(cardInfoDockWidget->cardInfo->getCard().getCardPtr());
|
|
||||||
printingSelectorDockWidget->printingSelector->updateDisplay();
|
|
||||||
printingSelectorDockWidget->setVisible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @brief Refreshes keyboard shortcuts for this tab from settings. */
|
/** @brief Refreshes keyboard shortcuts for this tab from settings. */
|
||||||
void TabDeckEditorVisual::refreshShortcuts()
|
void TabDeckEditorVisual::refreshShortcuts()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -144,11 +144,6 @@ public slots:
|
||||||
*/
|
*/
|
||||||
void onDeckChanged() override;
|
void onDeckChanged() override;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Show the printing selector dock for the currently active card.
|
|
||||||
*/
|
|
||||||
void showPrintingSelector() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Handle card clicks in the mainboard visual deck.
|
* @brief Handle card clicks in the mainboard visual deck.
|
||||||
* @param event Mouse event triggering the action.
|
* @param event Mouse event triggering the action.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue