Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
tab_public_decks.h
Go to the documentation of this file.
1
5
6#ifndef TAB_PUBLIC_DECKS_H
7#define TAB_PUBLIC_DECKS_H
8
9#include "tab.h"
10
11#include <QString>
12#include <qtmetamacros.h>
13
14class AbstractClient;
17class FlowWidget;
18class QLabel;
19class QToolButton;
21class Response;
25class TabSupervisor;
26
35class TabPublicDecks final : public Tab
36{
37 Q_OBJECT
38
39public:
41
42 [[nodiscard]] QString getTabText() const override;
43 void retranslateUi() override;
44 bool closeRequest() override;
45
46 [[nodiscard]] QString getUserName() const
47 {
48 return userName;
49 }
50
51signals:
53
54private slots:
55 void openDeck(int deckId);
56 void openDeckFinished(const Response &response, const CommandContainer &commandContainer);
57 void updateColorFilter();
58 void updateTagFilter();
59 void updateCardSize(int scale);
60 void updateTagsVisibility(bool visible);
61 void updateLoadingState(bool loading);
62
63private:
64 void rebuildGrid();
65 void applyCardSize(int scale);
66
68 QString userName;
74 QToolButton *refreshButton;
76 QLabel *titleLabel;
77 QLabel *statusLabel;
78 QLabel *emptyLabel;
80 int cardSize = 100;
81};
82
83#endif // TAB_PUBLIC_DECKS_H
Definition abstract_client.h:73
Definition deck_preview_color_identity_filter_widget.h:21
Definition flow_widget.h:27
Flat, read-only list of the public decks published by another user.
Definition remote_public_decks_model.h:43
QString getTabText() const override
Definition tab_public_decks.cpp:126
bool closeRequest() override
Definition tab_public_decks.cpp:157
void applyCardSize(int scale)
Definition tab_public_decks.cpp:225
TabPublicDecks(TabSupervisor *tabSupervisor, AbstractClient *client, const QString &userName)
Definition tab_public_decks.cpp:40
void updateLoadingState(bool loading)
Definition tab_public_decks.cpp:203
void updateTagsVisibility(bool visible)
Definition tab_public_decks.cpp:198
AbstractClient * client
Definition tab_public_decks.h:67
void retranslateUi() override
Definition tab_public_decks.cpp:131
void closing(TabPublicDecks *tab)
DeckPreviewColorIdentityFilterWidget * colorIdentityFilter
Definition tab_public_decks.h:72
VisualDeckStorageQuickSettingsWidget * quickSettingsWidget
Definition tab_public_decks.h:75
VisualDeckStorageSearchWidget * searchWidget
Definition tab_public_decks.h:71
QString lastFailureMessage
Last load-failure text, re-shown on retranslate.
Definition tab_public_decks.h:79
QString getUserName() const
Definition tab_public_decks.h:46
FlowWidget * flowWidget
Definition tab_public_decks.h:70
QString userName
Definition tab_public_decks.h:68
void updateColorFilter()
Definition tab_public_decks.cpp:184
void rebuildGrid()
Definition tab_public_decks.cpp:163
int cardSize
Definition tab_public_decks.h:80
void updateTagFilter()
Definition tab_public_decks.cpp:189
QLabel * emptyLabel
Definition tab_public_decks.h:78
void openDeck(int deckId)
Definition tab_public_decks.cpp:234
RemotePublicDecksModel * model
Definition tab_public_decks.h:69
QToolButton * refreshButton
Definition tab_public_decks.h:74
QLabel * titleLabel
Definition tab_public_decks.h:76
void updateCardSize(int scale)
Definition tab_public_decks.cpp:219
VisualDeckStorageTagFilterWidget * tagFilterWidget
Definition tab_public_decks.h:73
QLabel * statusLabel
Definition tab_public_decks.h:77
void openDeckFinished(const Response &response, const CommandContainer &commandContainer)
Definition tab_public_decks.cpp:244
Definition tab_supervisor.h:92
TabSupervisor * tabSupervisor
Definition tab.h:30
Tab(TabSupervisor *_tabSupervisor)
Definition tab.cpp:16
Definition visual_deck_storage_quick_settings_widget.h:24
Definition visual_deck_storage_search_widget.h:18
Definition visual_deck_storage_tag_filter_widget.h:21
Definition commands.proto:8
Definition response.proto:11