diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-07 15:32:40 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-02-07 15:32:40 +0800 |
commit | 2fbcfe27235a0852dce3d0ace748c639495d6092 (patch) | |
tree | b375181c5ada3888c7701ea3f0d8b94c2801f7db /interchange/ord.hxx | |
parent | 5049587a34347abc57aba06c2a2641931eb173e3 (diff) |
Send signal carrying possible transaction info
Diffstat (limited to 'interchange/ord.hxx')
-rw-r--r-- | interchange/ord.hxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/interchange/ord.hxx b/interchange/ord.hxx index 39f3282..f424d4d 100644 --- a/interchange/ord.hxx +++ b/interchange/ord.hxx @@ -33,12 +33,7 @@ namespace QInterchange { Q_PROPERTY(double totalCost READ totalCost NOTIFY totalCostChanged) public: - explicit Ord(QObject* parent = nullptr) : - QAbstractListModel{parent}, - m_data{nullptr}, - m_subtotal{.0}, - m_shipping{.0}, - m_totalCost{.0} {} + explicit Ord(QObject* parent = nullptr); ~Ord() { if (m_data) interchange_ord_free(m_data); @@ -60,8 +55,12 @@ namespace QInterchange { void subtotalChanged(); void shippingChanged(); void totalCostChanged(); + void gotTransaction(QString const& response); + protected: QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE; + void emitTransaction(QString const& response); + private: void addItem(Item const& item); QList<Item> items; |