| 12345678910111213141516171819202122232425262728 |
- #ifndef SUMMARYMODEL_H
- #define SUMMARYMODEL_H
- #include <QObject>
- #include <QVariantMap>
- class SummaryModel : public QObject
- {
- Q_OBJECT
- Q_PROPERTY(QVariantList items READ items NOTIFY itemsChanged)
- Q_PROPERTY(float sum READ sum NOTIFY itemsChanged)
- public:
- QVariantList items() const;
- float sum() const;
- Q_INVOKABLE void setItemCount(QVariantMap item, int count);
- Q_INVOKABLE void clear();
- signals:
- void itemsChanged();
- private:
- QVariantMap m_items;
- };
- #endif // SUMMARYMODEL_H
|