MagicSmoke  $VERSION$
MTOrderChangeShipping Class Reference

Changes the shipping option and/or price of an order. More...

#include <srcMTOrderChangeShipping.h>

Inheritance diagram for MTOrderChangeShipping:
MTransaction

Public Member Functions

 MTOrderChangeShipping ()
 default constructor: generates an invalid transaction More...
 
 MTOrderChangeShipping (const MTOrderChangeShipping &)
 copy constructor: the two copies share their state More...
 
virtual ~MTOrderChangeShipping ()
 deletes this instance More...
 
Q_SLOT Nullable< MOOrdergetorder () const
 a fresh copy of the changed order More...
 
MTOrderChangeShippingoperator= (const MTOrderChangeShipping &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTOrderChangeShipping asyncQuery (const qint64 &aorderid, const qint64 &ashippingid, const qint64 &ashippingcosts, QString iface="MagicSmoke")
 emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state More...
 
static MTOrderChangeShipping query (const qint64 &aorderid, const qint64 &ashippingid, const qint64 &ashippingcosts, QString iface="MagicSmoke")
 emits the query over the network and returns the finished transaction object More...
 
- Static Public Member Functions inherited from MTransaction
static void setStartStopActions (const MTStartStop &start, const MTStartStop &stop)
 set actions to be executed at start/stop More...
 

Protected Member Functions

 MTOrderChangeShipping (const qint64 &aorderid, const qint64 &ashippingid, const qint64 &ashippingcosts, QString iface)
 generates an instance from its properties More...
 
virtual void endQuery ()
 
- Protected Member Functions inherited from MTransaction
 MTransaction (QString iface=QString())
 internal: construct the transaction More...
 
 MTransaction (const WTransaction &)
 internal: copy the transaction More...
 
 MTransaction (const MTransaction &)
 internal: copy the transaction More...
 
QByteArray executeQuery (QString, QByteArray)
 internal: extend executeQuery to show a wait cursor More...
 

Friends

class MTOrderChangeShipping_Private
 

Detailed Description

Changes the shipping option and/or price of an order.

Constructor & Destructor Documentation

MTOrderChangeShipping::MTOrderChangeShipping ( const qint64 &  aorderid,
const qint64 &  ashippingid,
const qint64 &  ashippingcosts,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
aorderidThe order to be changed
ashippingidthe new shipping option or -1 if shipping is to be deleted
ashippingcostsif the user has the privilege ChangePrice this field overrides the shipping costs, otherwise the default from the shipping table is used
ifaceID of the interface that the transaction will be sent on

References MTOrderChangeShipping_Private::in_orderid, MTOrderChangeShipping_Private::in_shippingcosts, MTOrderChangeShipping_Private::in_shippingid, and MTOrderChangeShipping_Private.

MTOrderChangeShipping::MTOrderChangeShipping ( )

default constructor: generates an invalid transaction

References MTOrderChangeShipping_Private.

MTOrderChangeShipping::MTOrderChangeShipping ( const MTOrderChangeShipping t)

copy constructor: the two copies share their state

References MTOrderChangeShipping_Private::attach().

MTOrderChangeShipping::~MTOrderChangeShipping ( )
virtual

deletes this instance

References MTOrderChangeShipping_Private::detach().

Member Function Documentation

MTOrderChangeShipping MTOrderChangeShipping::asyncQuery ( const qint64 &  aorderid,
const qint64 &  ashippingid,
const qint64 &  ashippingcosts,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the transaction object, use isFinished() to check for the transaction's state

Parameters
aorderidThe order to be changed
ashippingidthe new shipping option or -1 if shipping is to be deleted
ashippingcostsif the user has the privilege ChangePrice this field overrides the shipping costs, otherwise the default from the shipping table is used
ifaceID of the interface that the transaction will be sent on
void MTOrderChangeShipping::endQuery ( )
protectedvirtual
Nullable< MOOrder > MTOrderChangeShipping::getorder ( ) const

a fresh copy of the changed order

References MTOrderChangeShipping_Private::out_order.

MTOrderChangeShipping & MTOrderChangeShipping::operator= ( const MTOrderChangeShipping t)

copy assignment: the copy shares the state of the original object

References MTOrderChangeShipping_Private::attach(), and MTOrderChangeShipping_Private::detach().

MTOrderChangeShipping MTOrderChangeShipping::query ( const qint64 &  aorderid,
const qint64 &  ashippingid,
const qint64 &  ashippingcosts,
QString  iface = "MagicSmoke" 
)
static

emits the query over the network and returns the finished transaction object

Parameters
aorderidThe order to be changed
ashippingidthe new shipping option or -1 if shipping is to be deleted
ashippingcostsif the user has the privilege ChangePrice this field overrides the shipping costs, otherwise the default from the shipping table is used
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryOrderChangeShipping().

Friends And Related Function Documentation

friend class MTOrderChangeShipping_Private
friend

Referenced by MTOrderChangeShipping().


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