#ifndef MODELSUMMARY_H #define MODELSUMMARY_H #include #include class TableModel; using namespace std; class ModelSummary : public QObject { Q_OBJECT Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged BINDABLE bindableRowCount) public: ModelSummary(shared_ptr model, QObject* parent = nullptr); ~ModelSummary(); int rowCount() const; QBindable bindableRowCount(); qreal nTotalExpectedShares() const; int nExpectedBiddings() const; int nPlacedBiddings1() const; int nPlacedBiddings2() const; int nPlacedBiddings3() const; int biddingSum1() const; int biddingSum2() const; int biddingSum3() const; qreal biddingAverage1() const; qreal biddingAverage2() const; qreal biddingAverage3() const; signals: void rowCountChanged(); void nExpectedBiddingsChanged(); void nTotalExpectedSharesChanged(); void nPlacedBiddingsChanged(const int roundNumber); void biddingSumChanged(const int roundNumber); void biddingAverageChanged(const int roundNumber); private: shared_ptr m_model; Q_OBJECT_BINDABLE_PROPERTY(ModelSummary, int, m_rowCount, &ModelSummary::rowCountChanged); }; #endif // MODELSUMMARY_H