#ifndef SUMMARYWIDGET_H #define SUMMARYWIDGET_H #include class BiddingRoundStatusWidget; class ModelSummary; class QLabel; class QSpinBox; class QBoxLayout; class SummaryWidget : public QWidget { Q_OBJECT public: explicit SummaryWidget(std::shared_ptr modelSummary, QWidget* parent = nullptr); private slots: void onFinancialNeedChanged(int newFinancialNeed); void onNExpectedBiddingChanged(int newNExpected); void onNTotalExpectedSharesChanged(qreal newNExpected); void onNPlacedBiddingsChanged(const int roundNumber); void onBiddingSumChanged(const int roundNumber); void onBiddingAverageChanged(const int roundNumber); private: std::shared_ptr m_modelSummary; std::unique_ptr m_biddingStatus1; std::unique_ptr m_biddingStatus2; std::unique_ptr m_biddingStatus3; // TODO read from settings (maybe via model/core; maybe set in constructor) const int m_financialNeed = 13942; QSpinBox* m_financialNeedBox = nullptr; QLabel* m_nTotalExpectedShares = nullptr; QLabel* m_rowCountValueLabel; QLabel* m_nExpectedBiddingsValueLabel; /// functions QBoxLayout* createBiddingOverviewLayout(); void setupConnections(); }; #endif // SUMMARYWIDGET_H