TabDeckEditorVisual provides a fully-featured deck editor tab with an enhanced visual interface. It extends AbstractTabDeckEditor. More...
#include <tab_deck_editor_visual.h>
Public Slots | |
| void | onDeckChanged () override |
| Refresh UI when the deck changes. | |
| void | showPrintingSelector () override |
| Show the printing selector dock for the currently active card. | |
| void | processMainboardCardClick (QMouseEvent *event, CardInfoPictureWithTextOverlayWidget *instance, const QString &zoneName) |
| Handle card clicks in the mainboard visual deck. | |
| void | processCardClickDatabaseDisplay (QMouseEvent *event, CardInfoPictureWithTextOverlayWidget *instance) |
| Handle card clicks in the database visual display. | |
| bool | actSaveDeckAs () override |
| Save the deck under a new name. | |
| Public Slots inherited from AbstractTabDeckEditor | |
| virtual void | onDeckChanged () |
| Called when the deck changes. | |
| virtual void | onDeckModified () |
| Called when the deck is modified. | |
| virtual void | onDeckHistorySaveRequested (const QString &modificationReason) |
| Called when a widget is about to modify the state of the DeckList. | |
| virtual void | onDeckHistoryClearRequested () |
| Called when a widget would like to clear the history. | |
| void | updateCard (const ExactCard &card) |
| Updates the card info panel. | |
| void | actAddCard (const ExactCard &card) |
| Adds a card to the main deck or sideboard based on Ctrl key. | |
| void | actAddCardToSideboard (const ExactCard &card) |
| Adds a card to the sideboard explicitly. | |
| void | actDecrementCard (const ExactCard &card) |
| Decrements a card from the main deck. | |
| void | actDecrementCardFromSideboard (const ExactCard &card) |
| Decrements a card from the sideboard. | |
| void | actOpenRecent (const QString &fileName) |
| Opens a recently opened deck file. | |
| void | filterTreeChanged (FilterTree *filterTree) |
| Called when the filter tree changes. | |
| bool | closeRequest () override |
| Requests closing the tab. | |
| virtual void | showPrintingSelector ()=0 |
| Shows the printing selector dock. Pure virtual. | |
| virtual void | dockTopLevelChanged (bool topLevel)=0 |
| Slot for when a dock's top-level state changes. Pure virtual. | |
Public Member Functions | |
| TabDeckEditorVisual (TabSupervisor *_tabSupervisor) | |
| Constructs a visual deck editor tab. | |
| void | retranslateUi () override |
| Retranslate UI strings (for i18n support). | |
| QString | getTabText () const override |
| Get the display text for the tab. | |
| void | changeModelIndexAndCardInfo (const ExactCard &activeCard) |
| Update the currently selected card in the deck and UI. | |
| void | changeModelIndexToCard (const ExactCard &activeCard) |
| Change the deck view selection to a specific card. | |
| void | createDeckAnalyticsDock () |
| Create the deck analytics dock widget. | |
| void | createMenus () override |
| Setup menus for this visual deck editor. | |
| void | createSearchAndDatabaseFrame () |
| Create search and database display frame. | |
| void | createCentralFrame () |
| Create central frame for visual widgets. | |
| Public Member Functions inherited from AbstractTabDeckEditor | |
| AbstractTabDeckEditor (TabSupervisor *_tabSupervisor) | |
| Constructs an AbstractTabDeckEditor. | |
| bool | confirmClose () |
| Confirms whether the tab can be safely closed. | |
| void | openDeck (DeckLoader *deck) |
| Opens a deck in this tab. | |
| DeckLoader * | getDeckLoader () const |
| Returns the currently active deck loader. | |
| DeckList * | getDeckList () const |
| Returns the currently active deck list. | |
| void | setModified (bool _windowModified) |
| Sets the modified state of the tab. | |
| DeckEditorDeckDockWidget * | getDeckDockWidget () const |
| DeckListHistoryManager * | getHistoryManager () const |
| Public Member Functions inherited from Tab | |
| Tab (TabSupervisor *_tabSupervisor) | |
| const QList< QMenu * > & | getTabMenus () const |
| TabSupervisor * | getTabSupervisor () const |
| bool | getContentsChanged () const |
| void | setContentsChanged (bool _contentsChanged) |
| virtual bool | closeRequest () |
| virtual void | tabActivated () |
Protected Slots | |
| void | loadLayout () override |
| Load the editor layout from settings. | |
| void | restartLayout () override |
| Reset and restart the layout to default. | |
| void | freeDocksSize () override |
| Set size restrictions for free floating dock widgets. | |
| void | refreshShortcuts () override |
| Refresh keyboard shortcuts for this tab. | |
| bool | eventFilter (QObject *o, QEvent *e) override |
| Synchronize dock state with menu items. | |
| void | dockVisibleTriggered () override |
| Triggered when a dock visibility menu item is clicked. | |
| void | dockFloatingTriggered () override |
| Triggered when a dock floating menu item is clicked. | |
| void | dockTopLevelChanged (bool topLevel) override |
| Triggered when a dock top-level state changes. | |
| Protected Slots inherited from AbstractTabDeckEditor | |
| virtual void | actNewDeck () |
| Starts a new deck in this tab. | |
| void | cleanDeckAndResetModified () |
| Cleans the current deck and resets the modified state. | |
| virtual void | actLoadDeck () |
| Loads a deck from file. | |
| bool | actSaveDeck () |
| Saves the current deck. | |
| virtual bool | actSaveDeckAs () |
| Saves the current deck under a new name. | |
| virtual void | actLoadDeckFromClipboard () |
| Loads a deck from the clipboard. | |
| void | actEditDeckInClipboard () |
| Opens a deck editor for clipboard contents. | |
| void | actEditDeckInClipboardRaw () |
| Opens a raw clipboard deck editor. | |
| void | actSaveDeckToClipboard () |
| Saves deck to clipboard with full info. | |
| void | actSaveDeckToClipboardNoSetInfo () |
| Saves deck to clipboard without set info. | |
| void | actSaveDeckToClipboardRaw () |
| Saves deck to clipboard in raw format. | |
| void | actSaveDeckToClipboardRawNoSetInfo () |
| Saves deck to clipboard in raw format without set info. | |
| void | actPrintDeck () |
| Prints the deck using a preview dialog. | |
| void | actLoadDeckFromWebsite () |
| Loads a deck from an online website. | |
| void | actExportDeckDecklist () |
| Exports the deck to decklist.org. | |
| void | actExportDeckDecklistXyz () |
| Exports the deck to decklist.xyz. | |
| void | actAnalyzeDeckDeckstats () |
| Analyzes the deck using deckstats.net. | |
| void | actAnalyzeDeckTappedout () |
| Analyzes the deck using tappedout.net. | |
| void | saveDeckRemoteFinished (const Response &r) |
| Callback when a remote deck save finishes. | |
| virtual void | loadLayout ()=0 |
| virtual void | restartLayout ()=0 |
| virtual void | freeDocksSize ()=0 |
| virtual void | refreshShortcuts ()=0 |
| void | closeEvent (QCloseEvent *event) override |
| Handles dock close events. | |
| bool | eventFilter (QObject *o, QEvent *e) override |
| Event filter for dock state changes. | |
| virtual void | dockVisibleTriggered ()=0 |
| Slot triggered when a dock visibility changes. Pure virtual. | |
| virtual void | dockFloatingTriggered ()=0 |
| Slot triggered when a dock floating state changes. Pure virtual. | |
| Protected Slots inherited from Tab | |
| void | showCardInfoPopup (const QPoint &pos, const CardRef &cardRef) |
| void | deleteCardInfoPopup (const QString &cardName) |
Protected Attributes | |
| TabDeckEditorVisualTabWidget * | tabContainer |
| Tab container holding different visual widgets. | |
| QVBoxLayout * | centralFrame |
| Layout for central widgets. | |
| QVBoxLayout * | searchAndDatabaseFrame |
| Layout for search and database display. | |
| QHBoxLayout * | searchLayout |
| Layout for search bar. | |
| QDockWidget * | searchAndDatabaseDock |
| Dock widget for search/database display. | |
| QWidget * | centralWidget |
| Central widget of the editor. | |
| Protected Attributes inherited from AbstractTabDeckEditor | |
| QMenu * | viewMenu |
| QMenu * | cardInfoDockMenu |
| QMenu * | deckDockMenu |
| QMenu * | filterDockMenu |
| QMenu * | printingSelectorDockMenu |
| QAction * | aResetLayout |
| QAction * | aCardInfoDockVisible |
| QAction * | aCardInfoDockFloating |
| QAction * | aDeckDockVisible |
| QAction * | aDeckDockFloating |
| QAction * | aFilterDockVisible |
| QAction * | aFilterDockFloating |
| QAction * | aPrintingSelectorDockVisible |
| QAction * | aPrintingSelectorDockFloating |
| bool | modified = false |
| Whether the deck/tab has unsaved changes. | |
| Protected Attributes inherited from Tab | |
| TabSupervisor * | tabSupervisor |
Additional Inherited Members | |
| Signals inherited from AbstractTabDeckEditor | |
| void | openDeckEditor (DeckLoader *deckLoader) |
| Emitted when a deck should be opened in a new editor tab. | |
| void | deckEditorClosing (AbstractTabDeckEditor *tab) |
| Emitted before the tab is closed. | |
| void | decrementCard (const ExactCard &card, QString zoneName) |
| Emitted when a card should be decremented. | |
| Signals inherited from Tab | |
| void | userEvent (bool globalEvent=true) |
| void | tabTextChanged (Tab *tab, const QString &newTabText) |
| Public Attributes inherited from AbstractTabDeckEditor | |
| DeckListHistoryManager * | historyManager |
| DeckEditorMenu * | deckMenu |
| Menu for deck operations. | |
| DeckEditorDatabaseDisplayWidget * | databaseDisplayDockWidget |
| Database dock. | |
| DeckEditorCardInfoDockWidget * | cardInfoDockWidget |
| Card info dock. | |
| DeckEditorDeckDockWidget * | deckDockWidget |
| Deck dock. | |
| DeckEditorFilterDockWidget * | filterDockWidget |
| Filter dock. | |
| DeckEditorPrintingSelectorDockWidget * | printingSelectorDockWidget |
| Printing selector dock. | |
| Protected Types inherited from AbstractTabDeckEditor | |
| enum | DeckOpenLocation { CANCELLED , SAME_TAB , NEW_TAB } |
| Enum describing deck open locations. More... | |
| Protected Member Functions inherited from AbstractTabDeckEditor | |
| DeckOpenLocation | confirmOpen (bool openInSameTabIfBlank=true) |
| Confirms deck open action based on settings and modified state. | |
| QMessageBox * | createSaveConfirmationWindow () |
| Creates a save confirmation message box. | |
| bool | isBlankNewDeck () const |
| Returns true if the tab is a blank newly created deck. | |
| void | addCardHelper (const ExactCard &card, QString zoneName) |
| Helper function to add a card to a specific deck zone. | |
| void | actSwapCard (const ExactCard &card, const QString &zoneName) |
| Swaps a card in the deck view. | |
| virtual void | openDeckFromFile (const QString &fileName, DeckOpenLocation deckOpenLocation) |
| Opens a deck from a file. | |
| Protected Member Functions inherited from Tab | |
| void | addTabMenu (QMenu *menu) |
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:
Dock Widgets and Components:
Key Methods:
|
explicit |
Constructs a visual deck editor tab.
Constructs the TabDeckEditorVisual instance.
| _tabSupervisor | Pointer to the tab supervisor managing this tab. |
Sets up the central widget, tab container, menus, shortcuts, and restores the saved layout.
| _tabSupervisor | Parent tab supervisor managing this tab. |
|
overrideslot |
Save the deck under a new name.
Performs "Save Deck As..." while temporarily disabling the search bar.
| 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.
| activeCard | Card to display. |
| 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.
| activeCard | Card to select in the deck view. |
| void TabDeckEditorVisual::createCentralFrame | ( | ) |
Create central frame for visual widgets.
Creates the central frame containing the tab container.
| void TabDeckEditorVisual::createDeckAnalyticsDock | ( | ) |
Create the deck analytics dock widget.
|
overridevirtual |
Setup menus for this visual deck editor.
Creates menus for deck editing and view options, including dock actions.
Implements AbstractTabDeckEditor.
| void TabDeckEditorVisual::createSearchAndDatabaseFrame | ( | ) |
Create search and database display frame.
|
overrideprotectedslot |
Triggered when a dock floating menu item is clicked.
Toggles dock floating state based on the corresponding menu action.
|
overrideprotectedslot |
Triggered when a dock top-level state changes.
Updates menu checkboxes when a dock's top-level/floating state changes.
| topLevel | True if the dock became floating. |
|
overrideprotectedslot |
Triggered when a dock visibility menu item is clicked.
Toggles dock visibility based on the corresponding menu action.
|
overrideprotectedslot |
Synchronize dock state with menu items.
Handles dock visibility, floating, and layout saving events.
| o | The object sending the event. |
| e | The event being filtered. |
Keeps dock state in sync with menu items and saves layout when hidden.
|
overrideprotectedslot |
Set size restrictions for free floating dock widgets.
|
nodiscardoverridevirtual |
Get the display text for the tab.
Returns the tab text, prepending a mark if the deck has unsaved changes.
Implements AbstractTabDeckEditor.
|
overrideprotectedslot |
Load the editor layout from settings.
Loads the saved layout or resets to default if no layout exists.
|
overrideslot |
Refresh UI when the deck changes.
Updates the visual deck, analytics, and sample hand after a deck change.
|
slot |
Handle card clicks in the database visual display.
Handles clicks on cards in the database display.
| event | Mouse event triggering the action. |
| instance | Widget representing the clicked card. |
|
slot |
Handle card clicks in the mainboard visual deck.
| event | Mouse event triggering the action. |
| instance | Widget representing the clicked card. |
| zoneName | Deck zone of the card. |
|
overrideprotectedslot |
Refresh keyboard shortcuts for this tab.
Refreshes keyboard shortcuts for this tab from settings.
|
overrideprotectedslot |
Reset and restart the layout to default.
Resets the layout to default positions and dock states.
|
overridevirtual |
Retranslate UI strings (for i18n support).
Retranslates UI elements for localization.
Implements AbstractTabDeckEditor.
|
overrideslot |
Show the printing selector dock for the currently active card.
Shows the printing selector dock and updates it with the current card.
|
protected |
Layout for central widgets.
|
protected |
Central widget of the editor.
|
protected |
Dock widget for search/database display.
|
protected |
Layout for search and database display.
|
protected |
Layout for search bar.
|
protected |
Tab container holding different visual widgets.