Tab container for the visual deck editor.
More...
#include <tab_deck_editor_visual_tab_widget.h>
|
| void | handleTabClose (int index) |
| | Handle closing of a tab at a given index.
|
Tab container for the visual deck editor.
Description: TabDeckEditorVisualTabWidget is a QTabWidget container for visual deck editing sub-tabs. It organizes the visual deck, database display, deck analytics, and sample hand preview into separate tabs.
Purpose:
- Provides a tabbed interface for multiple visual components of the deck editor.
- Handles forwarding of card events (hover, click, selection) to TabDeckEditorVisual.
- Manages dynamic tab addition, removal, and title updates.
Contained Sub-Tabs and Widgets:
Key Methods:
◆ TabDeckEditorVisualTabWidget()
Construct the tab widget with required models.
Constructs the TabDeckEditorVisualTabWidget.
- Parameters
-
| parent | Parent widget. |
| _deckEditor | Pointer to the deck editor instance. |
| _deckModel | Deck list model. |
| _cardDatabaseModel | Card database model. |
| _cardDatabaseDisplayModel | Database display model. |
| parent | The parent QWidget. |
| _deckEditor | Pointer to the associated deck editor. |
| _deckModel | Pointer to the deck list model. |
| _cardDatabaseModel | Pointer to the card database model. |
| _cardDatabaseDisplayModel | Pointer to the card database display model. |
Initializes all sub-widgets (visual deck view, database display, deck analytics, sample hand) and sets up the tab layout and signal connections.
◆ addNewTab()
| void TabDeckEditorVisualTabWidget::addNewTab |
( |
QWidget * | widget, |
|
|
const QString & | title ) |
Add a new tab with a widget and title.
Adds a new tab with the given widget and title.
- Parameters
-
| widget | The widget to add. |
| title | The title of the tab. |
◆ cardChanged
| void TabDeckEditorVisualTabWidget::cardChanged |
( |
const ExactCard & | activeCard | ) |
|
|
signal |
◆ cardChangedDatabaseDisplay
| void TabDeckEditorVisualTabWidget::cardChangedDatabaseDisplay |
( |
const ExactCard & | activeCard | ) |
|
|
signal |
◆ cardClicked
◆ cardClickedDatabaseDisplay
◆ getCurrentTab()
| QWidget * TabDeckEditorVisualTabWidget::getCurrentTab |
( |
| ) |
const |
|
nodiscard |
Get the currently active tab widget.
Returns the currently selected tab widget.
- Returns
- Pointer to the current tab widget.
◆ getTabCount()
| int TabDeckEditorVisualTabWidget::getTabCount |
( |
| ) |
const |
|
nodiscard |
Get the total number of tabs.
Returns the number of tabs in the tab widget.
- Returns
- Number of tabs.
◆ handleTabClose
| void TabDeckEditorVisualTabWidget::handleTabClose |
( |
int | index | ) |
|
|
privateslot |
Handle closing of a tab at a given index.
Handles the closing of a tab.
- Parameters
-
| index | Index of the tab to close. |
| index | The index of the tab to close. |
Removes the tab and deletes the widget to free memory.
◆ onCardChanged
| void TabDeckEditorVisualTabWidget::onCardChanged |
( |
const ExactCard & | activeCard | ) |
|
|
slot |
Emitted when the active card changes in the deck view.
Emits the cardChanged signal when a card is activated in the visual deck view.
- Parameters
-
| activeCard | New active card. |
| activeCard | The card that was activated. |
◆ onCardChangedDatabaseDisplay
| void TabDeckEditorVisualTabWidget::onCardChangedDatabaseDisplay |
( |
const ExactCard & | activeCard | ) |
|
|
slot |
Emitted when the active card changes in the database display.
Emits the cardChangedDatabaseDisplay signal when a card is hovered in the database display.
- Parameters
-
| activeCard | New active card. |
| activeCard | The card that was hovered. |
◆ onCardClickedDatabaseDisplay
Emitted when a card is clicked in the database display.
Emits the cardClickedDatabaseDisplay signal when a card is clicked in the database display.
- Parameters
-
| event | Mouse event. |
| instance | Widget representing the clicked card. |
| event | The mouse event. |
| instance | The widget instance of the clicked card. |
◆ onCardClickedDeckEditor
Emitted when a card is clicked in the deck view.
Emits the cardClicked signal when a card is clicked in the visual deck view.
- Parameters
-
| event | Mouse event. |
| instance | Widget representing the clicked card. |
| zoneName | Deck zone of the card. |
| event | The mouse event. |
| instance | The widget instance of the clicked card. |
| zoneName | The zone of the deck where the card is located. |
◆ removeCurrentTab()
| void TabDeckEditorVisualTabWidget::removeCurrentTab |
( |
| ) |
|
Remove the currently active tab.
Removes the currently selected tab.
◆ setTabTitle()
| void TabDeckEditorVisualTabWidget::setTabTitle |
( |
int | index, |
|
|
const QString & | title ) |
Set the title of a specific tab.
Sets the title of a tab at a given index.
- Parameters
-
| index | The index of the tab. |
| title | The new title. |
◆ cardDatabaseDisplayModel
Card database display model.
◆ cardDatabaseModel
◆ deckAnalytics
◆ deckEditor
Reference to the deck editor.
◆ deckModel
◆ layout
| QVBoxLayout* TabDeckEditorVisualTabWidget::layout |
|
private |
Layout for tabs and controls.
◆ printingSelector
Printing selector widget.
◆ sampleHandWidget
Sample hand simulation widget.
◆ visualDatabaseDisplay
◆ visualDeckView
Visual deck editor widget.
The documentation for this class was generated from the following files: