Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
bar_widget.h
Go to the documentation of this file.
1
7
8#ifndef BAR_WIDGET_H
9#define BAR_WIDGET_H
10
11#include <QWidget>
12
13class BarWidget : public QWidget
14{
15 Q_OBJECT
16
17public:
18 explicit BarWidget(QString label, int value, int total, QColor barColor = Qt::blue, QWidget *parent = nullptr);
19
20 QSize sizeHint() const override;
21
22protected:
23 void paintEvent(QPaintEvent *event) override;
24
25private:
26 QString label;
27 int value;
28 int total;
29 QColor barColor; // Store the bar color
30};
31
32#endif // BAR_WIDGET_H
int value
Definition bar_widget.h:27
int total
Definition bar_widget.h:28
BarWidget(QString label, int value, int total, QColor barColor=Qt::blue, QWidget *parent=nullptr)
Definition bar_widget.cpp:6
QString label
Definition bar_widget.h:26
QColor barColor
Definition bar_widget.h:29
void paintEvent(QPaintEvent *event) override
Definition bar_widget.cpp:24
QSize sizeHint() const override
Definition bar_widget.cpp:12