Abstract deck editor (#5646)

* Generify TabDeckEditor.

* Connect dockTopLevelChanged signals.

* Connect eventFilters.

* Remove comments.

* Fix ze build (accidentally deleted a line)

* Fix some pointer chaining.

* Be a lot saner about some signals/slots, as in, individual Deck Editor widgets now internally determine their CardInfo and then simply communicate this to the DeckEditor

* Lint.

* DeckDock can handle its own menu.

* DeckDock can handle its own decrement.

* DeckDock now notifies the deck editor on deck change, instead of individually modifying menu items and modification status.

* Rename.

* Include pixelmap generator for icon.

* Directly use an AbstractTabDeckEditor as parent.

* Move clearing database filter into signal/slot relation.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-02-27 16:57:58 +01:00 committed by GitHub
parent 6df97a156f
commit 93d28717e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 2370 additions and 1810 deletions

View file

@ -3,6 +3,7 @@
#include "../../deck/deck_loader.h"
#include "../../server/user/user_list_proxy.h"
#include "abstract_tab_deck_editor.h"
#include "api/edhrec/tab_edhrec.h"
#include "visual_deck_storage/tab_deck_storage_visual.h"
@ -87,7 +88,7 @@ private:
QMap<int, TabGame *> gameTabs;
QList<TabGame *> replayTabs;
QMap<QString, TabMessage *> messageTabs;
QList<TabDeckEditor *> deckEditorTabs;
QList<AbstractTabDeckEditor *> deckEditorTabs;
bool isLocalGame;
QAction *aTabDeckEditor, *aTabVisualDeckStorage, *aTabServer, *aTabAccount, *aTabDeckStorage, *aTabReplays,
@ -132,7 +133,7 @@ public:
{
return roomTabs;
}
QList<TabDeckEditor *> getDeckEditorTabs() const
QList<AbstractTabDeckEditor *> getDeckEditorTabs() const
{
return deckEditorTabs;
}
@ -174,7 +175,7 @@ private slots:
void processUserLeft(const QString &userName);
void processUserJoined(const ServerInfo_User &userInfo);
void talkLeft(TabMessage *tab);
void deckEditorClosed(TabDeckEditor *tab);
void deckEditorClosed(AbstractTabDeckEditor *tab);
void tabUserEvent(bool globalEvent);
void updateTabText(Tab *tab, const QString &newTabText);
void processRoomEvent(const RoomEvent &event);