#ifndef QICCLIENT_PRODUCT_HXX #define QICCLIENT_PRODUCT_HXX #include namespace ICClient { struct Product { enum ProductRoles { SkuRole = Qt::UserRole + 1, DescriptionRole, CommentRole, ImageRole, PriceRole, WeightRole, AuthorRole }; Product(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->image) image = QString{product->image}; if (product->author) author = QString{product->author}; } QString sku; QString description; QString comment; QString image; double price; double weight; QString author; }; } #endif // QICCLIENT_PRODUCT_HXX