TabDeckEditorVisual provides a fully-featured deck editor tab with an enhanced visual interface. It extends AbstractTabDeckEditor.
More...
#include <tab_deck_editor_visual.h>
|
| void | setDeck (const LoadedDeck &_deck) override |
| | Sets the deck for this tab and selects the sub-tab to open on startup, per the "Visual deck editor startup tab" setting (Context / Deck display / Database display).
|
TabDeckEditorVisual provides a fully-featured deck editor tab with an enhanced visual interface. It extends AbstractTabDeckEditor.
Description: TabDeckEditorVisual is a fully-featured deck editor tab with an enhanced visual interface. It extends AbstractTabDeckEditor and integrates multiple visual components such as a visual deck view, database display, deck analytics, and sample hand preview.
Purpose:
- Provides an intuitive, visual interface for deck editing.
- Combines visual deck representation, card database browsing, and analytics into one tab.
- Supports card interactions via clicks, hover events, and drag-and-drop-like behavior (not yet).
Dock Widgets and Components:
Key Methods:
◆ TabDeckEditorVisual()
| TabDeckEditorVisual::TabDeckEditorVisual |
( |
TabSupervisor * | _tabSupervisor | ) |
|
|
explicit |
Constructs a visual deck editor tab.
Constructs the TabDeckEditorVisual instance.
- Parameters
-
| _tabSupervisor | Pointer to the tab supervisor managing this tab. |
Sets up the central widget, tab container, menus, shortcuts, and restores the saved layout.
- Parameters
-
| _tabSupervisor | Parent tab supervisor managing this tab. |
◆ actSaveDeckAs
| bool TabDeckEditorVisual::actSaveDeckAs |
( |
| ) |
|
|
overrideslot |
Save the deck under a new name.
Performs "Save Deck As..." while temporarily disabling the search bar.
- Returns
- true if successful, false otherwise.
◆ changeModelIndexAndCardInfo()
| void TabDeckEditorVisual::changeModelIndexAndCardInfo |
( |
const ExactCard & | activeCard | ) |
|
Update the currently selected card in the deck and UI.
Updates card info and highlights the corresponding card in the deck view.
- Parameters
-
| activeCard | Card to display. |
◆ changeModelIndexToCard()
| void TabDeckEditorVisual::changeModelIndexToCard |
( |
const ExactCard & | activeCard | ) |
|
Change the deck view selection to a specific card.
Selects the given card in the deck view, checking main and side zones.
- Parameters
-
| activeCard | Card to select in the deck view. |
◆ createCentralFrame()
| void TabDeckEditorVisual::createCentralFrame |
( |
| ) |
|
Create central frame for visual widgets.
Creates the central frame containing the tab container.
◆ createDeckAnalyticsDock()
| void TabDeckEditorVisual::createDeckAnalyticsDock |
( |
| ) |
|
Create the deck analytics dock widget.
◆ createMenus()
| void TabDeckEditorVisual::createMenus |
( |
| ) |
|
|
overridevirtual |
Setup menus for this visual deck editor.
Creates menus for deck editing and view options, including dock actions.
Implements AbstractTabDeckEditor.
◆ createSearchAndDatabaseFrame()
| void TabDeckEditorVisual::createSearchAndDatabaseFrame |
( |
| ) |
|
Create search and database display frame.
◆ eventFilter
| bool TabDeckEditorVisual::eventFilter |
( |
QObject * | o, |
|
|
QEvent * | e ) |
|
overrideprotectedslot |
Synchronize dock state with menu items.
Handles dock visibility, floating, and layout saving events.
- Parameters
-
| o | The object sending the event. |
| e | The event being filtered. |
- Returns
- true if the event is handled, false otherwise.
Keeps dock state in sync with menu items and saves layout when hidden.
◆ getTabText()
| QString TabDeckEditorVisual::getTabText |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Get the display text for the tab.
Returns the tab text, prepending a mark if the deck has unsaved changes.
- Returns
- Tab text with optional modification indicator.
Implements AbstractTabDeckEditor.
◆ loadLayout
| void TabDeckEditorVisual::loadLayout |
( |
| ) |
|
|
overrideprotectedslot |
Load the editor layout from settings.
Loads the saved layout or resets to default if no layout exists.
◆ onDeckChanged
| void TabDeckEditorVisual::onDeckChanged |
( |
| ) |
|
|
overrideslot |
Refresh UI when the deck changes.
Updates the visual deck, analytics, and sample hand after a deck change.
◆ processDatabaseCardClick
| void TabDeckEditorVisual::processDatabaseCardClick |
( |
const QMouseEvent * | event, |
|
|
const ExactCard & | card ) |
|
slot |
Handle card clicks in the database visual display.
Handles clicks on cards in the database display.
- Parameters
-
| event | Mouse event triggering the action. |
| card | The clicked card. |
◆ processMainboardCardClick
| void TabDeckEditorVisual::processMainboardCardClick |
( |
const QMouseEvent * | event, |
|
|
const ExactCard & | card, |
|
|
const QString & | zoneName ) |
|
slot |
Handle card clicks in the mainboard visual deck.
- Parameters
-
| event | Mouse event triggering the action. |
| card | The clicked card. |
| zoneName | Deck zone of the card. |
◆ refreshShortcuts
| void TabDeckEditorVisual::refreshShortcuts |
( |
| ) |
|
|
overrideprotectedslot |
Refresh keyboard shortcuts for this tab.
Refreshes keyboard shortcuts for this tab from settings.
◆ restartLayout
| void TabDeckEditorVisual::restartLayout |
( |
| ) |
|
|
overrideprotectedslot |
Reset and restart the layout to default.
Resets the layout to default positions and dock states.
◆ retranslateUi()
| void TabDeckEditorVisual::retranslateUi |
( |
| ) |
|
|
overridevirtual |
Retranslate UI strings (for i18n support).
Retranslates UI elements for localization.
Implements AbstractTabDeckEditor.
◆ setDeck()
| void TabDeckEditorVisual::setDeck |
( |
const LoadedDeck & | _deck | ) |
|
|
overrideprivatevirtual |
Sets the deck for this tab and selects the sub-tab to open on startup, per the "Visual deck editor startup tab" setting (Context / Deck display / Database display).
Sets the deck and selects the startup sub-tab matching the context.
- Parameters
-
Reimplemented from AbstractTabDeckEditor.
◆ centralFrame
| QVBoxLayout* TabDeckEditorVisual::centralFrame |
|
protected |
Layout for central widgets.
◆ centralWidget
| QWidget* TabDeckEditorVisual::centralWidget |
|
protected |
Central widget of the editor.
◆ searchAndDatabaseDock
| QDockWidget* TabDeckEditorVisual::searchAndDatabaseDock |
|
protected |
Dock widget for search/database display.
◆ searchAndDatabaseFrame
| QVBoxLayout* TabDeckEditorVisual::searchAndDatabaseFrame |
|
protected |
Layout for search and database display.
◆ searchLayout
| QHBoxLayout* TabDeckEditorVisual::searchLayout |
|
protected |
◆ tabContainer
Tab container holding different visual widgets.
The documentation for this class was generated from the following files: