Migrated old visualization of the bidding round statuses with donut charts from the legacy BeetRound project.

This commit is contained in:
2026-02-16 18:48:05 +01:00
parent f8201ead71
commit 1e64dda701
11 changed files with 551 additions and 49 deletions

View File

@ -0,0 +1,44 @@
#include "biddingroundprogresslayout.h"
#include <QLabel>
#include <QProgressBar>
BiddingRoundProgressLayout::BiddingRoundProgressLayout(const int nCurrentBiddings,
const int nExpectedBiddings,
QWidget* parent)
: QHBoxLayout(parent)
, m_nCurrentBiddings(nCurrentBiddings)
, m_nExpectedBiddings(nExpectedBiddings) {
QLabel* nBidsText = new QLabel("Abgegeben:");
addWidget(nBidsText);
m_nBiddings1Label = new QLabel(QString::number(m_nCurrentBiddings));
addWidget(m_nBiddings1Label);
QLabel* nExpectedText = new QLabel("Erwartet:");
addWidget(nExpectedText);
m_nExpectedBidding1Label = new QLabel(QString::number(m_nExpectedBiddings));
addWidget(m_nExpectedBidding1Label);
m_biddingRound1ProgressBar = new QProgressBar(parent);
m_biddingRound1ProgressBar->setMinimum(0);
m_biddingRound1ProgressBar->setMaximum(m_nExpectedBiddings);
m_biddingRound1ProgressBar->setValue(m_nCurrentBiddings);
addWidget(m_biddingRound1ProgressBar);
}
void BiddingRoundProgressLayout::setCurrentBiddings(const int value) {
m_nCurrentBiddings = value;
const QString bidCountString = QString::number(value);
m_nBiddings1Label->setText(bidCountString);
m_biddingRound1ProgressBar->setValue(value);
}
void BiddingRoundProgressLayout::setExpectedBiddings(const int value) {
m_nExpectedBiddings = value;
const QString expectedBiddingsString = QString::number(value);
m_nExpectedBidding1Label->setText(expectedBiddingsString);
m_biddingRound1ProgressBar->setMaximum(value);
}