Cockatrice 2026-03-05-Development-2.11.0-beta.54
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 freeDocksSize() override;
73
77 void refreshShortcuts() override;
78
85 bool eventFilter(QObject *o, QEvent *e) override;
86
87protected:
89
90 QVBoxLayout *centralFrame;
92 QHBoxLayout *searchLayout;
93 QDockWidget *searchAndDatabaseDock;
94 QWidget *centralWidget;
95
96public:
101 explicit TabDeckEditorVisual(TabSupervisor *_tabSupervisor);
102
106 void retranslateUi() override;
107
112 [[nodiscard]] QString getTabText() const override;
113
118 void changeModelIndexAndCardInfo(const ExactCard &activeCard);
119
124 void changeModelIndexToCard(const ExactCard &activeCard);
125
130
134 void createMenus() override;
135
140
144 void createCentralFrame();
145
146public slots:
150 void onDeckChanged() override;
151
155 void showPrintingSelector() override;
156
163 void processMainboardCardClick(QMouseEvent *event,
165 const QString &zoneName);
166
173
178 bool actSaveDeckAs() override;
179};
180
181#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:259
void createSearchAndDatabaseFrame()
Create search and database display frame.
QWidget * centralWidget
Central widget of the editor.
Definition tab_deck_editor_visual.h:94
void retranslateUi() override
Retranslate UI strings (for i18n support).
Definition tab_deck_editor_visual.cpp:315
void freeDocksSize() override
Set size restrictions for free floating dock widgets.
Definition tab_deck_editor_visual.cpp:250
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:290
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:92
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:91
TabDeckEditorVisualTabWidget * tabContainer
Tab container holding different visual widgets.
Definition tab_deck_editor_visual.h:88
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:343
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:266
QVBoxLayout * centralFrame
Layout for central widgets.
Definition tab_deck_editor_visual.h:90
QDockWidget * searchAndDatabaseDock
Dock widget for search/database display.
Definition tab_deck_editor_visual.h:93
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.