MagicSmoke  $VERSION$
srcMOOrderAbstract.h
Go to the documentation of this file.
1 //BEGIN OF AUTOMATICALLY GENERATED FILE
2 //DO NOT EDIT THIS FILE DIRECTLY, USE THE XML SOURCE!
3 #ifndef WOBGEN_MOOrderAbstract
4 #define WOBGEN_MOOrderAbstract
5 
6 
7 #ifndef WOBGEN_MAGICSMOKE__WOB_EXPORT
8 #define WOBGEN_MAGICSMOKE__WOB_EXPORT Q_DECL_IMPORT
9 #endif
10 
11 #include "WObject"
12 #include <QCoreApplication>
13 
14 #include "MOCustomerInfo"
15 #include "MOAddress"
16 #include "MOAddress"
17 #include "MOTicket"
18 #include "MOVoucher"
19 #include "MOItemInfo"
20 #include "MOShipping"
23 {
24  Q_GADGET
25  public:
26  Q_ENUMS(OrderState);
28  enum OrderState{
30  Placed=0,
32  Sent=1,
34  Sold=1,
36  Cancelled=2,
38  Reserved=4,
40  Closed=128
41  };
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)
98  protected:
99  Nullable<qint64> mp_orderid;
100  Nullable<qint64> mp_customerid;
101  Nullable<MOCustomerInfo> mp_customer;
102  Nullable<qint64> mp_invoiceaddressid;
103  Nullable<MOAddress> mp_invoiceaddress;
104  Nullable<qint64> mp_deliveryaddressid;
105  Nullable<MOAddress> mp_deliveryaddress;
106  Nullable<QString> mp_soldby;
107  QList<MOTicket> mp_tickets;
108  QList<MOVoucher> mp_vouchers;
109  QList<MOItemInfo> mp_items;
110  Nullable<OrderState> mp_status;
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;
116  Nullable<MOShipping> mp_shippingtype;
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;
123  public:
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;}
131  virtual Nullable<qint64> invoiceaddressid()const{return mp_invoiceaddressid;}
133  virtual Nullable<MOAddress> invoiceaddress()const{return mp_invoiceaddress;}
135  virtual Nullable<qint64> deliveryaddressid()const{return mp_deliveryaddressid;}
137  virtual Nullable<MOAddress> deliveryaddress()const{return mp_deliveryaddress;}
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;}
155  virtual Nullable<qint64> shippingcosts()const{return mp_shippingcosts;}
157  virtual Nullable<qint64> shippingtypeid()const{return mp_shippingtypeid;}
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;}
171  virtual Nullable<QString> coupondescription()const{return mp_coupondescription;}
173  virtual void setorderid(Nullable<qint64> s){mp_orderid=s;}
175  virtual void setcustomerid(Nullable<qint64> s){mp_customerid=s;}
177  virtual void setcustomer(Nullable<MOCustomerInfo> s){mp_customer=s;}
179  virtual void setinvoiceaddressid(Nullable<qint64> s){mp_invoiceaddressid=s;}
181  virtual void setinvoiceaddress(Nullable<MOAddress> s){mp_invoiceaddress=s;}
183  virtual void setdeliveryaddressid(Nullable<qint64> s){mp_deliveryaddressid=s;}
185  virtual void setdeliveryaddress(Nullable<MOAddress> s){mp_deliveryaddress=s;}
187  virtual void setsoldby(Nullable<QString> s){mp_soldby=s;}
189  virtual void settickets(QList<MOTicket> s){mp_tickets=s;}
190  virtual void cleartickets(){mp_tickets.clear();}
191  virtual void addtickets(Nullable<MOTicket> a){mp_tickets.append(a);}
193  virtual void setvouchers(QList<MOVoucher> s){mp_vouchers=s;}
194  virtual void clearvouchers(){mp_vouchers.clear();}
195  virtual void addvouchers(Nullable<MOVoucher> a){mp_vouchers.append(a);}
197  virtual void setitems(QList<MOItemInfo> s){mp_items=s;}
198  virtual void clearitems(){mp_items.clear();}
199  virtual void additems(Nullable<MOItemInfo> a){mp_items.append(a);}
201  virtual void setstatus(Nullable<OrderState> s){mp_status=s;}
203  virtual void setamountpaid(Nullable<qint64> s){mp_amountpaid=s;}
205  virtual void setamountdue(Nullable<qint64> s){mp_amountdue=s;}
207  virtual void settotalprice(Nullable<qint64> s){mp_totalprice=s;}
209  virtual void setshippingcosts(Nullable<qint64> s){mp_shippingcosts=s;}
211  virtual void setshippingtypeid(Nullable<qint64> s){mp_shippingtypeid=s;}
213  virtual void setshippingtype(Nullable<MOShipping> s){mp_shippingtype=s;}
215  virtual void setordertime(Nullable<qint64> s){mp_ordertime=s;}
217  virtual void setsenttime(Nullable<qint64> s){mp_senttime=s;}
219  virtual void setcomments(Nullable<QString> s){mp_comments=s;}
221  virtual void settags(Nullable<QString> s){mp_tags=s;}
223  virtual void setcouponid(Nullable<QString> s){mp_couponid=s;}
225  virtual void setcoupondescription(Nullable<QString> s){mp_coupondescription=s;}
226  public:
228  QString toString();
232  QDomElement toXml(QDomDocument&doc,QString name="Order");
234  void toXml(QDomDocument&,QDomElement&);
235  public:
237  MOOrderAbstract():WObject(){}
241  MOOrderAbstract& operator=(const MOOrderAbstract&);
243  explicit MOOrderAbstract(const QDomElement&);
245  static MOOrderAbstract fromXml(const QDomElement&);
247  static MOOrderAbstract fromString(const QString&);
249  virtual ~MOOrderAbstract(){}
250 
251 };
253 Q_DECLARE_METATYPE(QList<MOOrderAbstract::OrderState>)
257 
258 //END OF AUTOMATICALLY GENERATED FILE
259 #endif
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
Definition: voucher.h:24
virtual Nullable< qint64 > deliveryaddressid() const
Definition: srcMOOrderAbstract.h:135
Definition: ticket.h:25
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
Definition: address.h:24
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