Added a second bound property (nExpectedBiddings) & cleaned up the code a little.

This commit is contained in:
2026-02-16 09:24:58 +01:00
parent dac9ac46f2
commit f200fff99e
5 changed files with 70 additions and 12 deletions

View File

@ -12,6 +12,8 @@ class ModelSummary : public QObject {
Q_OBJECT
Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged BINDABLE bindableRowCount)
Q_PROPERTY(int nExpectedBiddings READ nExpectedBiddings NOTIFY nExpectedBiddingsChanged BINDABLE
bindableNExpectedBiddings)
public:
ModelSummary(shared_ptr<TableModel> model, QObject* parent = nullptr);
@ -19,14 +21,21 @@ class ModelSummary : public QObject {
int rowCount() const;
QBindable<int> bindableRowCount();
int nExpectedBiddings() const;
QBindable<int> bindableNExpectedBiddings();
signals:
void rowCountChanged();
void nExpectedBiddingsChanged();
private:
shared_ptr<TableModel> m_model;
Q_OBJECT_BINDABLE_PROPERTY(ModelSummary, int, m_rowCount, &ModelSummary::rowCountChanged);
Q_OBJECT_BINDABLE_PROPERTY(ModelSummary,
int,
m_nExpectedBiddings,
&ModelSummary::nExpectedBiddingsChanged);
};
#endif // MODELSUMMARY_H