diff options
Diffstat (limited to 'ord.cxx')
-rw-r--r-- | ord.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -12,9 +12,14 @@ namespace QInterchange { Ord::Ord(struct interchange_ord_order *order, QObject *parent) : QAbstractListModel{parent} { - ord = this; + init(order); for (size_t i = 0; i < order->nitems; i++) addItem(Item{&order->items[i]}); + } + + void Ord::init(struct interchange_ord_order *order) + { + ord = this; m_subtotal = order->subtotal; m_shipping = order->shipping; m_totalCost = order->total_cost; |