MagicSmoke
$VERSION$
|
This class represents the data of a ticket as stored in the database. More...
#include <srcMOTicketAbstract.h>
Public Types | |
enum | TicketState { Reserved =785, Ordered =786, Used =771, Cancelled =4, Refund =4, MaskBlock =256, MaskPay =512, MaskUsable =768, MaskReturnable =16, MaskChangeable =16 } |
Public Member Functions | |
MOTicketAbstract () | |
default constructor: constructs an invalid instance of MOTicketAbstract More... | |
MOTicketAbstract (const MOTicketAbstract &) | |
copy constructor: creates a (deep) copy of the object More... | |
MOTicketAbstract (const QDomElement &) | |
special constructor: create from the XML representation, deserializing the object More... | |
virtual | ~MOTicketAbstract () |
destructor: deletes this copy of the object More... | |
virtual Nullable< qint64 > | eventid () const |
MOTicketAbstract & | operator= (const MOTicketAbstract &) |
copy assignment: creates a (deep) copy of the object More... | |
virtual Nullable< qint64 > | orderid () const |
virtual Nullable< qint64 > | price () const |
virtual Nullable< MOPriceCategory > | pricecategory () const |
virtual Nullable< qint64 > | pricecategoryid () const |
Q_ENUMS (TicketState) | |
virtual Nullable< QString > | seat () const |
virtual void | seteventid (Nullable< qint64 > s) |
virtual void | setorderid (Nullable< qint64 > s) |
virtual void | setprice (Nullable< qint64 > s) |
virtual void | setpricecategory (Nullable< MOPriceCategory > s) |
virtual void | setpricecategoryid (Nullable< qint64 > s) |
virtual void | setseat (Nullable< QString > s) |
virtual void | setstatus (Nullable< TicketState > s) |
virtual void | settags (Nullable< QString > s) |
virtual void | setticketid (Nullable< QString > s) |
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server More... | |
virtual Nullable< TicketState > | status () const |
virtual Nullable< QString > | tags () const |
virtual Nullable< QString > | ticketid () const |
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server More... | |
QString | toString () |
Serializes the object to XML and returns the string representation of that XML. More... | |
QDomElement | toXml (QDomDocument &doc, QString name="Ticket") |
Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself. More... | |
void | toXml (QDomDocument &, QDomElement &) |
Serializes the object into the given element. More... | |
Static Public Member Functions | |
static MOTicketAbstract | fromString (const QString &) |
create MOTicketAbstract from XML formatted string (inverse of toString) More... | |
static MOTicketAbstract | fromXml (const QDomElement &) |
create MOTicketAbstract from XML (inverse of toXml) More... | |
static TicketState | locstr2TicketState (QString, bool *ok=0) |
Converts a localized string into the corresponding enum TicketState value. More... | |
static TicketState | str2TicketState (QString, bool *ok=0) |
Converts string into the corresponding enum TicketState value. More... | |
static QString | TicketState2locstr (TicketState) |
Converts enum TicketState value into the corresponding localized string. More... | |
static QString | TicketState2str (TicketState) |
Converts enum TicketState value into the corresponding string. More... | |
Protected Attributes | |
Nullable< qint64 > | mp_eventid |
Nullable< qint64 > | mp_orderid |
Nullable< qint64 > | mp_price |
Nullable< MOPriceCategory > | mp_pricecategory |
Nullable< qint64 > | mp_pricecategoryid |
Nullable< QString > | mp_seat |
Nullable< TicketState > | mp_status |
Nullable< QString > | mp_tags |
Nullable< QString > | mp_ticketid |
Properties | |
Nullable< qint64 > | eventid |
Nullable< qint64 > | orderid |
Nullable< qint64 > | price |
Nullable< MOPriceCategory > | pricecategory |
Nullable< qint64 > | pricecategoryid |
Nullable< QString > | seat |
Nullable< TicketState > | status |
Nullable< QString > | tags |
Nullable< QString > | ticketid |
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server More... | |
This class represents the data of a ticket as stored in the database.
|
inline |
default constructor: constructs an invalid instance of MOTicketAbstract
Referenced by fromString(), and fromXml().
MOTicketAbstract::MOTicketAbstract | ( | const MOTicketAbstract & | o | ) |
copy constructor: creates a (deep) copy of the object
References mp_eventid, mp_orderid, mp_price, mp_pricecategory, mp_pricecategoryid, mp_seat, mp_status, mp_tags, and mp_ticketid.
|
explicit |
special constructor: create from the XML representation, deserializing the object
References seteventid(), setorderid(), setprice(), setpricecategory(), setpricecategoryid(), setseat(), setstatus(), settags(), setticketid(), and str2TicketState().
|
inlinevirtual |
destructor: deletes this copy of the object
|
inlinevirtual |
Referenced by MOTicket::event().
|
static |
create MOTicketAbstract from XML formatted string (inverse of toString)
References MOTicketAbstract().
|
static |
create MOTicketAbstract from XML (inverse of toXml)
References MOTicketAbstract().
|
static |
Converts a localized string into the corresponding enum TicketState value.
References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.
MOTicketAbstract & MOTicketAbstract::operator= | ( | const MOTicketAbstract & | o | ) |
copy assignment: creates a (deep) copy of the object
References mp_eventid, mp_orderid, mp_price, mp_pricecategory, mp_pricecategoryid, mp_seat, mp_status, mp_tags, and mp_ticketid.
Referenced by MOTicketAudit::operator=().
|
inlinevirtual |
|
inlinevirtual |
Referenced by MOTicket::amountToPay(), and MOTicket::priceString().
|
inlinevirtual |
|
inlinevirtual |
MOTicketAbstract::Q_ENUMS | ( | TicketState | ) |
|
inlinevirtual |
|
inlinevirtual |
Referenced by MOTicketAbstract(), and MOTicket::setEvent().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicketAbstract().
|
inlinevirtual |
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server
Referenced by MOTicketAbstract().
|
inlinevirtual |
Referenced by MOTicket::amountToPay(), and MOTicket::statusString().
|
static |
Converts string into the corresponding enum TicketState value.
References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.
Referenced by MOTicketAbstract().
|
inlinevirtual |
|
inlinevirtual |
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server
Referenced by MOTicket::event().
|
static |
Converts enum TicketState value into the corresponding localized string.
References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.
Referenced by MOTicket::statusString().
|
static |
Converts enum TicketState value into the corresponding string.
References Cancelled, MaskBlock, MaskChangeable, MaskPay, MaskReturnable, MaskUsable, Ordered, Refund, Reserved, and Used.
QString MOTicketAbstract::toString | ( | ) |
Serializes the object to XML and returns the string representation of that XML.
References toXml().
QDomElement MOTicketAbstract::toXml | ( | QDomDocument & | doc, |
QString | name = "Ticket" |
||
) |
Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself.
doc | the DOM document node for which to generate the element |
name | the name to give the generated element, per default "MOTicketAbstract" is used |
Referenced by toString(), and MOTicketAudit::toXml().
void MOTicketAbstract::toXml | ( | QDomDocument & | doc, |
QDomElement & | r | ||
) |
Serializes the object into the given element.
References mp_eventid, mp_orderid, mp_price, mp_pricecategory, mp_pricecategoryid, mp_seat, mp_status, mp_tags, and mp_ticketid.
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
protected |
Referenced by MOTicketAbstract(), operator=(), and toXml().
|
readwrite |
Referenced by compare().
|
readwrite |
|
readwrite |
Referenced by compare().
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server
Referenced by MOAItem::itemID().