From ef5fdbb1c96b88d9868abbc779a4435501125e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 1 Dec 2020 17:09:46 +0800 Subject: Checkout function --- libicclient | 2 +- ord.cxx | 6 +++++- qicclient/member.hxx | 1 + qicclient/ord.hxx | 7 +++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libicclient b/libicclient index 12950ef..b0ae674 160000 --- a/libicclient +++ b/libicclient @@ -1 +1 @@ -Subproject commit 12950ef44456807150eaf669e32446b011b754fe +Subproject commit b0ae674600b68d8b8fa1d522cb0f5366ee0f2cb4 diff --git a/ord.cxx b/ord.cxx index 70ef812..0d13af0 100644 --- a/ord.cxx +++ b/ord.cxx @@ -1,5 +1,5 @@ #include -#include +#include #include "qicclient/ord.hxx" namespace QICClient { @@ -74,4 +74,8 @@ namespace QICClient { } } + void Ord::checkout(Member& member) + { + icclient_ord_checkout(m_data, member.data()); + } } diff --git a/qicclient/member.hxx b/qicclient/member.hxx index 864d353..fc3c77e 100644 --- a/qicclient/member.hxx +++ b/qicclient/member.hxx @@ -83,6 +83,7 @@ namespace QICClient { QString const& country() const { return m_country; } QString const& phoneDay() const { return m_phoneDay; } QString const& email() const { return m_email; } + icclient_member* data() { return m_data; } void setUserName(QString const& userName); void setUserNick(QString const& userNick); diff --git a/qicclient/ord.hxx b/qicclient/ord.hxx index fc7802a..697daa7 100644 --- a/qicclient/ord.hxx +++ b/qicclient/ord.hxx @@ -3,6 +3,7 @@ #include #include +#include "member.hxx" #include "product.hxx" namespace QICClient { @@ -56,11 +57,9 @@ namespace QICClient { double shipping() const { return m_shipping; } double totalCost() const { return m_totalCost; } - /* public slots: - void remove(unsigned int const& indices); - void checkout(); - */ +// void remove(unsigned int const& indices); + void checkout(Member& member); signals: void rowCountChanged(); -- cgit v1.2.3