Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
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
17
class
BarWidget
:
public
QWidget
18
{
19
Q_OBJECT
20
21
public
:
22
explicit
BarWidget
(QString
label
,
int
value
,
int
total
, QColor
barColor
= Qt::blue, QWidget *parent =
nullptr
);
23
24
QSize
sizeHint
()
const override
;
25
26
protected
:
27
void
paintEvent
(QPaintEvent *event)
override
;
28
29
private
:
30
QString
label
;
31
int
value
;
32
int
total
;
33
QColor
barColor
;
// Store the bar color
34
};
35
36
#endif
// BAR_WIDGET_H
BarWidget::value
int value
Definition
bar_widget.h:31
BarWidget::total
int total
Definition
bar_widget.h:32
BarWidget::BarWidget
BarWidget(QString label, int value, int total, QColor barColor=Qt::blue, QWidget *parent=nullptr)
Definition
bar_widget.cpp:10
BarWidget::label
QString label
Definition
bar_widget.h:30
BarWidget::barColor
QColor barColor
Definition
bar_widget.h:33
BarWidget::paintEvent
void paintEvent(QPaintEvent *event) override
Definition
bar_widget.cpp:28
BarWidget::sizeHint
QSize sizeHint() const override
Definition
bar_widget.cpp:16
cockatrice
src
interface
widgets
general
display
charts
bars
bar_widget.h
Generated by
1.18.0