AbstractTabDeckEditor is the base class for all deck editor tabs. More...
#include <abstract_tab_deck_editor.h>
Public Slots | |
| 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. | |
Signals | |
| 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 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 (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 () |
Public Attributes | |
| 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 | |
| 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. | |
| 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 Member Functions | |
| 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) |
Protected Attributes | |
| 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 |
Private Member Functions | |
| virtual void | setDeck (DeckLoader *_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 |
Swaps a card in the deck view.
Swaps a card in a deck zone.
| card | Card to swap. |
| zoneName | Zone to swap in. |
|
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.
|
signal |
Emitted when a card should be decremented.
|
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. |
|
overrideprotectedslot |
Event filter for dock state changes.
Event filter for dock visibility and geometry changes.
| o | Object sending the event. |
| e | Event. |
|
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 |
| DeckList * AbstractTabDeckEditor::getDeckList | ( | ) | const |
Returns the currently active deck list.
Returns the currently loaded deck list.
| DeckLoader * AbstractTabDeckEditor::getDeckLoader | ( | ) | const |
Returns the currently active deck loader.
Returns the currently loaded deck.
|
inline |
|
nodiscardoverridepure virtual |
Returns the display text for the tab.
Implements Tab.
Implemented in TabDeckEditor, and TabDeckEditorVisual.
|
protected |
Returns true if the tab is a blank newly created deck.
|
protectedpure virtualslot |
|
virtualslot |
Called when the deck changes.
Placeholder: called when the deck changes.
|
virtualslot |
Called when a widget would like to clear the history.
Marks the tab as modified and updates the save menu status.
|
virtualslot |
Called when a widget is about to modify the state of the DeckList.
Marks the tab as modified and updates the save menu status.
| modificationReason | The reason for the state modification |
|
virtualslot |
Called when the deck is modified.
Marks the tab as modified and updates the save menu status.
| void AbstractTabDeckEditor::openDeck | ( | DeckLoader * | deck | ) |
Opens a deck in this tab.
| deck | Pointer to a DeckLoader object. |
| deck | DeckLoader object (takes ownership). |
|
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 |
|
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 | DeckLoader object. |
| void AbstractTabDeckEditor::setModified | ( | bool | _modified | ) |
Sets the modified state of the tab.
| _windowModified | Whether the tab is modified. |
| _modified | True if tab is modified, false otherwise. |
|
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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| DeckEditorCardInfoDockWidget* AbstractTabDeckEditor::cardInfoDockWidget |
Card info dock.
| DeckEditorDatabaseDisplayWidget* AbstractTabDeckEditor::databaseDisplayDockWidget |
Database dock.
|
protected |
| DeckEditorDeckDockWidget* AbstractTabDeckEditor::deckDockWidget |
Deck dock.
| DeckEditorMenu* AbstractTabDeckEditor::deckMenu |
Menu for deck operations.
|
protected |
| DeckEditorFilterDockWidget* AbstractTabDeckEditor::filterDockWidget |
Filter dock.
| DeckListHistoryManager* AbstractTabDeckEditor::historyManager |
|
protected |
Whether the deck/tab has unsaved changes.
|
protected |
| DeckEditorPrintingSelectorDockWidget* AbstractTabDeckEditor::printingSelectorDockWidget |
Printing selector dock.
|
protected |