MagicSmoke  $VERSION$
MOOrderInfoAbstract Class Reference

This class represents the main information about an order as shown in lists. More...

#include <srcMOOrderInfoAbstract.h>

Inheritance diagram for MOOrderInfoAbstract:
MOOrderInfo

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

 MOOrderInfoAbstract ()
 default constructor: constructs an invalid instance of MOOrderInfoAbstract More...
 
 MOOrderInfoAbstract (const MOOrderInfoAbstract &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOOrderInfoAbstract (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOOrderInfoAbstract ()
 destructor: deletes this copy of the object More...
 
virtual Nullable< qint64 > amountdue () const
 amount that needs to be paid, negative if too much has been paid More...
 
virtual Nullable< qint64 > amountitems () const
 
virtual Nullable< qint64 > amountpaid () const
 amount that has been paid for this order More...
 
virtual Nullable< qint64 > amounttickets () const
 
virtual Nullable< qint64 > amountvouchers () const
 
virtual Nullable< QString > couponid () const
 
virtual Nullable< qint64 > customerid () const
 
MOOrderInfoAbstractoperator= (const MOOrderInfoAbstract &)
 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 setamountitems (Nullable< qint64 > s)
 
virtual void setamountpaid (Nullable< qint64 > s)
 amount that has been paid for this order More...
 
virtual void setamounttickets (Nullable< qint64 > s)
 
virtual void setamountvouchers (Nullable< qint64 > s)
 
virtual void setcouponid (Nullable< QString > s)
 
virtual void setcustomerid (Nullable< qint64 > 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 setshippingtypeid (Nullable< qint64 > s)
 
virtual void setsoldby (Nullable< QString > s)
 
virtual void setstatus (Nullable< OrderState > s)
 
virtual void settotalprice (Nullable< qint64 > s)
 total price for this order (including shipping and all items) More...
 
virtual Nullable< qint64 > shippingcosts () const
 costs for shipping More...
 
virtual Nullable< qint64 > shippingtypeid () const
 
virtual Nullable< QString > soldby () const
 
virtual Nullable< OrderStatestatus () 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="OrderInfo")
 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 MOOrderInfoAbstract fromString (const QString &)
 create MOOrderInfoAbstract from XML formatted string (inverse of toString) More...
 
static MOOrderInfoAbstract fromXml (const QDomElement &)
 create MOOrderInfoAbstract 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_amountitems
 
Nullable< qint64 > mp_amountpaid
 
Nullable< qint64 > mp_amounttickets
 
Nullable< qint64 > mp_amountvouchers
 
Nullable< QString > mp_couponid
 
Nullable< qint64 > mp_customerid
 
Nullable< qint64 > mp_orderid
 
Nullable< qint64 > mp_ordertime
 
Nullable< qint64 > mp_senttime
 
Nullable< qint64 > mp_shippingcosts
 
Nullable< qint64 > mp_shippingtypeid
 
Nullable< QString > mp_soldby
 
Nullable< OrderStatemp_status
 
Nullable< qint64 > mp_totalprice
 

Properties

Nullable< qint64 > amountdue
 amount that needs to be paid, negative if too much has been paid More...
 
Nullable< qint64 > amountitems
 
Nullable< qint64 > amountpaid
 amount that has been paid for this order More...
 
Nullable< qint64 > amounttickets
 
Nullable< qint64 > amountvouchers
 
Nullable< QString > couponid
 
Nullable< qint64 > customerid
 
Nullable< qint64 > orderid
 
Nullable< qint64 > ordertime
 
Nullable< qint64 > senttime
 
Nullable< qint64 > shippingcosts
 costs for shipping More...
 
Nullable< qint64 > shippingtypeid
 
Nullable< QString > soldby
 
Nullable< OrderStatestatus
 
Nullable< qint64 > totalprice
 total price for this order (including shipping and all items) More...
 

Detailed Description

This class represents the main information about an order as shown in lists.

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

MOOrderInfoAbstract::MOOrderInfoAbstract ( )
inline

default constructor: constructs an invalid instance of MOOrderInfoAbstract

Referenced by fromString(), and fromXml().

MOOrderInfoAbstract::MOOrderInfoAbstract ( const MOOrderInfoAbstract o)
MOOrderInfoAbstract::MOOrderInfoAbstract ( const QDomElement &  root)
explicit
virtual MOOrderInfoAbstract::~MOOrderInfoAbstract ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

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

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

Referenced by MOOrderInfo::amountDueString().

virtual Nullable<qint64> MOOrderInfoAbstract::amountitems ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderInfoAbstract::amountpaid ( ) const
inlinevirtual

amount that has been paid for this order

Referenced by MOOrderInfo::amountPaidString(), MOOrderInfo::needsPayment(), and MOOrderInfo::needsRefund().

virtual Nullable<qint64> MOOrderInfoAbstract::amounttickets ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderInfoAbstract::amountvouchers ( ) const
inlinevirtual
virtual Nullable<QString> MOOrderInfoAbstract::couponid ( ) const
inlinevirtual
virtual Nullable<qint64> MOOrderInfoAbstract::customerid ( ) const
inlinevirtual
MOOrderInfoAbstract MOOrderInfoAbstract::fromString ( const QString &  txt)
static

create MOOrderInfoAbstract from XML formatted string (inverse of toString)

References MOOrderInfoAbstract().

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

create MOOrderInfoAbstract from XML (inverse of toXml)

References MOOrderInfoAbstract().

MOOrderInfoAbstract::OrderState MOOrderInfoAbstract::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> MOOrderInfoAbstract::orderid ( ) const
inlinevirtual
QString MOOrderInfoAbstract::OrderState2locstr ( OrderState  e)
static

Converts enum OrderState value into the corresponding localized string.

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

Referenced by MOOrderInfo::orderStatusString().

QString MOOrderInfoAbstract::OrderState2str ( OrderState  e)
static

Converts enum OrderState value into the corresponding string.

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

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

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

Referenced by MOOrderInfoAbstract().

virtual void MOOrderInfoAbstract::setamountitems ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderInfoAbstract().

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

amount that has been paid for this order

Referenced by MOOrderInfoAbstract().

virtual void MOOrderInfoAbstract::setamounttickets ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderInfoAbstract().

virtual void MOOrderInfoAbstract::setamountvouchers ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

virtual void MOOrderInfoAbstract::setorderid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

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

costs for shipping

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

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

Referenced by MOOrderInfoAbstract().

virtual void MOOrderInfoAbstract::settotalprice ( Nullable< qint64 >  s)
inlinevirtual

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

Referenced by MOOrderInfoAbstract().

virtual Nullable<qint64> MOOrderInfoAbstract::shippingcosts ( ) const
inlinevirtual

costs for shipping

virtual Nullable<qint64> MOOrderInfoAbstract::shippingtypeid ( ) const
inlinevirtual
virtual Nullable<QString> MOOrderInfoAbstract::soldby ( ) const
inlinevirtual
virtual Nullable<OrderState> MOOrderInfoAbstract::status ( ) const
inlinevirtual
MOOrderInfoAbstract::OrderState MOOrderInfoAbstract::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 MOOrderInfoAbstract().

QString MOOrderInfoAbstract::toString ( )

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

References toXml().

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

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

Referenced by MOOrderInfo::needsPayment(), MOOrderInfo::needsRefund(), and MOOrderInfo::totalPriceString().

QDomElement MOOrderInfoAbstract::toXml ( QDomDocument &  doc,
QString  name = "OrderInfo" 
)

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 "MOOrderInfoAbstract" is used

Referenced by toString().

void MOOrderInfoAbstract::toXml ( QDomDocument &  doc,
QDomElement &  r 
)

Member Data Documentation

Nullable<qint64> MOOrderInfoAbstract::mp_amountdue
protected
Nullable<qint64> MOOrderInfoAbstract::mp_amountitems
protected
Nullable<qint64> MOOrderInfoAbstract::mp_amountpaid
protected
Nullable<qint64> MOOrderInfoAbstract::mp_amounttickets
protected
Nullable<qint64> MOOrderInfoAbstract::mp_amountvouchers
protected
Nullable<QString> MOOrderInfoAbstract::mp_couponid
protected
Nullable<qint64> MOOrderInfoAbstract::mp_customerid
protected
Nullable<qint64> MOOrderInfoAbstract::mp_orderid
protected
Nullable<qint64> MOOrderInfoAbstract::mp_ordertime
protected
Nullable<qint64> MOOrderInfoAbstract::mp_senttime
protected
Nullable<qint64> MOOrderInfoAbstract::mp_shippingcosts
protected
Nullable<qint64> MOOrderInfoAbstract::mp_shippingtypeid
protected
Nullable<QString> MOOrderInfoAbstract::mp_soldby
protected
Nullable<OrderState> MOOrderInfoAbstract::mp_status
protected
Nullable<qint64> MOOrderInfoAbstract::mp_totalprice
protected

Property Documentation

Nullable<qint64> MOOrderInfoAbstract::amountdue
readwrite

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

Nullable<qint64> MOOrderInfoAbstract::amountitems
readwrite
Nullable<qint64> MOOrderInfoAbstract::amountpaid
readwrite

amount that has been paid for this order

Nullable<qint64> MOOrderInfoAbstract::amounttickets
readwrite
Nullable<qint64> MOOrderInfoAbstract::amountvouchers
readwrite
Nullable<QString> MOOrderInfoAbstract::couponid
readwrite
Nullable<qint64> MOOrderInfoAbstract::customerid
readwrite
Nullable<qint64> MOOrderInfoAbstract::orderid
readwrite
Nullable<qint64> MOOrderInfoAbstract::ordertime
readwrite
Nullable<qint64> MOOrderInfoAbstract::senttime
readwrite
Nullable<qint64> MOOrderInfoAbstract::shippingcosts
readwrite

costs for shipping

Nullable<qint64> MOOrderInfoAbstract::shippingtypeid
readwrite
Nullable<QString> MOOrderInfoAbstract::soldby
readwrite
Nullable<OrderState> MOOrderInfoAbstract::status
readwrite
Nullable<qint64> MOOrderInfoAbstract::totalprice
readwrite

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


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