Files
BeetRound/UIs/BeetRoundWidgets/widgets/summarywidget.h

48 lines
1.3 KiB
C++

#ifndef SUMMARYWIDGET_H
#define SUMMARYWIDGET_H
#include <QWidget>
class BiddingRoundStatusWidget;
class ModelSummary;
class QLabel;
class QSpinBox;
class QBoxLayout;
class SummaryWidget : public QWidget {
Q_OBJECT
public:
explicit SummaryWidget(std::shared_ptr<ModelSummary> 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<ModelSummary> m_modelSummary;
std::unique_ptr<BiddingRoundStatusWidget> m_biddingStatus1;
std::unique_ptr<BiddingRoundStatusWidget> m_biddingStatus2;
std::unique_ptr<BiddingRoundStatusWidget> 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