3 #ifndef WOBGEN_MOOrderAbstract
4 #define WOBGEN_MOOrderAbstract
7 #ifndef WOBGEN_MAGICSMOKE__WOB_EXPORT
8 #define WOBGEN_MAGICSMOKE__WOB_EXPORT Q_DECL_IMPORT
12 #include <QCoreApplication>
14 #include "MOCustomerInfo"
43 static OrderState str2OrderState(QString,
bool*ok=0);
45 static QString OrderState2str(OrderState);
47 static OrderState locstr2OrderState(QString,
bool*ok=0);
49 static QString OrderState2locstr(OrderState);
51 Q_PROPERTY(Nullable<qint64> orderid READ orderid WRITE setorderid)
53 Q_PROPERTY(Nullable<qint64> customerid READ customerid WRITE setcustomerid)
55 Q_PROPERTY(Nullable<
MOCustomerInfo> customer READ customer WRITE setcustomer)
57 Q_PROPERTY(Nullable<qint64> invoiceaddressid READ invoiceaddressid WRITE setinvoiceaddressid)
59 Q_PROPERTY(Nullable<
MOAddress> invoiceaddress READ invoiceaddress WRITE setinvoiceaddress)
61 Q_PROPERTY(Nullable<qint64> deliveryaddressid READ deliveryaddressid WRITE setdeliveryaddressid)
63 Q_PROPERTY(Nullable<
MOAddress> deliveryaddress READ deliveryaddress WRITE setdeliveryaddress)
65 Q_PROPERTY(Nullable<QString> soldby READ soldby WRITE setsoldby)
67 Q_PROPERTY(QList<
MOTicket> tickets READ tickets WRITE settickets)
69 Q_PROPERTY(QList<
MOVoucher> vouchers READ vouchers WRITE setvouchers)
71 Q_PROPERTY(QList<
MOItemInfo> items READ items WRITE setitems)
73 Q_PROPERTY(Nullable<
OrderState> status READ status WRITE setstatus)
75 Q_PROPERTY(Nullable<qint64> amountpaid READ amountpaid WRITE setamountpaid)
77 Q_PROPERTY(Nullable<qint64> amountdue READ amountdue WRITE setamountdue)
79 Q_PROPERTY(Nullable<qint64> totalprice READ totalprice WRITE settotalprice)
81 Q_PROPERTY(Nullable<qint64> shippingcosts READ shippingcosts WRITE setshippingcosts)
83 Q_PROPERTY(Nullable<qint64> shippingtypeid READ shippingtypeid WRITE setshippingtypeid)
85 Q_PROPERTY(Nullable<
MOShipping> shippingtype READ shippingtype WRITE setshippingtype)
87 Q_PROPERTY(Nullable<qint64> ordertime READ ordertime WRITE setordertime)
89 Q_PROPERTY(Nullable<qint64> senttime READ senttime WRITE setsenttime)
91 Q_PROPERTY(Nullable<QString> comments READ comments WRITE setcomments)
93 Q_PROPERTY(Nullable<QString> tags READ tags WRITE settags)
95 Q_PROPERTY(Nullable<QString> couponid READ couponid WRITE setcouponid)
97 Q_PROPERTY(Nullable<QString> coupondescription READ coupondescription WRITE setcoupondescription)
99 Nullable<qint64> mp_orderid;
100 Nullable<qint64> mp_customerid;
102 Nullable<qint64> mp_invoiceaddressid;
104 Nullable<qint64> mp_deliveryaddressid;
106 Nullable<QString> mp_soldby;
111 Nullable<qint64> mp_amountpaid;
112 Nullable<qint64> mp_amountdue;
113 Nullable<qint64> mp_totalprice;
114 Nullable<qint64> mp_shippingcosts;
115 Nullable<qint64> mp_shippingtypeid;
117 Nullable<qint64> mp_ordertime;
118 Nullable<qint64> mp_senttime;
119 Nullable<QString> mp_comments;
120 Nullable<QString> mp_tags;
121 Nullable<QString> mp_couponid;
122 Nullable<QString> mp_coupondescription;
125 virtual Nullable<qint64> orderid()
const{
return mp_orderid;}
127 virtual Nullable<qint64>
customerid()
const{
return mp_customerid;}
129 virtual Nullable<MOCustomerInfo>
customer()
const{
return mp_customer;}
139 virtual Nullable<QString>
soldby()
const{
return mp_soldby;}
141 virtual QList<MOTicket>
tickets()
const{
return mp_tickets;}
143 virtual QList<MOVoucher>
vouchers()
const{
return mp_vouchers;}
145 virtual QList<MOItemInfo>
items()
const{
return mp_items;}
147 virtual Nullable<OrderState>
status()
const{
return mp_status;}
149 virtual Nullable<qint64>
amountpaid()
const{
return mp_amountpaid;}
151 virtual Nullable<qint64>
amountdue()
const{
return mp_amountdue;}
153 virtual Nullable<qint64>
totalprice()
const{
return mp_totalprice;}
159 virtual Nullable<MOShipping>
shippingtype()
const{
return mp_shippingtype;}
161 virtual Nullable<qint64>
ordertime()
const{
return mp_ordertime;}
163 virtual Nullable<qint64>
senttime()
const{
return mp_senttime;}
165 virtual Nullable<QString>
comments()
const{
return mp_comments;}
167 virtual Nullable<QString>
tags()
const{
return mp_tags;}
169 virtual Nullable<QString>
couponid()
const{
return mp_couponid;}
177 virtual void setcustomer(Nullable<MOCustomerInfo> s){mp_customer=s;}
187 virtual void setsoldby(Nullable<QString> s){mp_soldby=s;}
191 virtual void addtickets(Nullable<MOTicket> a){mp_tickets.append(a);}
195 virtual void addvouchers(Nullable<MOVoucher> a){mp_vouchers.append(a);}
197 virtual void setitems(QList<MOItemInfo> s){mp_items=s;}
199 virtual void additems(Nullable<MOItemInfo> a){mp_items.append(a);}
201 virtual void setstatus(Nullable<OrderState> s){mp_status=s;}
221 virtual void settags(Nullable<QString> s){mp_tags=s;}
232 QDomElement toXml(QDomDocument&doc,QString name=
"Order");
234 void toXml(QDomDocument&,QDomElement&);
virtual void setvouchers(QList< MOVoucher > s)
Definition: srcMOOrderAbstract.h:193
virtual void setamountdue(Nullable< qint64 > s)
amount that needs to be paid, negative if too much has been paid
Definition: srcMOOrderAbstract.h:205
virtual Nullable< qint64 > shippingcosts() const
costs for shipping
Definition: srcMOOrderAbstract.h:155
virtual Nullable< qint64 > totalprice() const
total price for this order (including shipping and all items)
Definition: srcMOOrderAbstract.h:153
virtual Nullable< qint64 > senttime() const
Definition: srcMOOrderAbstract.h:163
used for basic info about items
Definition: srcMOItemInfo.h:15
virtual Nullable< MOAddress > invoiceaddress() const
Definition: srcMOOrderAbstract.h:133
Definition: customerinfo.h:22
virtual Nullable< qint64 > amountdue() const
amount that needs to be paid, negative if too much has been paid
Definition: srcMOOrderAbstract.h:151
virtual void cleartickets()
Definition: srcMOOrderAbstract.h:190
virtual void setcouponid(Nullable< QString > s)
Definition: srcMOOrderAbstract.h:223
virtual Nullable< OrderState > status() const
Definition: srcMOOrderAbstract.h:147
virtual void setshippingcosts(Nullable< qint64 > s)
costs for shipping
Definition: srcMOOrderAbstract.h:209
MOOrderAbstract()
default constructor: constructs an invalid instance of MOOrderAbstract
Definition: srcMOOrderAbstract.h:237
virtual QList< MOVoucher > vouchers() const
Definition: srcMOOrderAbstract.h:143
virtual Nullable< QString > soldby() const
Definition: srcMOOrderAbstract.h:139
virtual Nullable< MOShipping > shippingtype() const
Definition: srcMOOrderAbstract.h:159
virtual void setcustomerid(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:175
virtual Nullable< QString > couponid() const
Definition: srcMOOrderAbstract.h:169
virtual Nullable< qint64 > deliveryaddressid() const
Definition: srcMOOrderAbstract.h:135
virtual void setamountpaid(Nullable< qint64 > s)
amount that has been paid for this order
Definition: srcMOOrderAbstract.h:203
virtual void setinvoiceaddressid(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:179
virtual void setitems(QList< MOItemInfo > s)
Definition: srcMOOrderAbstract.h:197
virtual void setcustomer(Nullable< MOCustomerInfo > s)
Definition: srcMOOrderAbstract.h:177
#define WOBGEN_MAGICSMOKE__WOB_EXPORT
Definition: srcMOOrderAbstract.h:8
virtual void setinvoiceaddress(Nullable< MOAddress > s)
Definition: srcMOOrderAbstract.h:181
virtual Nullable< qint64 > ordertime() const
Definition: srcMOOrderAbstract.h:161
virtual void additems(Nullable< MOItemInfo > a)
Definition: srcMOOrderAbstract.h:199
virtual Nullable< qint64 > amountpaid() const
amount that has been paid for this order
Definition: srcMOOrderAbstract.h:149
virtual ~MOOrderAbstract()
destructor: deletes this copy of the object
Definition: srcMOOrderAbstract.h:249
virtual void settotalprice(Nullable< qint64 > s)
total price for this order (including shipping and all items)
Definition: srcMOOrderAbstract.h:207
virtual Nullable< qint64 > customerid() const
Definition: srcMOOrderAbstract.h:127
virtual QList< MOItemInfo > items() const
Definition: srcMOOrderAbstract.h:145
virtual void setdeliveryaddress(Nullable< MOAddress > s)
Definition: srcMOOrderAbstract.h:185
virtual void settickets(QList< MOTicket > s)
Definition: srcMOOrderAbstract.h:189
virtual Nullable< QString > tags() const
Definition: srcMOOrderAbstract.h:167
virtual void setdeliveryaddressid(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:183
virtual QList< MOTicket > tickets() const
Definition: srcMOOrderAbstract.h:141
virtual void clearvouchers()
Definition: srcMOOrderAbstract.h:194
virtual void setstatus(Nullable< OrderState > s)
Definition: srcMOOrderAbstract.h:201
virtual Nullable< qint64 > invoiceaddressid() const
Definition: srcMOOrderAbstract.h:131
virtual void addvouchers(Nullable< MOVoucher > a)
Definition: srcMOOrderAbstract.h:195
virtual Nullable< QString > comments() const
Definition: srcMOOrderAbstract.h:165
virtual void setsoldby(Nullable< QString > s)
Definition: srcMOOrderAbstract.h:187
Q_DECLARE_METATYPE(QDomNode)
OrderState
Status the order is in right now.
Definition: srcMOOrderAbstract.h:28
virtual void setordertime(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:215
virtual Nullable< qint64 > shippingtypeid() const
Definition: srcMOOrderAbstract.h:157
virtual void clearitems()
Definition: srcMOOrderAbstract.h:198
virtual void settags(Nullable< QString > s)
Definition: srcMOOrderAbstract.h:221
This class represents an order in its entirety, including any items sold in it.
Definition: srcMOOrderAbstract.h:22
virtual Nullable< QString > coupondescription() const
Definition: srcMOOrderAbstract.h:171
virtual Nullable< MOCustomerInfo > customer() const
Definition: srcMOOrderAbstract.h:129
virtual void addtickets(Nullable< MOTicket > a)
Definition: srcMOOrderAbstract.h:191
virtual void setcomments(Nullable< QString > s)
Definition: srcMOOrderAbstract.h:219
virtual void setshippingtypeid(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:211
virtual void setorderid(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:173
virtual void setsenttime(Nullable< qint64 > s)
Definition: srcMOOrderAbstract.h:217
virtual void setcoupondescription(Nullable< QString > s)
Definition: srcMOOrderAbstract.h:225
virtual Nullable< MOAddress > deliveryaddress() const
Definition: srcMOOrderAbstract.h:137
virtual void setshippingtype(Nullable< MOShipping > s)
Definition: srcMOOrderAbstract.h:213
This class encapsulates shipping types.
Definition: srcMOShipping.h:15