MagicSmoke  $VERSION$
srcMOTicketUse.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_MOTicketUse
4 #define WOBGEN_MOTicketUse
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 "MOTicket"
17 {
18  Q_GADGET
19  public:
20  Q_ENUMS(TicketUseStatus);
24  Ok=1,
26  NotFound=2,
28  WrongEvent=3,
30  AlreadyUsed=4,
32  NotUsable=5,
34  Unpaid=6,
36  InvalidEvent=7
37  };
39  static TicketUseStatus str2TicketUseStatus(QString,bool*ok=0);
41  static QString TicketUseStatus2str(TicketUseStatus);
43  static TicketUseStatus locstr2TicketUseStatus(QString,bool*ok=0);
45  static QString TicketUseStatus2locstr(TicketUseStatus);
47  Q_PROPERTY(Nullable<MOTicket> ticket READ ticket WRITE setticket)
49  Q_PROPERTY(Nullable<TicketUseStatus> usestatus READ usestatus WRITE setusestatus)
51  Q_PROPERTY(Nullable<qint64> amounttickets READ amounttickets WRITE setamounttickets)
53  Q_PROPERTY(Nullable<qint64> amountused READ amountused WRITE setamountused)
55  Q_PROPERTY(Nullable<qint64> amountopen READ amountopen WRITE setamountopen)
57  Q_PROPERTY(Nullable<qint64> amountreserved READ amountreserved WRITE setamountreserved)
58  protected:
59  Nullable<MOTicket> mp_ticket;
60  Nullable<TicketUseStatus> mp_usestatus;
61  Nullable<qint64> mp_amounttickets;
62  Nullable<qint64> mp_amountused;
63  Nullable<qint64> mp_amountopen;
64  Nullable<qint64> mp_amountreserved;
65  public:
67  virtual Nullable<MOTicket> ticket()const{return mp_ticket;}
69  virtual Nullable<TicketUseStatus> usestatus()const{return mp_usestatus;}
71  virtual Nullable<qint64> amounttickets()const{return mp_amounttickets;}
73  virtual Nullable<qint64> amountused()const{return mp_amountused;}
75  virtual Nullable<qint64> amountopen()const{return mp_amountopen;}
77  virtual Nullable<qint64> amountreserved()const{return mp_amountreserved;}
79  virtual void setticket(Nullable<MOTicket> s){mp_ticket=s;}
81  virtual void setusestatus(Nullable<TicketUseStatus> s){mp_usestatus=s;}
83  virtual void setamounttickets(Nullable<qint64> s){mp_amounttickets=s;}
85  virtual void setamountused(Nullable<qint64> s){mp_amountused=s;}
87  virtual void setamountopen(Nullable<qint64> s){mp_amountopen=s;}
89  virtual void setamountreserved(Nullable<qint64> s){mp_amountreserved=s;}
90  public:
92  QString toString();
96  QDomElement toXml(QDomDocument&doc,QString name="TicketUse");
98  void toXml(QDomDocument&,QDomElement&);
99  public:
101  MOTicketUse():WObject(){}
103  MOTicketUse(const MOTicketUse&);
105  MOTicketUse& operator=(const MOTicketUse&);
107  explicit MOTicketUse(const QDomElement&);
109  static MOTicketUse fromXml(const QDomElement&);
111  static MOTicketUse fromString(const QString&);
113  virtual ~MOTicketUse(){}
114 
115 };
117 Q_DECLARE_METATYPE(QList<MOTicketUse::TicketUseStatus>)
121 
122 //END OF AUTOMATICALLY GENERATED FILE
123 #endif
TicketUseStatus
Definition: srcMOTicketUse.h:22
#define WOBGEN_MAGICSMOKE__WOB_EXPORT
Definition: srcMOTicketUse.h:8
virtual void setamounttickets(Nullable< qint64 > s)
The amount of usable/used tickets in this event.
Definition: srcMOTicketUse.h:83
virtual Nullable< qint64 > amountopen() const
The amount of tickets for the event that have not been used yet.
Definition: srcMOTicketUse.h:75
virtual Nullable< qint64 > amountused() const
The amount of used tickets in the event (after the operation)
Definition: srcMOTicketUse.h:73
Definition: ticket.h:25
virtual void setusestatus(Nullable< TicketUseStatus > s)
The result of the UseTicket operation.
Definition: srcMOTicketUse.h:81
virtual void setamountused(Nullable< qint64 > s)
The amount of used tickets in the event (after the operation)
Definition: srcMOTicketUse.h:85
virtual Nullable< qint64 > amounttickets() const
The amount of usable/used tickets in this event.
Definition: srcMOTicketUse.h:71
virtual void setticket(Nullable< MOTicket > s)
The ticket, if found.
Definition: srcMOTicketUse.h:79
MOTicketUse()
default constructor: constructs an invalid instance of MOTicketUse
Definition: srcMOTicketUse.h:101
Q_DECLARE_METATYPE(QDomNode)
virtual void setamountreserved(Nullable< qint64 > s)
The amount of tickets for the event that could be used, but are only reserved until now...
Definition: srcMOTicketUse.h:89
virtual void setamountopen(Nullable< qint64 > s)
The amount of tickets for the event that have not been used yet.
Definition: srcMOTicketUse.h:87
Objects of this class are sent back as response to UseTicket.
Definition: srcMOTicketUse.h:16
virtual Nullable< TicketUseStatus > usestatus() const
The result of the UseTicket operation.
Definition: srcMOTicketUse.h:69
virtual ~MOTicketUse()
destructor: deletes this copy of the object
Definition: srcMOTicketUse.h:113
virtual Nullable< qint64 > amountreserved() const
The amount of tickets for the event that could be used, but are only reserved until now...
Definition: srcMOTicketUse.h:77