3 #ifndef WOBGEN_MOWebCart
4 #define WOBGEN_MOWebCart
7 #ifndef WOBGEN_MAGICSMOKE__WOB_EXPORT
8 #define WOBGEN_MAGICSMOKE__WOB_EXPORT Q_DECL_IMPORT
12 #include <QCoreApplication>
17 #include "MOCartTicket"
18 #include "MOCartVoucher"
27 Q_PROPERTY(Nullable<QString> cartid READ cartid WRITE setcartid)
29 Q_PROPERTY(Nullable<qint64> timeout READ timeout WRITE settimeout)
31 Q_PROPERTY(Nullable<qint64> customerid READ customerid WRITE setcustomerid)
33 Q_PROPERTY(Nullable<qint64> deliveryaddressid READ deliveryaddressid WRITE setdeliveryaddressid)
35 Q_PROPERTY(Nullable<qint64> invoiceaddressid READ invoiceaddressid WRITE setinvoiceaddressid)
37 Q_PROPERTY(Nullable<QString> comment READ comment WRITE setcomment)
39 Q_PROPERTY(Nullable<qint64> shippingid READ shippingid WRITE setshippingid)
41 Q_PROPERTY(Nullable<MOCustomer> customer READ customer WRITE setcustomer)
43 Q_PROPERTY(Nullable<MOAddress> deliveryaddress READ deliveryaddress WRITE setdeliveryaddress)
45 Q_PROPERTY(Nullable<MOAddress> invoiceaddress READ invoiceaddress WRITE setinvoiceaddress)
47 Q_PROPERTY(QList<MOCartTicket> tickets READ tickets WRITE settickets)
49 Q_PROPERTY(QList<MOCartVoucher> vouchers READ vouchers WRITE setvouchers)
51 Q_PROPERTY(QList<MOCartItem> items READ items WRITE setitems)
53 Q_PROPERTY(Nullable<MOShipping> shipping READ shipping WRITE setshipping)
55 Q_PROPERTY(Nullable<QString> couponid READ couponid WRITE setcouponid)
57 Q_PROPERTY(Nullable<MOCoupon> coupon READ coupon WRITE setcoupon)
77 virtual Nullable<QString>
cartid()
const{
return mp_cartid;}
79 virtual Nullable<qint64>
timeout()
const{
return mp_timeout;}
81 virtual Nullable<qint64>
customerid()
const{
return mp_customerid;}
87 virtual Nullable<QString>
comment()
const{
return mp_comment;}
89 virtual Nullable<qint64>
shippingid()
const{
return mp_shippingid;}
91 virtual Nullable<MOCustomer>
customer()
const{
return mp_customer;}
97 virtual QList<MOCartTicket>
tickets()
const{
return mp_tickets;}
99 virtual QList<MOCartVoucher>
vouchers()
const{
return mp_vouchers;}
101 virtual QList<MOCartItem>
items()
const{
return mp_items;}
103 virtual Nullable<MOShipping>
shipping()
const{
return mp_shipping;}
105 virtual Nullable<QString>
couponid()
const{
return mp_couponid;}
107 virtual Nullable<MOCoupon>
coupon()
const{
return mp_coupon;}
109 virtual void setcartid(Nullable<QString> s){mp_cartid=s;}
129 virtual void settickets(QList<MOCartTicket> s){mp_tickets=s;}
131 virtual void addtickets(Nullable<MOCartTicket> a){mp_tickets.append(a);}
135 virtual void addvouchers(Nullable<MOCartVoucher> a){mp_vouchers.append(a);}
137 virtual void setitems(QList<MOCartItem> s){mp_items=s;}
139 virtual void additems(Nullable<MOCartItem> a){mp_items.append(a);}
145 virtual void setcoupon(Nullable<MOCoupon> s){mp_coupon=s;}
152 QDomElement toXml(QDomDocument&doc,QString name=
"WebCart");
154 void toXml(QDomDocument&,QDomElement&);
165 static MOWebCart fromXml(
const QDomElement&);
167 static MOWebCart fromString(
const QString&);
virtual void clearitems()
Definition: srcMOWebCart.h:138
virtual Nullable< QString > comment() const
optional comments from the customer
Definition: srcMOWebCart.h:87
virtual Nullable< MOCoupon > coupon() const
Definition: srcMOWebCart.h:107
QList< MOCartTicket > mp_tickets
Definition: srcMOWebCart.h:69
virtual void clearvouchers()
Definition: srcMOWebCart.h:134
virtual void setcartid(Nullable< QString > s)
The cart ID of this session.
Definition: srcMOWebCart.h:109
virtual QList< MOCartTicket > tickets() const
tickets inside this cart as seen in the DB
Definition: srcMOWebCart.h:97
virtual void setshippingid(Nullable< qint64 > s)
optional shipping ID
Definition: srcMOWebCart.h:121
The cart as used by the web user interface, this maps into the cart tables. This class is never used ...
Definition: srcMOWebCart.h:23
virtual Nullable< qint64 > shippingid() const
optional shipping ID
Definition: srcMOWebCart.h:89
Nullable< MOShipping > mp_shipping
Definition: srcMOWebCart.h:72
virtual void setitems(QList< MOCartItem > s)
shop items inside this cart as seen in the DB
Definition: srcMOWebCart.h:137
virtual void setdeliveryaddressid(Nullable< qint64 > s)
The address to deliver to (mandatory)
Definition: srcMOWebCart.h:115
Nullable< qint64 > mp_customerid
Definition: srcMOWebCart.h:61
virtual Nullable< QString > cartid() const
The cart ID of this session.
Definition: srcMOWebCart.h:77
virtual void settickets(QList< MOCartTicket > s)
tickets inside this cart as seen in the DB
Definition: srcMOWebCart.h:129
virtual void addtickets(Nullable< MOCartTicket > a)
Definition: srcMOWebCart.h:131
virtual void addvouchers(Nullable< MOCartVoucher > a)
Definition: srcMOWebCart.h:135
QList< MOCartVoucher > mp_vouchers
Definition: srcMOWebCart.h:70
Nullable< MOAddress > mp_deliveryaddress
Definition: srcMOWebCart.h:67
virtual void setcouponid(Nullable< QString > s)
An optional coupon code to be used in this order.
Definition: srcMOWebCart.h:143
virtual Nullable< MOAddress > invoiceaddress() const
The address to send the invoice to if different from the delivery address (optional) ...
Definition: srcMOWebCart.h:95
Nullable< MOCoupon > mp_coupon
Definition: srcMOWebCart.h:74
virtual Nullable< QString > couponid() const
An optional coupon code to be used in this order.
Definition: srcMOWebCart.h:105
virtual Nullable< qint64 > customerid() const
The customer of this cart.
Definition: srcMOWebCart.h:81
virtual Nullable< qint64 > deliveryaddressid() const
The address to deliver to (mandatory)
Definition: srcMOWebCart.h:83
virtual void setdeliveryaddress(Nullable< MOAddress > s)
The address to deliver to (mandatory)
Definition: srcMOWebCart.h:125
virtual void additems(Nullable< MOCartItem > a)
Definition: srcMOWebCart.h:139
virtual Nullable< MOCustomer > customer() const
The customer of this cart.
Definition: srcMOWebCart.h:91
virtual void setvouchers(QList< MOCartVoucher > s)
vouchers inside this cart as seen in the DB
Definition: srcMOWebCart.h:133
virtual void setshipping(Nullable< MOShipping > s)
if shipping is set: the shipping type
Definition: srcMOWebCart.h:141
Nullable< qint64 > mp_deliveryaddressid
Definition: srcMOWebCart.h:62
virtual void setcoupon(Nullable< MOCoupon > s)
Definition: srcMOWebCart.h:145
virtual ~MOWebCart()
destructor: deletes this copy of the object
Definition: srcMOWebCart.h:169
virtual QList< MOCartVoucher > vouchers() const
vouchers inside this cart as seen in the DB
Definition: srcMOWebCart.h:99
virtual void settimeout(Nullable< qint64 > s)
When the cart will be automatically deleted.
Definition: srcMOWebCart.h:111
Nullable< MOCustomer > mp_customer
Definition: srcMOWebCart.h:66
QList< MOCartItem > mp_items
Definition: srcMOWebCart.h:71
Nullable< QString > mp_cartid
Definition: srcMOWebCart.h:59
virtual Nullable< qint64 > timeout() const
When the cart will be automatically deleted.
Definition: srcMOWebCart.h:79
virtual void setinvoiceaddress(Nullable< MOAddress > s)
The address to send the invoice to if different from the delivery address (optional) ...
Definition: srcMOWebCart.h:127
virtual void setcustomerid(Nullable< qint64 > s)
The customer of this cart.
Definition: srcMOWebCart.h:113
Nullable< QString > mp_couponid
Definition: srcMOWebCart.h:73
Nullable< qint64 > mp_shippingid
Definition: srcMOWebCart.h:65
virtual Nullable< qint64 > invoiceaddressid() const
The address to send the invoice to if different from the delivery address (optional) ...
Definition: srcMOWebCart.h:85
Q_DECLARE_METATYPE(QDomNode)
virtual void setcomment(Nullable< QString > s)
optional comments from the customer
Definition: srcMOWebCart.h:119
virtual Nullable< MOAddress > deliveryaddress() const
The address to deliver to (mandatory)
Definition: srcMOWebCart.h:93
virtual void cleartickets()
Definition: srcMOWebCart.h:130
#define WOBGEN_MAGICSMOKE__WOB_EXPORT
Definition: srcMOWebCart.h:8
virtual void setcustomer(Nullable< MOCustomer > s)
The customer of this cart.
Definition: srcMOWebCart.h:123
virtual QList< MOCartItem > items() const
shop items inside this cart as seen in the DB
Definition: srcMOWebCart.h:101
MOWebCart()
default constructor: constructs an invalid instance of MOWebCart
Definition: srcMOWebCart.h:157
virtual void setinvoiceaddressid(Nullable< qint64 > s)
The address to send the invoice to if different from the delivery address (optional) ...
Definition: srcMOWebCart.h:117
Nullable< qint64 > mp_invoiceaddressid
Definition: srcMOWebCart.h:63
Nullable< MOAddress > mp_invoiceaddress
Definition: srcMOWebCart.h:68
Nullable< qint64 > mp_timeout
Definition: srcMOWebCart.h:60
Nullable< QString > mp_comment
Definition: srcMOWebCart.h:64
virtual Nullable< MOShipping > shipping() const
if shipping is set: the shipping type
Definition: srcMOWebCart.h:103