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,53 @@
#ifndef BIDDINGROUNDSTATUSWIDGET_H
#define BIDDINGROUNDSTATUSWIDGET_H
#include "biddingroundprogresslayout.h"
#include <QWidget>
class QBoxLayout;
class QChartView;
class QPieSeries;
class QPieSlice;
class BiddingRoundStatusWidget : public QWidget {
Q_OBJECT
public:
explicit BiddingRoundStatusWidget(const QString& title,
const int placedBiddings,
const int expectedBiddings,
const int financialNeed,
const int currentSum,
const qreal currentAverage,
QWidget* parent = nullptr);
public slots:
void onExpectedBiddingsChanged(const int nExpected);
void onNPlacedBiddingsChanged(const int nPlaced);
void onBiddingSumChanged(const int sum);
void onBiddingAverageChanged(const qreal average);
void onFinancialNeedChanged(const int financialNeed);
signals:
private:
QString m_title;
int m_financialNeed;
int m_currentSum;
QChartView* m_chartView = nullptr;
QPieSeries* m_moneyDonutSeries = nullptr;
QPieSlice* m_sumSlice = nullptr;
QPieSlice* m_gapSlice = nullptr;
QLabel* m_biddingAverageDescription = nullptr;
QLabel* m_biddingAverageValue = nullptr;
BiddingRoundProgressLayout* m_biddingRoundProgress = nullptr;
QBoxLayout* createProgressLayout(const int nPlaced, const int nExpected);
void updateDonutChart();
QString createCurrencyString(const qreal value) const;
};
#endif // BIDDINGROUNDSTATUSWIDGET_H