Cockatrice 2026-06-01-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
color_button.h
Go to the documentation of this file.
1#ifndef COCKATRICE_COLOR_BUTTON_H
2#define COCKATRICE_COLOR_BUTTON_H
3
4#include <QColor>
5#include <QToolButton>
6
7class ColorButton : public QToolButton
8{
9 Q_OBJECT
10public:
11 explicit ColorButton(QWidget *parent = nullptr);
12
13 QColor getColor() const
14 {
15 return color;
16 }
17 void setColor(const QColor &c);
18
19signals:
20 void colorChanged(const QColor &color);
21
22private slots:
23 void pickColor();
24
25private:
26 void updateSwatch();
27 QColor color;
28};
29
30#endif // COCKATRICE_COLOR_BUTTON_H
ColorButton(QWidget *parent=nullptr)
Definition color_button.cpp:6
QColor color
Definition color_button.h:27
void updateSwatch()
Definition color_button.cpp:32
QColor getColor() const
Definition color_button.h:13
void setColor(const QColor &c)
Definition color_button.cpp:14
void pickColor()
Definition color_button.cpp:24
void colorChanged(const QColor &color)