MagicSmoke  $VERSION$
MOOrderAbstract Class Reference

This class represents an order in its entirety, including any items sold in it. More...

#include <srcMOOrderAbstract.h>

Inheritance diagram for MOOrderAbstract:
MOOrder

Public Types

enum  OrderState {
  Placed =0, Sent =1, Sold =1, Cancelled =2,
  Reserved =4, Closed =128
}
 Status the order is in right now. More...
 

Public Member Functions

 MOOrderAbstract ()
 default constructor: constructs an invalid instance of MOOrderAbstract More...
 
 MOOrderAbstract (const MOOrderAbstract &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOOrderAbstract (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOOrderAbstract ()
 destructor: deletes this copy of the object More...
 
virtual void additems (Nullable< MOItemInfo > a)
 
virtual void addtickets (Nullable< MOTicket > a)
 
virtual void addvouchers (Nullable< MOVoucher > a)
 
virtual Nullable< qint64 > amountdue () const
 amount that needs to be paid, negative if too much has been paid More...
 
virtual Nullable< qint64 > amountpaid () const
 amount that has been paid for this order More...
 
virtual void clearitems ()
 
virtual void cleartickets ()
 
virtual void clearvouchers ()
 
virtual Nullable< QString > comments () const
 
virtual Nullable< QString > coupondescription () const
 
virtual Nullable< QString > couponid () const
 
virtual Nullable< MOCustomerInfocustomer () const
 
virtual Nullable< qint64 > customerid () const
 
virtual Nullable< MOAddressdeliveryaddress () const
 
virtual Nullable< qint64 > deliveryaddressid () const
 
virtual Nullable< MOAddressinvoiceaddress () const
 
virtual Nullable< qint64 > invoiceaddressid () const
 
virtual QList< MOItemInfoitems () const
 
MOOrderAbstractoperator= (const MOOrderAbstract &)
 copy assignment: creates a (deep) copy of the object More...
 
virtual Nullable< qint64 > orderid () const
 
virtual Nullable< qint64 > ordertime () const
 
 Q_ENUMS (OrderState)
 
virtual Nullable< qint64 > senttime () const
 
virtual void setamountdue (Nullable< qint64 > s)
 amount that needs to be paid, negative if too much has been paid More...
 
virtual void setamountpaid (Nullable< qint64 > s)
 amount that has been paid for this order More...
 
virtual void setcomments (Nullable< QString > s)
 
virtual void setcoupondescription (Nullable< QString > s)
 
virtual void setcouponid (Nullable< QString > s)
 
virtual void setcustomer (Nullable< MOCustomerInfo > s)
 
virtual void setcustomerid (Nullable< qint64 > s)
 
virtual void setdeliveryaddress (Nullable< MOAddress > s)
 
virtual void setdeliveryaddressid (Nullable< qint64 > s)
 
virtual void setinvoiceaddress (Nullable< MOAddress > s)
 
virtual void setinvoiceaddressid (Nullable< qint64 > s)
 
virtual void setitems (QList< MOItemInfo > s)
 
virtual void setorderid (Nullable< qint64 > s)
 
virtual void setordertime (Nullable< qint64 > s)
 
virtual void setsenttime (Nullable< qint64 > s)
 
virtual void setshippingcosts (Nullable< qint64 > s)
 costs for shipping More...
 
virtual void setshippingtype (Nullable< MOShipping > s)
 
virtual void setshippingtypeid (Nullable< qint64 > s)
 
virtual void setsoldby (Nullable< QString > s)
 
virtual void setstatus (Nullable< OrderState > s)
 
virtual void settags (Nullable< QString > s)
 
virtual void settickets (QList< MOTicket > s)
 
virtual void settotalprice (Nullable< qint64 > s)
 total price for this order (including shipping and all items) More...
 
virtual void setvouchers (QList< MOVoucher > s)
 
virtual Nullable< qint64 > shippingcosts () const
 costs for shipping More...
 
virtual Nullable< MOShippingshippingtype () const
 
virtual Nullable< qint64 > shippingtypeid () const
 
virtual Nullable< QString > soldby () const
 
virtual Nullable< OrderStatestatus () const
 
virtual Nullable< QString > tags () const
 
virtual QList< MOTickettickets () const
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
virtual Nullable< qint64 > totalprice () const
 total price for this order (including shipping and all items) More...
 
QDomElement toXml (QDomDocument &doc, QString name="Order")
 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...
 
virtual QList< MOVouchervouchers () const
 

Static Public Member Functions

static MOOrderAbstract fromString (const QString &)
 create MOOrderAbstract from XML formatted string (inverse of toString) More...
 
static MOOrderAbstract fromXml (const QDomElement &)
 create MOOrderAbstract from XML (inverse of toXml) More...
 
static OrderState locstr2OrderState (QString, bool *ok=0)
 Converts a localized string into the corresponding enum OrderState value. More...
 
static QString OrderState2locstr (OrderState)
 Converts enum OrderState value into the corresponding localized string. More...
 
static QString OrderState2str (OrderState)
 Converts enum OrderState value into the corresponding string. More...
 
static OrderState str2OrderState (QString, bool *ok=0)
 Converts string into the corresponding enum OrderState value. More...
 

Protected Attributes

Nullable< qint64 > mp_amountdue
 
Nullable< qint64 > mp_amountpaid
 
Nullable< QString > mp_comments
 
Nullable< QString > mp_coupondescription
 
Nullable< QString > mp_couponid
 
Nullable< MOCustomerInfomp_customer
 
Nullable< qint64 > mp_customerid
 
Nullable< MOAddressmp_deliveryaddress
 
Nullable< qint64 > mp_deliveryaddressid
 
Nullable< MOAddressmp_invoiceaddress
 
Nullable< qint64 > mp_invoiceaddressid
 
QList< MOItemInfomp_items
 
Nullable< qint64 > mp_orderid
 
Nullable< qint64 > mp_ordertime
 
Nullable< qint64 > mp_senttime
 
Nullable< qint64 > mp_shippingcosts
 
Nullable< MOShippingmp_shippingtype
 
Nullable< qint64 > mp_shippingtypeid
 
Nullable< QString > mp_soldby
 
Nullable< OrderStatemp_status
 
Nullable< QString > mp_tags
 
QList< MOTicketmp_tickets
 
Nullable< qint64 > mp_totalprice
 
QList< MOVouchermp_vouchers
 

Properties

Nullable< qint64 > amountdue
 amount that needs to be paid, negative if too much has been paid More...
 
Nullable< qint64 > amountpaid
 amount that has been paid for this order More...
 
Nullable< QString > comments
 
Nullable< QString > coupondescription
 
Nullable< QString > couponid
 
Nullable< MOCustomerInfocustomer
 
Nullable< qint64 > customerid
 
Nullable< MOAddressdeliveryaddress
 
Nullable< qint64 > deliveryaddressid
 
Nullable< MOAddressinvoiceaddress
 
Nullable< qint64 > invoiceaddressid
 
QList< MOItemInfoitems
 
Nullable< qint64 > orderid
 
Nullable< qint64 > ordertime
 
Nullable< qint64 > senttime
 
Nullable< qint64 > shippingcosts
 costs for shipping More...
 
Nullable< MOShippingshippingtype
 
Nullable< qint64 > shippingtypeid
 
Nullable< QString > soldby
 
Nullable< OrderStatestatus
 
Nullable< QString > tags
 
QList< MOTickettickets
 
Nullable< qint64 > totalprice
 total price for this order (including shipping and all items) More...
 
QList< MOVouchervouchers
 

Detailed Description

This class represents an order in its entirety, including any items sold in it.

Member Enumeration Documentation

Status the order is in right now.

Enumerator
Placed 

The order has been placed, but not acted upon yet.

Sent 

The order has been sent out or handed to the customer.

Sold 

Alias for Sent. Semantically: it is sold if it has been sent and paid.

Cancelled 

The order has been cancelled, if anything has been paid, it must be paid back.

Reserved 

The order is just a reservation for a limited time, application logic must determine the timeout.

Closed 

The order is closed out of the system - the payment status is ignored from now on. Currently not used.

Constructor & Destructor Documentation

MOOrderAbstract::MOOrderAbstract ( )
inline

default constructor: constructs an invalid instance of MOOrderAbstract

Referenced by fromString(), and fromXml().

virtual MOOrderAbstract::~MOOrderAbstract ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

virtual void MOOrderAbstract::additems ( Nullable< MOItemInfo a)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::addtickets ( Nullable< MOTicket a)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::addvouchers ( Nullable< MOVoucher a)
inlinevirtual

Referenced by MOOrderAbstract().

virtual Nullable<qint64> MOOrderAbstract::amountdue ( ) const
inlinevirtual

amount that needs to be paid, negative if too much has been paid

virtual Nullable<qint64> MOOrderAbstract::amountpaid ( ) const
inlinevirtual

amount that has been paid for this order

Referenced by MOOrder::amountPaidString().

virtual void MOOrderAbstract::clearitems ( )
inlinevirtual
virtual void MOOrderAbstract::cleartickets ( )
inlinevirtual
virtual void MOOrderAbstract::clearvouchers ( )
inlinevirtual
virtual Nullable<QString> MOOrderAbstract::comments ( ) const
inlinevirtual
virtual Nullable<QString> MOOrderAbstract::coupondescription ( ) const
inlinevirtual
virtual Nullable<QString> MOOrderAbstract::couponid ( ) const
inlinevirtual
virtual Nullable<MOCustomerInfo> MOOrderAbstract::customer ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderAbstract::customerid ( ) const
inlinevirtual
virtual Nullable<MOAddress> MOOrderAbstract::deliveryaddress ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderAbstract::deliveryaddressid ( ) const
inlinevirtual
MOOrderAbstract MOOrderAbstract::fromString ( const QString &  txt)
static

create MOOrderAbstract from XML formatted string (inverse of toString)

References MOOrderAbstract().

MOOrderAbstract MOOrderAbstract::fromXml ( const QDomElement &  root)
static

create MOOrderAbstract from XML (inverse of toXml)

References MOOrderAbstract().

virtual Nullable<MOAddress> MOOrderAbstract::invoiceaddress ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderAbstract::invoiceaddressid ( ) const
inlinevirtual
virtual QList<MOItemInfo> MOOrderAbstract::items ( ) const
inlinevirtual
MOOrderAbstract::OrderState MOOrderAbstract::locstr2OrderState ( QString  s,
bool *  ok = 0 
)
static

Converts a localized string into the corresponding enum OrderState value.

References Cancelled, Closed, Placed, Reserved, Sent, and Sold.

virtual Nullable<qint64> MOOrderAbstract::orderid ( ) const
inlinevirtual

Referenced by MOOrder::isValid().

QString MOOrderAbstract::OrderState2locstr ( OrderState  e)
static

Converts enum OrderState value into the corresponding localized string.

References Cancelled, Closed, Placed, Reserved, Sent, and Sold.

Referenced by MOOrder::orderStatusString().

QString MOOrderAbstract::OrderState2str ( OrderState  e)
static

Converts enum OrderState value into the corresponding string.

References Cancelled, Closed, Placed, Reserved, Sent, and Sold.

virtual Nullable<qint64> MOOrderAbstract::ordertime ( ) const
inlinevirtual

Referenced by MOOrder::orderDateTime().

MOOrderAbstract::Q_ENUMS ( OrderState  )
virtual Nullable<qint64> MOOrderAbstract::senttime ( ) const
inlinevirtual
virtual void MOOrderAbstract::setamountdue ( Nullable< qint64 >  s)
inlinevirtual

amount that needs to be paid, negative if too much has been paid

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setamountpaid ( Nullable< qint64 >  s)
inlinevirtual

amount that has been paid for this order

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setcomments ( Nullable< QString >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setcoupondescription ( Nullable< QString >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setcouponid ( Nullable< QString >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setcustomer ( Nullable< MOCustomerInfo s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setcustomerid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setdeliveryaddress ( Nullable< MOAddress s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setdeliveryaddressid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setinvoiceaddress ( Nullable< MOAddress s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setinvoiceaddressid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setitems ( QList< MOItemInfo s)
inlinevirtual
virtual void MOOrderAbstract::setorderid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setordertime ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setsenttime ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setshippingcosts ( Nullable< qint64 >  s)
inlinevirtual

costs for shipping

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setshippingtype ( Nullable< MOShipping s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setshippingtypeid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setsoldby ( Nullable< QString >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setstatus ( Nullable< OrderState s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::settags ( Nullable< QString >  s)
inlinevirtual

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::settickets ( QList< MOTicket s)
inlinevirtual
virtual void MOOrderAbstract::settotalprice ( Nullable< qint64 >  s)
inlinevirtual

total price for this order (including shipping and all items)

Referenced by MOOrderAbstract().

virtual void MOOrderAbstract::setvouchers ( QList< MOVoucher s)
inlinevirtual
virtual Nullable<qint64> MOOrderAbstract::shippingcosts ( ) const
inlinevirtual

costs for shipping

virtual Nullable<MOShipping> MOOrderAbstract::shippingtype ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderAbstract::shippingtypeid ( ) const
inlinevirtual
virtual Nullable<QString> MOOrderAbstract::soldby ( ) const
inlinevirtual
virtual Nullable<OrderState> MOOrderAbstract::status ( ) const
inlinevirtual
MOOrderAbstract::OrderState MOOrderAbstract::str2OrderState ( QString  s,
bool *  ok = 0 
)
static

Converts string into the corresponding enum OrderState value.

References Cancelled, Closed, Placed, Reserved, Sent, and Sold.

Referenced by MOOrderAbstract().

virtual Nullable<QString> MOOrderAbstract::tags ( ) const
inlinevirtual
virtual QList<MOTicket> MOOrderAbstract::tickets ( ) const
inlinevirtual
QString MOOrderAbstract::toString ( )

Serializes the object to XML and returns the string representation of that XML.

References toXml().

virtual Nullable<qint64> MOOrderAbstract::totalprice ( ) const
inlinevirtual

total price for this order (including shipping and all items)

Referenced by MOOrder::totalPriceString().

QDomElement MOOrderAbstract::toXml ( QDomDocument &  doc,
QString  name = "Order" 
)

Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself.

Parameters
docthe DOM document node for which to generate the element
namethe name to give the generated element, per default "MOOrderAbstract" is used

Referenced by toString(), and toXml().

virtual QList<MOVoucher> MOOrderAbstract::vouchers ( ) const
inlinevirtual

Member Data Documentation

Nullable<qint64> MOOrderAbstract::mp_amountdue
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_amountpaid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<QString> MOOrderAbstract::mp_comments
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<QString> MOOrderAbstract::mp_coupondescription
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<QString> MOOrderAbstract::mp_couponid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<MOCustomerInfo> MOOrderAbstract::mp_customer
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_customerid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<MOAddress> MOOrderAbstract::mp_deliveryaddress
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_deliveryaddressid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<MOAddress> MOOrderAbstract::mp_invoiceaddress
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_invoiceaddressid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

QList<MOItemInfo> MOOrderAbstract::mp_items
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_orderid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_ordertime
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_senttime
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_shippingcosts
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<MOShipping> MOOrderAbstract::mp_shippingtype
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_shippingtypeid
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<QString> MOOrderAbstract::mp_soldby
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<OrderState> MOOrderAbstract::mp_status
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<QString> MOOrderAbstract::mp_tags
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

QList<MOTicket> MOOrderAbstract::mp_tickets
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Nullable<qint64> MOOrderAbstract::mp_totalprice
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

QList<MOVoucher> MOOrderAbstract::mp_vouchers
protected

Referenced by MOOrderAbstract(), operator=(), and toXml().

Property Documentation

Nullable<qint64> MOOrderAbstract::amountdue
readwrite

amount that needs to be paid, negative if too much has been paid

Nullable<qint64> MOOrderAbstract::amountpaid
readwrite

amount that has been paid for this order

Referenced by MBillRenderer::getVariable().

Nullable<QString> MOOrderAbstract::comments
readwrite
Nullable<QString> MOOrderAbstract::coupondescription
readwrite
Nullable<QString> MOOrderAbstract::couponid
readwrite
Nullable<MOCustomerInfo> MOOrderAbstract::customer
readwrite
Nullable<qint64> MOOrderAbstract::customerid
readwrite
Nullable<MOAddress> MOOrderAbstract::deliveryaddress
readwrite
Nullable<qint64> MOOrderAbstract::deliveryaddressid
readwrite
Nullable<MOAddress> MOOrderAbstract::invoiceaddress
readwrite
Nullable<qint64> MOOrderAbstract::invoiceaddressid
readwrite
QList<MOItemInfo> MOOrderAbstract::items
readwrite
Nullable<qint64> MOOrderAbstract::orderid
readwrite
Nullable<qint64> MOOrderAbstract::ordertime
readwrite
Nullable<qint64> MOOrderAbstract::senttime
readwrite
Nullable<qint64> MOOrderAbstract::shippingcosts
readwrite

costs for shipping

Referenced by MBillRenderer::getVariable().

Nullable<MOShipping> MOOrderAbstract::shippingtype
readwrite
Nullable<qint64> MOOrderAbstract::shippingtypeid
readwrite
Nullable<QString> MOOrderAbstract::soldby
readwrite
Nullable<OrderState> MOOrderAbstract::status
readwrite
Nullable<QString> MOOrderAbstract::tags
readwrite
QList<MOTicket> MOOrderAbstract::tickets
readwrite
Nullable<qint64> MOOrderAbstract::totalprice
readwrite

total price for this order (including shipping and all items)

Referenced by MBillRenderer::getVariable().

QList<MOVoucher> MOOrderAbstract::vouchers
readwrite

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