AbstractTabDeckEditor is the base class for all deck editor tabs. More...
#include <abstract_tab_deck_editor.h>
Classes | |
| struct | DockActions |
| The actions associated with managing a QDockWidget. More... | |
Public Slots | |
| virtual void | onDeckChanged () |
| Called when the deck changes. | |
| virtual void | onDeckModified () |
| Called when the deck is modified. | |
| 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. | |
Signals | |
| void | openDeckEditor (const LoadedDeck &deck) |
| Emitted when a deck should be opened in a new editor tab. | |
| void | deckEditorClosing (AbstractTabDeckEditor *tab) |
| Emitted before the tab is closed. | |
| Signals inherited from Tab | |
| void | userEvent (bool globalEvent=true) |
| void | tabTextChanged (Tab *tab, const QString &newTabText) |
Public Member Functions | |
| AbstractTabDeckEditor (TabSupervisor *_tabSupervisor) | |
| Constructs an AbstractTabDeckEditor. | |
| virtual void | createMenus ()=0 |
| Creates the menus for this tab. Pure virtual. | |
| virtual QString | getTabText () const override=0 |
| Returns the display text for the tab. | |
| bool | confirmClose () |
| Confirms whether the tab can be safely closed. | |
| virtual void | retranslateUi () override=0 |
| Retranslates the UI text. Pure virtual. | |
| void | openDeck (const LoadedDeck &deck) |
| Opens a deck in this tab. | |
| DeckEditorDeckDockWidget * | getDeckDockWidget () 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 () |
Public Attributes | |
| DeckStateManager * | deckStateManager |
| DeckEditorMenu * | deckMenu |
| Menu for deck operations. | |
| DeckEditorCardDatabaseDockWidget * | cardDatabaseDockWidget |
| Database dock. | |
| DeckEditorCardInfoDockWidget * | cardInfoDockWidget |
| Card info dock. | |
| DeckEditorDeckDockWidget * | deckDockWidget |
| Deck dock. | |
| DeckEditorFilterDockWidget * | filterDockWidget |
| Filter dock. | |
| DeckEditorPrintingSelectorDockWidget * | printingSelectorDockWidget |
| Printing selector dock. | |
Protected Types | |
| enum | DeckOpenLocation { CANCELLED , SAME_TAB , NEW_TAB } |
| Enum describing deck open locations. More... | |
Protected Slots | |
| 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. | |
| 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 Member Functions | |
| void | registerDockWidget (QDockWidget *widget) |
| registers a QDockWidget as a managed dock widget. Creates the associated actions and menu, adds them to the viewMenu, and connects those actions to the tab's slots. | |
| DeckOpenLocation | confirmOpen (bool openInSameTabIfBlank=true) |
| Confirms deck open action based on settings and modified state. | |
| QMessageBox * | createSaveConfirmationWindow () |
| Creates a save confirmation message box. | |
| void | addCardHelper (const ExactCard &card, const QString &zoneName) |
| Helper function to add a card to a specific deck zone. | |
| virtual void | openDeckFromFile (const QString &fileName, DeckOpenLocation deckOpenLocation) |
| Opens a deck from a file. | |
| Protected Member Functions inherited from Tab | |
| void | addTabMenu (QMenu *menu) |
Protected Attributes | |
| QMenu * | viewMenu |
| QAction * | aResetLayout |
| QMap< QDockWidget *, DockActions > | dockToActions |
| Protected Attributes inherited from Tab | |
| TabSupervisor * | tabSupervisor |
Private Member Functions | |
| virtual void | setDeck (const LoadedDeck &_deck) |
| Sets the deck for this tab. | |
| void | editDeckInClipboard (bool annotated) |
| Helper for editing decks from the clipboard. | |
| void | exportToDecklistWebsite (DeckLoader::DecklistWebsite website) |
| Helper for exporting decks to websites. | |
Friends | |
| class | DeckEditorMenu |
AbstractTabDeckEditor is the base class for all deck editor tabs.
Description: AbstractTabDeckEditor is the base class for all deck editor tabs. It provides core functionality such as deck model management, card addition/removal, and integration with dock widgets and tab supervisors.
Purpose:
Dock Widgets (typically managed in derived classes):
Key Methods:
Provides UI docks for the deck, database, card info, printing selector, and filters. Supports loading, saving, editing, exporting decks, and interactions with external services such as DeckStats, TappedOut, and remote deck uploads.
|
protected |
|
explicit |
Constructs an AbstractTabDeckEditor.
Constructs the AbstractTabDeckEditor. Initializes all dock widgets and connects signals/slots.
| _tabSupervisor | Pointer to the TabSupervisor managing this tab. |
| _tabSupervisor | The tab supervisor managing this tab. |
|
slot |
Adds a card to the main deck or sideboard based on Ctrl key.
Adds a card to the main deck or sideboard depending on Ctrl key.
|
slot |
Adds a card to the sideboard explicitly.
|
protectedslot |
Analyzes the deck using deckstats.net.
Analyzes the deck using DeckStats.
|
protectedslot |
Analyzes the deck using tappedout.net.
Analyzes the deck using TappedOut.
|
slot |
Decrements a card from the main deck.
|
slot |
Decrements a card from the sideboard.
|
protectedslot |
Opens a deck editor for clipboard contents.
Slot for editing deck in clipboard with annotations.
|
protectedslot |
Opens a raw clipboard deck editor.
Slot for editing deck in clipboard without annotations.
|
protectedslot |
Exports the deck to decklist.org.
Exports deck to www.decklist.org.
|
protectedslot |
Exports the deck to decklist.xyz.
Exports deck to www.decklist.xyz.
|
protectedvirtualslot |
Loads a deck from file.
Loads a deck from file using a dialog. Displays a save confirmation if needed.
|
protectedvirtualslot |
Loads a deck from the clipboard.
Loads a deck from clipboard. Displays confirmation if the tab is modified.
|
protectedslot |
Loads a deck from an online website.
Loads a deck from a website.
|
protectedvirtualslot |
Starts a new deck in this tab.
Creates a new deck. Handles opening in new tab if needed.
|
slot |
Opens a recently opened deck file.
Opens a recently used deck file.
| fileName | Path to the deck file. |
|
protectedslot |
Prints the deck using a preview dialog.
Prints the deck using a QPrintPreviewDialog.
|
protectedslot |
Saves the current deck.
Saves the current deck. If remote deck, sends upload command.
|
protectedvirtualslot |
Saves the current deck under a new name.
Saves the deck to a user-selected file.
|
protectedslot |
Saves deck to clipboard with full info.
Saves deck to clipboard with set info and annotation.
|
protectedslot |
Saves deck to clipboard without set info.
Saves deck to clipboard with annotation, without set info.
|
protectedslot |
Saves deck to clipboard in raw format.
Saves deck to clipboard without annotations, with set info.
|
protectedslot |
Saves deck to clipboard in raw format without set info.
Saves deck to clipboard without annotations or set info.
|
protected |
Helper function to add a card to a specific deck zone.
Helper for adding a card to a deck zone.
| card | Card to add. |
| zoneName | Zone to add the card to. |
|
protectedslot |
Cleans the current deck and resets the modified state.
Clears the current deck and resets modified flag.
|
overrideprotectedslot |
Handles dock close events.
Handles the close event of the tab.
| event | Close event. |
|
overrideslot |
Requests closing the tab.
Handles close requests from outside (tab manager).
| bool AbstractTabDeckEditor::confirmClose | ( | ) |
Confirms whether the tab can be safely closed.
Shows a confirmation dialog before closing.
|
protected |
Confirms deck open action based on settings and modified state.
Displays the save confirmation dialog before loading a deck.
| openInSameTabIfBlank | Whether to reuse same tab if blank. |
| openInSameTabIfBlank | Open in same tab if current tab is blank. |
|
pure virtual |
Creates the menus for this tab. Pure virtual.
Implemented in TabDeckEditor, and TabDeckEditorVisual.
|
protected |
Creates a save confirmation message box.
Creates the base save confirmation dialog.
|
signal |
Emitted before the tab is closed.
|
protectedpure virtualslot |
Slot triggered when a dock floating state changes. Pure virtual.
|
pure virtualslot |
Slot for when a dock's top-level state changes. Pure virtual.
|
protectedpure virtualslot |
Slot triggered when a dock visibility changes. Pure virtual.
|
private |
Helper for editing decks from the clipboard.
Opens the deck editor to edit clipboard contents.
| annotated | If true, edits with annotations. |
|
private |
Helper for exporting decks to websites.
Exports the deck to a decklist website.
| website | Target website. |
| website | Website to export to. |
|
slot |
Called when the filter tree changes.
Applies a new filter tree to the database display.
|
protectedpure virtualslot |
|
inline |
|
nodiscardoverridepure virtual |
Returns the display text for the tab.
Implements Tab.
Implemented in TabDeckEditor, and TabDeckEditorVisual.
|
protectedpure virtualslot |
|
virtualslot |
Called when the deck changes.
Placeholder: called when the deck changes.
|
virtualslot |
Called when the deck is modified.
Marks the tab as modified and updates the save menu status.
| void AbstractTabDeckEditor::openDeck | ( | const LoadedDeck & | deck | ) |
Opens a deck in this tab.
| deck | The deck to open |
| deck | The deck |
|
signal |
Emitted when a deck should be opened in a new editor tab.
|
protectedvirtual |
Opens a deck from a file.
Actually opens a deck from file.
| fileName | Path to the deck file. |
| deckOpenLocation | Where to open the deck (same or new tab). |
|
protectedpure virtualslot |
|
protected |
registers a QDockWidget as a managed dock widget. Creates the associated actions and menu, adds them to the viewMenu, and connects those actions to the tab's slots.
|
protectedpure virtualslot |
|
overridepure virtual |
Retranslates the UI text. Pure virtual.
Implements Tab.
Implemented in TabDeckEditor, and TabDeckEditorVisual.
|
protectedslot |
Callback when a remote deck save finishes.
Callback for remote deck save completion.
| response | Server response. |
|
privatevirtual |
Sets the deck for this tab.
Sets the currently active deck.
| _deck | The deck object. |
| _deck | The deck |
|
pure virtualslot |
Shows the printing selector dock. Pure virtual.
|
slot |
Updates the card info panel.
Updates the card info dock and printing selector.
| card | The card to display. |
|
friend |
|
protected |
| DeckEditorCardDatabaseDockWidget* AbstractTabDeckEditor::cardDatabaseDockWidget |
Database dock.
| DeckEditorCardInfoDockWidget* AbstractTabDeckEditor::cardInfoDockWidget |
Card info dock.
| DeckEditorDeckDockWidget* AbstractTabDeckEditor::deckDockWidget |
Deck dock.
| DeckEditorMenu* AbstractTabDeckEditor::deckMenu |
Menu for deck operations.
| DeckStateManager* AbstractTabDeckEditor::deckStateManager |
|
protected |
| DeckEditorFilterDockWidget* AbstractTabDeckEditor::filterDockWidget |
Filter dock.
| DeckEditorPrintingSelectorDockWidget* AbstractTabDeckEditor::printingSelectorDockWidget |
Printing selector dock.
|
protected |