summaryrefslogtreecommitdiff
path: root/qicclient/product.hxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:55:36 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-25 10:55:36 +0800
commit18508ea004a66cc30c42c43d14afdc16b2267666 (patch)
tree1171e1d6c8259bb3446b229e298243bb33d47a04 /qicclient/product.hxx
parent91bffad1e8afef36eedf51b50a80a7edf6400f7d (diff)
Rename project to qinterchange
Diffstat (limited to 'qicclient/product.hxx')
-rw-r--r--qicclient/product.hxx63
1 files changed, 0 insertions, 63 deletions
diff --git a/qicclient/product.hxx b/qicclient/product.hxx
deleted file mode 100644
index 57f9641..0000000
--- a/qicclient/product.hxx
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef QICCLIENT_PRODUCT_HXX
-#define QICCLIENT_PRODUCT_HXX
-
-#include <icclient.h>
-
-namespace QICClient {
-
- struct Product
- {
- enum ProductRoles {
- SkuRole = Qt::UserRole + 1,
- DescriptionRole,
- CommentRole,
- ThumbRole,
- ImageRole,
- PriceRole,
- ProdGroupRole,
- WeightRole,
- AuthorRole,
- CrossSellRole
- };
-
- Product() {}
- Product(struct icclient_product* product) :
- price{product->price},
- weight{product->weight}
- {
- if (product->sku)
- sku = QString{product->sku};
- if (product->description)
- description = QString{product->description};
- if (product->comment)
- comment = QString{product->comment};
- if (product->thumb)
- thumb = QString{product->thumb};
- if (product->image)
- image = QString{product->image};
- if (product->prod_group)
- prodGroup = QString{product->prod_group};
- if (product->author)
- author = QString{product->author};
- if (product->crosssell) {
- auto crosssell = product->crosssell;
- for (size_t i = 0; i < crosssell->length; i++)
- crossSell << QString{crosssell->skus[i]};
- }
- }
-
- QString sku;
- QString description;
- QString comment;
- QString thumb;
- QString image;
- double price;
- QString prodGroup;
- double weight;
- QString author;
- QStringList crossSell;
- };
-
-}
-
-#endif