Cockatrice 2026-10-19-Development-3.1.2-beta.2
A 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 <QColor>
12#include <QString>
13#include <QWidget>
14#include <qnamespace.h>
15#include <qtmetamacros.h>
16
17class BarWidget : public QWidget
18{
19 Q_OBJECT
20
21public:
22 explicit BarWidget(QString label, int value, int total, QColor barColor = Qt::blue, QWidget *parent = nullptr);
23
24 QSize sizeHint() const override;
25
26protected:
27 void paintEvent(QPaintEvent *event) override;
28
29private:
30 QString label;
31 int value;
32 int total;
33 QColor barColor; // Store the bar color
34};
35
36#endif // BAR_WIDGET_H
int value
Definition bar_widget.h:31
int total
Definition bar_widget.h:32
BarWidget(QString label, int value, int total, QColor barColor=Qt::blue, QWidget *parent=nullptr)
Definition bar_widget.cpp:10
QString label
Definition bar_widget.h:30
QColor barColor
Definition bar_widget.h:33
void paintEvent(QPaintEvent *event) override
Definition bar_widget.cpp:28
QSize sizeHint() const override
Definition bar_widget.cpp:16