MagicSmoke  $VERSION$
srcMOVoucherAbstract.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_MOVoucherAbstract
4 #define WOBGEN_MOVoucherAbstract
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 
15 {
16  Q_GADGET
17  public:
18  Q_ENUMS(VoucherState);
22  Ok=0,
24  InvalidValue=1,
26  InvalidPrice=2,
28  InvalidTime=3
29  };
31  static VoucherState str2VoucherState(QString,bool*ok=0);
33  static QString VoucherState2str(VoucherState);
35  static VoucherState locstr2VoucherState(QString,bool*ok=0);
37  static QString VoucherState2locstr(VoucherState);
39  Q_PROPERTY(Nullable<QString> voucherid READ voucherid WRITE setvoucherid)
41  Q_PROPERTY(Nullable<qint64> value READ value WRITE setvalue)
43  Q_PROPERTY(Nullable<qint64> price READ price WRITE setprice)
45  Q_PROPERTY(Nullable<VoucherState> status READ status WRITE setstatus)
47  Q_PROPERTY(Nullable<bool> isused READ isused WRITE setisused)
49  Q_PROPERTY(Nullable<qint64> orderid READ orderid WRITE setorderid)
51  Q_PROPERTY(Nullable<QString> tags READ tags WRITE settags)
53  Q_PROPERTY(Nullable<qint64> validtime READ validtime WRITE setvalidtime)
54  protected:
55  Nullable<QString> mp_voucherid;
56  Nullable<qint64> mp_value;
57  Nullable<qint64> mp_price;
58  Nullable<VoucherState> mp_status;
59  Nullable<bool> mp_isused;
60  Nullable<qint64> mp_orderid;
61  Nullable<QString> mp_tags;
62  Nullable<qint64> mp_validtime;
63  public:
65  virtual Nullable<QString> voucherid()const{return mp_voucherid;}
67  virtual Nullable<qint64> value()const{return mp_value;}
69  virtual Nullable<qint64> price()const{return mp_price;}
71  virtual Nullable<VoucherState> status()const{return mp_status;}
73  virtual Nullable<bool> isused()const{return mp_isused;}
75  virtual Nullable<qint64> orderid()const{return mp_orderid;}
77  virtual Nullable<QString> tags()const{return mp_tags;}
79  virtual Nullable<qint64> validtime()const{return mp_validtime;}
81  virtual void setvoucherid(Nullable<QString> s){mp_voucherid=s;}
83  virtual void setvalue(Nullable<qint64> s){mp_value=s;}
85  virtual void setprice(Nullable<qint64> s){mp_price=s;}
87  virtual void setstatus(Nullable<VoucherState> s){mp_status=s;}
89  virtual void setisused(Nullable<bool> s){mp_isused=s;}
91  virtual void setorderid(Nullable<qint64> s){mp_orderid=s;}
93  virtual void settags(Nullable<QString> s){mp_tags=s;}
95  virtual void setvalidtime(Nullable<qint64> s){mp_validtime=s;}
96  public:
98  QString toString();
102  QDomElement toXml(QDomDocument&doc,QString name="Voucher");
104  void toXml(QDomDocument&,QDomElement&);
105  public:
107  MOVoucherAbstract():WObject(){}
111  MOVoucherAbstract& operator=(const MOVoucherAbstract&);
113  explicit MOVoucherAbstract(const QDomElement&);
115  static MOVoucherAbstract fromXml(const QDomElement&);
117  static MOVoucherAbstract fromString(const QString&);
119  virtual ~MOVoucherAbstract(){}
120 
121 };
123 Q_DECLARE_METATYPE(QList<MOVoucherAbstract::VoucherState>)
127 
128 //END OF AUTOMATICALLY GENERATED FILE
129 #endif
virtual Nullable< qint64 > value() const
What the voucher is worth in cents.
Definition: srcMOVoucherAbstract.h:67
virtual Nullable< QString > tags() const
Definition: srcMOVoucherAbstract.h:77
virtual void setstatus(Nullable< VoucherState > s)
Definition: srcMOVoucherAbstract.h:87
virtual Nullable< qint64 > validtime() const
Definition: srcMOVoucherAbstract.h:79
virtual Nullable< qint64 > orderid() const
Definition: srcMOVoucherAbstract.h:75
virtual void setvalidtime(Nullable< qint64 > s)
Definition: srcMOVoucherAbstract.h:95
virtual void setprice(Nullable< qint64 > s)
What the voucher costs in cents.
Definition: srcMOVoucherAbstract.h:85
virtual void setvalue(Nullable< qint64 > s)
What the voucher is worth in cents.
Definition: srcMOVoucherAbstract.h:83
virtual Nullable< qint64 > price() const
What the voucher costs in cents.
Definition: srcMOVoucherAbstract.h:69
virtual void setvoucherid(Nullable< QString > s)
Definition: srcMOVoucherAbstract.h:81
virtual Nullable< bool > isused() const
The voucher has been used. There may still be value on it.
Definition: srcMOVoucherAbstract.h:73
virtual void settags(Nullable< QString > s)
Definition: srcMOVoucherAbstract.h:93
virtual Nullable< VoucherState > status() const
Definition: srcMOVoucherAbstract.h:71
VoucherState
Definition: srcMOVoucherAbstract.h:20
Q_DECLARE_METATYPE(QDomNode)
Definition: srcMOVoucherAbstract.h:14
#define WOBGEN_MAGICSMOKE__WOB_EXPORT
Definition: srcMOVoucherAbstract.h:8
virtual void setorderid(Nullable< qint64 > s)
Definition: srcMOVoucherAbstract.h:91
virtual ~MOVoucherAbstract()
destructor: deletes this copy of the object
Definition: srcMOVoucherAbstract.h:119
MOVoucherAbstract()
default constructor: constructs an invalid instance of MOVoucherAbstract
Definition: srcMOVoucherAbstract.h:107
virtual void setisused(Nullable< bool > s)
The voucher has been used. There may still be value on it.
Definition: srcMOVoucherAbstract.h:89