MagicSmoke  $VERSION$
MTChangeShipping Class Reference

Changes a shipping method, eg. its default price. Changing the price has no effect on existing orders, while changing the name is reflected in orders - this is due to the order referencing the shipping method, but copying its price so that it can be changed by privileged users. More...

#include <srcMTChangeShipping.h>

Inheritance diagram for MTChangeShipping:
MTransaction

Public Member Functions

 MTChangeShipping ()
 default constructor: generates an invalid transaction More...
 
 MTChangeShipping (const MTChangeShipping &)
 copy constructor: the two copies share their state More...
 
virtual ~MTChangeShipping ()
 deletes this instance More...
 
Q_SLOT Nullable< MOShippinggetshipping () const
 
MTChangeShippingoperator= (const MTChangeShipping &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTChangeShipping asyncQuery (const MOShipping &ashipping, 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 MTChangeShipping query (const MOShipping &ashipping, 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

 MTChangeShipping (const MOShipping &ashipping, 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 MTChangeShipping_Private
 

Detailed Description

Changes a shipping method, eg. its default price. Changing the price has no effect on existing orders, while changing the name is reflected in orders - this is due to the order referencing the shipping method, but copying its price so that it can be changed by privileged users.

Constructor & Destructor Documentation

MTChangeShipping::MTChangeShipping ( const MOShipping ashipping,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
ashipping
ifaceID of the interface that the transaction will be sent on

References MTChangeShipping_Private::in_shipping, and MTChangeShipping_Private.

MTChangeShipping::MTChangeShipping ( )

default constructor: generates an invalid transaction

References MTChangeShipping_Private.

MTChangeShipping::MTChangeShipping ( const MTChangeShipping t)

copy constructor: the two copies share their state

References MTChangeShipping_Private::attach().

MTChangeShipping::~MTChangeShipping ( )
virtual

deletes this instance

References MTChangeShipping_Private::detach().

Member Function Documentation

MTChangeShipping MTChangeShipping::asyncQuery ( const MOShipping ashipping,
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
ashipping
ifaceID of the interface that the transaction will be sent on
void MTChangeShipping::endQuery ( )
protectedvirtual
Nullable< MOShipping > MTChangeShipping::getshipping ( ) const
MTChangeShipping & MTChangeShipping::operator= ( const MTChangeShipping t)

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

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

MTChangeShipping MTChangeShipping::query ( const MOShipping ashipping,
QString  iface = "MagicSmoke" 
)
static

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

Parameters
ashipping
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryChangeShipping().

Friends And Related Function Documentation

friend class MTChangeShipping_Private
friend

Referenced by MTChangeShipping().


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