MagicSmoke  $VERSION$
srcMOTicketAbstract.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_MOTicketAbstract
4 #define WOBGEN_MOTicketAbstract
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 "MOPriceCategory"
17 {
18  Q_GADGET
19  public:
20  Q_ENUMS(TicketState);
24  Reserved=785,
26  Ordered=786,
28  Used=771,
30  Cancelled=4,
32  Refund=4,
34  MaskBlock=256,
36  MaskPay=512,
38  MaskUsable=768,
40  MaskReturnable=16,
42  MaskChangeable=16
43  };
45  static TicketState str2TicketState(QString,bool*ok=0);
47  static QString TicketState2str(TicketState);
49  static TicketState locstr2TicketState(QString,bool*ok=0);
51  static QString TicketState2locstr(TicketState);
53  Q_PROPERTY(Nullable<QString> ticketid READ ticketid WRITE setticketid)
55  Q_PROPERTY(Nullable<qint64> eventid READ eventid WRITE seteventid)
57  Q_PROPERTY(Nullable<qint64> price READ price WRITE setprice)
59  Q_PROPERTY(Nullable<TicketState> status READ status WRITE setstatus)
61  Q_PROPERTY(Nullable<qint64> orderid READ orderid WRITE setorderid)
63  Q_PROPERTY(Nullable<qint64> pricecategoryid READ pricecategoryid WRITE setpricecategoryid)
65  Q_PROPERTY(Nullable<MOPriceCategory> pricecategory READ pricecategory WRITE setpricecategory)
67  Q_PROPERTY(Nullable<QString> tags READ tags WRITE settags)
69  Q_PROPERTY(Nullable<QString> seat READ seat WRITE setseat)
70  protected:
71  Nullable<QString> mp_ticketid;
72  Nullable<qint64> mp_eventid;
73  Nullable<qint64> mp_price;
74  Nullable<TicketState> mp_status;
75  Nullable<qint64> mp_orderid;
76  Nullable<qint64> mp_pricecategoryid;
77  Nullable<MOPriceCategory> mp_pricecategory;
78  Nullable<QString> mp_tags;
79  Nullable<QString> mp_seat;
80  public:
82  virtual Nullable<QString> ticketid()const{return mp_ticketid;}
84  virtual Nullable<qint64> eventid()const{return mp_eventid;}
86  virtual Nullable<qint64> price()const{return mp_price;}
88  virtual Nullable<TicketState> status()const{return mp_status;}
90  virtual Nullable<qint64> orderid()const{return mp_orderid;}
92  virtual Nullable<qint64> pricecategoryid()const{return mp_pricecategoryid;}
94  virtual Nullable<MOPriceCategory> pricecategory()const{return mp_pricecategory;}
96  virtual Nullable<QString> tags()const{return mp_tags;}
98  virtual Nullable<QString> seat()const{return mp_seat;}
100  virtual void setticketid(Nullable<QString> s){mp_ticketid=s;}
102  virtual void seteventid(Nullable<qint64> s){mp_eventid=s;}
104  virtual void setprice(Nullable<qint64> s){mp_price=s;}
106  virtual void setstatus(Nullable<TicketState> s){mp_status=s;}
108  virtual void setorderid(Nullable<qint64> s){mp_orderid=s;}
110  virtual void setpricecategoryid(Nullable<qint64> s){mp_pricecategoryid=s;}
112  virtual void setpricecategory(Nullable<MOPriceCategory> s){mp_pricecategory=s;}
114  virtual void settags(Nullable<QString> s){mp_tags=s;}
116  virtual void setseat(Nullable<QString> s){mp_seat=s;}
117  public:
119  QString toString();
123  QDomElement toXml(QDomDocument&doc,QString name="Ticket");
125  void toXml(QDomDocument&,QDomElement&);
126  public:
128  MOTicketAbstract():WObject(){}
132  MOTicketAbstract& operator=(const MOTicketAbstract&);
134  explicit MOTicketAbstract(const QDomElement&);
136  static MOTicketAbstract fromXml(const QDomElement&);
138  static MOTicketAbstract fromString(const QString&);
140  virtual ~MOTicketAbstract(){}
141 
142 };
144 Q_DECLARE_METATYPE(QList<MOTicketAbstract::TicketState>)
148 
149 //END OF AUTOMATICALLY GENERATED FILE
150 #endif
virtual Nullable< qint64 > orderid() const
Definition: srcMOTicketAbstract.h:90
virtual void setseat(Nullable< QString > s)
Definition: srcMOTicketAbstract.h:116
virtual ~MOTicketAbstract()
destructor: deletes this copy of the object
Definition: srcMOTicketAbstract.h:140
#define WOBGEN_MAGICSMOKE__WOB_EXPORT
Definition: srcMOTicketAbstract.h:8
MOTicketAbstract()
default constructor: constructs an invalid instance of MOTicketAbstract
Definition: srcMOTicketAbstract.h:128
virtual Nullable< QString > tags() const
Definition: srcMOTicketAbstract.h:96
virtual void seteventid(Nullable< qint64 > s)
Definition: srcMOTicketAbstract.h:102
TicketState
Definition: srcMOTicketAbstract.h:22
virtual void setorderid(Nullable< qint64 > s)
Definition: srcMOTicketAbstract.h:108
virtual void setpricecategoryid(Nullable< qint64 > s)
Definition: srcMOTicketAbstract.h:110
virtual Nullable< QString > seat() const
Definition: srcMOTicketAbstract.h:98
This class represents the data of a ticket as stored in the database.
Definition: srcMOTicketAbstract.h:16
virtual Nullable< qint64 > pricecategoryid() const
Definition: srcMOTicketAbstract.h:92
virtual void setstatus(Nullable< TicketState > s)
Definition: srcMOTicketAbstract.h:106
virtual Nullable< qint64 > eventid() const
Definition: srcMOTicketAbstract.h:84
Definition: srcMOPriceCategory.h:14
virtual void settags(Nullable< QString > s)
Definition: srcMOTicketAbstract.h:114
virtual void setticketid(Nullable< QString > s)
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the ...
Definition: srcMOTicketAbstract.h:100
Q_DECLARE_METATYPE(QDomNode)
virtual void setprice(Nullable< qint64 > s)
Definition: srcMOTicketAbstract.h:104
virtual Nullable< TicketState > status() const
Definition: srcMOTicketAbstract.h:88
virtual Nullable< MOPriceCategory > pricecategory() const
Definition: srcMOTicketAbstract.h:94
virtual void setpricecategory(Nullable< MOPriceCategory > s)
Definition: srcMOTicketAbstract.h:112
virtual Nullable< qint64 > price() const
Definition: srcMOTicketAbstract.h:86