Cockatrice 2026-04-21-Development-2.11.0-beta.61
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
tab_deck_editor_visual.h
Go to the documentation of this file.
1#ifndef WINDOW_DECKEDITORVISUAL_H
2#define WINDOW_DECKEDITORVISUAL_H
3
4#include "../tab.h"
6
55{
56 Q_OBJECT
57
58protected slots:
62 void loadLayout() override;
63
67 void restartLayout() override;
68
72 void refreshShortcuts() override;
73
80 bool eventFilter(QObject *o, QEvent *e) override;
81
82protected:
84
85 QVBoxLayout *centralFrame;
87 QHBoxLayout *searchLayout;
88 QDockWidget *searchAndDatabaseDock;
89 QWidget *centralWidget;
90
91public:
96 explicit TabDeckEditorVisual(TabSupervisor *_tabSupervisor);
97
101 void retranslateUi() override;
102
107 [[nodiscard]] QString getTabText() const override;
108
113 void changeModelIndexAndCardInfo(const ExactCard &activeCard);
114
119 void changeModelIndexToCard(const ExactCard &activeCard);
120
125
129 void createMenus() override;
130
135
139 void createCentralFrame();
140
141public slots:
145 void onDeckChanged() override;
146
150 void showPrintingSelector() override;
151
158 void processMainboardCardClick(QMouseEvent *event,
160 const QString &zoneName);
161
168
173 bool actSaveDeckAs() override;
174};
175
176#endif
AbstractTabDeckEditor(TabSupervisor *_tabSupervisor)
Constructs an AbstractTabDeckEditor.
Definition abstract_tab_deck_editor.cpp:53
Definition card_info_picture_with_text_overlay_widget.h:18
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19
Tab container for the visual deck editor.
Definition tab_deck_editor_visual_tab_widget.h:48
void onDeckChanged() override
Refresh UI when the deck changes.
Definition tab_deck_editor_visual.cpp:84
void processMainboardCardClick(QMouseEvent *event, CardInfoPictureWithTextOverlayWidget *instance, const QString &zoneName)
Handle card clicks in the mainboard visual deck.
Definition tab_deck_editor_visual.cpp:144
void refreshShortcuts() override
Refresh keyboard shortcuts for this tab.
Definition tab_deck_editor_visual.cpp:250
void createSearchAndDatabaseFrame()
Create search and database display frame.
QWidget * centralWidget
Central widget of the editor.
Definition tab_deck_editor_visual.h:89
void retranslateUi() override
Retranslate UI strings (for i18n support).
Definition tab_deck_editor_visual.cpp:295
void processCardClickDatabaseDisplay(QMouseEvent *event, CardInfoPictureWithTextOverlayWidget *instance)
Handle card clicks in the database visual display.
Definition tab_deck_editor_visual.cpp:220
void showPrintingSelector() override
Show the printing selector dock for the currently active card.
Definition tab_deck_editor_visual.cpp:242
void restartLayout() override
Reset and restart the layout to default.
Definition tab_deck_editor_visual.cpp:270
TabDeckEditorVisual(TabSupervisor *_tabSupervisor)
Constructs a visual deck editor tab.
Definition tab_deck_editor_visual.cpp:39
QHBoxLayout * searchLayout
Layout for search bar.
Definition tab_deck_editor_visual.h:87
bool actSaveDeckAs() override
Save the deck under a new name.
Definition tab_deck_editor_visual.cpp:233
QVBoxLayout * searchAndDatabaseFrame
Layout for search and database display.
Definition tab_deck_editor_visual.h:86
TabDeckEditorVisualTabWidget * tabContainer
Tab container holding different visual widgets.
Definition tab_deck_editor_visual.h:83
void changeModelIndexAndCardInfo(const ExactCard &activeCard)
Update the currently selected card in the deck and UI.
Definition tab_deck_editor_visual.cpp:125
bool eventFilter(QObject *o, QEvent *e) override
Synchronize dock state with menu items.
Definition tab_deck_editor_visual.cpp:323
void createCentralFrame()
Create central frame for visual widgets.
Definition tab_deck_editor_visual.cpp:57
void changeModelIndexToCard(const ExactCard &activeCard)
Change the deck view selection to a specific card.
Definition tab_deck_editor_visual.cpp:132
void createDeckAnalyticsDock()
Create the deck analytics dock widget.
QString getTabText() const override
Get the display text for the tab.
Definition tab_deck_editor_visual.cpp:116
void loadLayout() override
Load the editor layout from settings.
Definition tab_deck_editor_visual.cpp:257
QVBoxLayout * centralFrame
Layout for central widgets.
Definition tab_deck_editor_visual.h:85
QDockWidget * searchAndDatabaseDock
Dock widget for search/database display.
Definition tab_deck_editor_visual.h:88
void createMenus() override
Setup menus for this visual deck editor.
Definition tab_deck_editor_visual.cpp:93
Definition tab_supervisor.h:83
TODO: Document this.