2026-02-15 16:36:13 +01:00
|
|
|
#ifndef SUMMARYWIDGET_H
|
|
|
|
|
#define SUMMARYWIDGET_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
2026-02-16 18:48:05 +01:00
|
|
|
class BiddingRoundStatusWidget;
|
2026-02-15 16:36:13 +01:00
|
|
|
class ModelSummary;
|
|
|
|
|
class QLabel;
|
2026-02-16 11:46:01 +01:00
|
|
|
class QSpinBox;
|
2026-02-16 18:48:05 +01:00
|
|
|
class QBoxLayout;
|
2026-02-15 16:36:13 +01:00
|
|
|
|
|
|
|
|
class SummaryWidget : public QWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit SummaryWidget(std::shared_ptr<ModelSummary> modelSummary, QWidget* parent = nullptr);
|
|
|
|
|
|
2026-02-16 11:46:01 +01:00
|
|
|
private slots:
|
|
|
|
|
void onFinancialNeedChanged(int newFinancialNeed);
|
2026-02-16 18:48:05 +01:00
|
|
|
void onNExpectedBiddingChanged(int newNExpected);
|
|
|
|
|
|
|
|
|
|
void onNPlacedBiddingsChanged(const int roundNumber);
|
|
|
|
|
void onBiddingSumChanged(const int roundNumber);
|
|
|
|
|
void onBiddingAverageChanged(const int roundNumber);
|
2026-02-16 11:46:01 +01:00
|
|
|
|
2026-02-15 16:36:13 +01:00
|
|
|
private:
|
|
|
|
|
std::shared_ptr<ModelSummary> m_modelSummary;
|
|
|
|
|
|
2026-02-16 18:48:05 +01:00
|
|
|
std::unique_ptr<BiddingRoundStatusWidget> m_biddingStatus1;
|
|
|
|
|
std::unique_ptr<BiddingRoundStatusWidget> m_biddingStatus2;
|
|
|
|
|
std::unique_ptr<BiddingRoundStatusWidget> m_biddingStatus3;
|
|
|
|
|
|
2026-02-16 11:46:01 +01:00
|
|
|
// TODO read from settings (maybe via model/core; maybe set in constructor)
|
|
|
|
|
const int m_financialNeed = 13942;
|
|
|
|
|
QSpinBox* m_financialNeedBox = nullptr;
|
|
|
|
|
|
2026-02-16 09:24:58 +01:00
|
|
|
QLabel* m_rowCountValueLabel;
|
|
|
|
|
QLabel* m_nExpectedBiddingsValueLabel;
|
|
|
|
|
|
2026-02-16 18:48:05 +01:00
|
|
|
/// functions
|
|
|
|
|
QBoxLayout* createBiddingOverviewLayout();
|
|
|
|
|
void setupConnections();
|
2026-02-15 16:36:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // SUMMARYWIDGET_H
|