MagicSmoke  $VERSION$
MOTicket Class Reference

#include <ticket.h>

Inheritance diagram for MOTicket:
MOTicketAbstract MOTicketAudit

Public Member Functions

int amountToPay () const
 returns the amount to be paid for this ticket; this may be 0 even if there is a price attached More...
 
MOEvent event () const
 returns the event that this ticket belongs to - does a roundtrip to the database the first time this is called! More...
 
QString priceCategoryName () const
 returns the full price category name More...
 
QString priceCategoryShort () const
 returns the abbreviation for the price category More...
 
QString priceString () const
 returns the price as string More...
 
void setEvent (const MOEvent &e)
 used by label editor: sets the simulated event More...
 
QString statusString () const
 returns the ticket status as localized string More...
 
- Public Member Functions inherited from MOTicketAbstract
 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
 
MOTicketAbstractoperator= (const MOTicketAbstract &)
 copy assignment: creates a (deep) copy of the object More...
 
virtual Nullable< qint64 > orderid () const
 
virtual Nullable< qint64 > price () const
 
virtual Nullable< MOPriceCategorypricecategory () 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< TicketStatestatus () 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...
 

Additional Inherited Members

- Public Types inherited from MOTicketAbstract
enum  TicketState {
  Reserved =785, Ordered =786, Used =771, Cancelled =4,
  Refund =4, MaskBlock =256, MaskPay =512, MaskUsable =768,
  MaskReturnable =16, MaskChangeable =16
}
 
- Static Public Member Functions inherited from MOTicketAbstract
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 inherited from MOTicketAbstract
Nullable< qint64 > mp_eventid
 
Nullable< qint64 > mp_orderid
 
Nullable< qint64 > mp_price
 
Nullable< MOPriceCategorymp_pricecategory
 
Nullable< qint64 > mp_pricecategoryid
 
Nullable< QString > mp_seat
 
Nullable< TicketStatemp_status
 
Nullable< QString > mp_tags
 
Nullable< QString > mp_ticketid
 
- Properties inherited from MOTicketAbstract
Nullable< qint64 > eventid
 
Nullable< qint64 > orderid
 
Nullable< qint64 > price
 
Nullable< MOPriceCategorypricecategory
 
Nullable< qint64 > pricecategoryid
 
Nullable< QString > seat
 
Nullable< TicketStatestatus
 
Nullable< QString > tags
 
Nullable< QString > ticketid
 uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the server More...
 

Member Function Documentation

int MOTicket::amountToPay ( ) const
inline

returns the amount to be paid for this ticket; this may be 0 even if there is a price attached

References MOTicketAbstract::price(), and MOTicketAbstract::status().

MOEvent MOTicket::event ( ) const

returns the event that this ticket belongs to - does a roundtrip to the database the first time this is called!

References MOTicketAbstract::eventid(), MTGetEvent::getevent(), req, and MOTicketAbstract::ticketid().

QString MOTicket::priceCategoryName ( ) const

returns the full price category name

QString MOTicket::priceCategoryShort ( ) const

returns the abbreviation for the price category

QString MOTicket::priceString ( ) const
inline

returns the price as string

References cent2str(), and MOTicketAbstract::price().

void MOTicket::setEvent ( const MOEvent e)

used by label editor: sets the simulated event

References MOTicketAbstract::seteventid().

QString MOTicket::statusString ( ) const
inline

returns the ticket status as localized string

References MOTicketAbstract::status(), and MOTicketAbstract::TicketState2locstr().


The documentation for this class was generated from the following files: