From 5b388f581333d9d3eee1c993054354243be13183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 16 Nov 2019 18:47:51 +0700 Subject: Reorder basket interface lines --- qicclient/basket.hxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qicclient/basket.hxx b/qicclient/basket.hxx index 101a6bc..ecd7a67 100644 --- a/qicclient/basket.hxx +++ b/qicclient/basket.hxx @@ -32,10 +32,10 @@ namespace ICClient { class Basket : public QAbstractListModel { Q_OBJECT + Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged) Q_PROPERTY(double subtotal READ subtotal NOTIFY subtotalChanged) Q_PROPERTY(double shipping READ shipping NOTIFY shippingChanged) Q_PROPERTY(double totalCost READ totalCost NOTIFY totalCostChanged) - Q_PROPERTY(int rowCount READ rowCount NOTIFY rowCountChanged) public: explicit Basket(QObject* parent = nullptr) @@ -45,11 +45,11 @@ namespace ICClient { , m_totalCost{.0} {} - int rowCount(QModelIndex const& parent - = QModelIndex()) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex& index , int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + int rowCount(QModelIndex const& parent + = QModelIndex()) const Q_DECL_OVERRIDE; double subtotal() const { return m_subtotal; } double shipping() const { return m_shipping; } @@ -58,14 +58,14 @@ namespace ICClient { public slots: void update(icclient_ord_order* order); - protected: - QHash roleNames() const Q_DECL_OVERRIDE; - signals: + void rowCountChanged(); void subtotalChanged(); void shippingChanged(); void totalCostChanged(); - void rowCountChanged(); + + protected: + QHash roleNames() const Q_DECL_OVERRIDE; private: void addItem(Item const& item); -- cgit v1.2.3