Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
home_styled_button.h
Go to the documentation of this file.
1
6
7#ifndef HOME_STYLED_BUTTON_H
8#define HOME_STYLED_BUTTON_H
9#include <QColor>
10#include <QPair>
11#include <QPushButton>
12#include <QString>
13#include <qtmetamacros.h>
14
15class QWidget;
16
17class HomeStyledButton : public QPushButton
18{
19 Q_OBJECT
20public:
21 HomeStyledButton(const QString &text, QPair<QColor, QColor> gradientColors, QWidget *parent = nullptr);
22 void updateStylesheet(const QPair<QColor, QColor> &colors);
23 QString generateButtonStylesheet(const QPair<QColor, QColor> &colors);
24public slots:
25 void paintEvent(QPaintEvent *event) override;
26
27private:
28 QPair<QColor, QColor> gradientColors;
29};
30
31#endif // HOME_STYLED_BUTTON_H
void updateStylesheet(const QPair< QColor, QColor > &colors)
Definition home_styled_button.cpp:26
void paintEvent(QPaintEvent *event) override
Definition home_styled_button.cpp:63
QPair< QColor, QColor > gradientColors
Definition home_styled_button.h:28
HomeStyledButton(const QString &text, QPair< QColor, QColor > gradientColors, QWidget *parent=nullptr)
Definition home_styled_button.cpp:18
QString generateButtonStylesheet(const QPair< QColor, QColor > &colors)
Definition home_styled_button.cpp:32