Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
home_widget.h
Go to the documentation of this file.
1
7
8#ifndef HOME_WIDGET_H
9#define HOME_WIDGET_H
11
12#include <QColor>
13#include <QPair>
14#include <QPixmap>
15#include <QWidget>
17#include <qtmetamacros.h>
18
19class QGridLayout;
20class QLabel;
22class ExactCard;
24class QGroupBox;
25class QTimer;
26class TabSupervisor;
27
28class HomeWidget : public QWidget
29{
30
31 Q_OBJECT
32
33public:
34 HomeWidget(QWidget *parent, TabSupervisor *tabSupervisor);
35 void updateRandomCard();
36 static QPair<QColor, QColor> extractDominantColors(const QPixmap &pixmap);
37
38public slots:
39 void paintEvent(QPaintEvent *event) override;
44 QGroupBox *createButtons();
45 void updateConnectButton(const ClientStatus status);
46
47private:
48 QGridLayout *layout;
51 QPixmap background;
54 QLabel *logoLabel = nullptr;
55 QPair<QColor, QColor> gradientColors;
57
58 void setRandomCard(ExactCard &newCard);
60 QPair<QColor, QColor> determineButtonColor() const;
61 void updateLogoOverlay();
62};
63
64#endif // HOME_WIDGET_H
ClientStatus
Definition abstract_client.h:58
Definition card_info_picture_art_crop_widget.h:18
Represents a complete deck, including metadata, zones, cards, and sideboard plans.
Definition deck_list.h:67
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:24
Definition home_styled_button.h:18
QLabel * logoLabel
Definition home_widget.h:54
static QPair< QColor, QColor > extractDominantColors(const QPixmap &pixmap)
Definition home_widget.cpp:335
void updateBackgroundProperties()
Definition home_widget.cpp:245
QPixmap background
Definition home_widget.h:51
CardInfoPictureArtCropWidget * backgroundSourceCard
Definition home_widget.h:52
void updateRandomCard()
Definition home_widget.cpp:194
QGridLayout * layout
Definition home_widget.h:48
TabSupervisor * tabSupervisor
Definition home_widget.h:50
HomeStyledButton * connectButton
Definition home_widget.h:56
void loadBackgroundSourceDeck()
Definition home_widget.cpp:153
void updateLogoOverlay()
Definition home_widget.cpp:474
void initializeBackgroundFromSource()
Definition home_widget.cpp:116
void onBackgroundShuffleFrequencyChanged()
Definition home_widget.cpp:237
DeckList backgroundSourceDeck
Definition home_widget.h:53
void setRandomCard(ExactCard &newCard)
Definition home_widget.cpp:180
HomeWidget(QWidget *parent, TabSupervisor *tabSupervisor)
Definition home_widget.cpp:68
void updateButtonsToBackgroundColor()
Definition home_widget.cpp:252
QPair< QColor, QColor > determineButtonColor() const
Definition home_widget.cpp:165
void updateConnectButton(const ClientStatus status)
Definition home_widget.cpp:310
QTimer * cardChangeTimer
Definition home_widget.h:49
QGroupBox * createButtons()
Definition home_widget.cpp:261
void paintEvent(QPaintEvent *event) override
Definition home_widget.cpp:383
QPair< QColor, QColor > gradientColors
Definition home_widget.h:55
Definition tab_supervisor.h:92
Defines the DeckList class, which manages a full deck structure including cards, zones,...