MagicSmoke  $VERSION$
MTReturnTicketVoucher Class Reference

Privileged users: return a ticket or voucher and deduct its price from the order it was in. This may fail if the ticket or voucher has already been used. More...

#include <srcMTReturnTicketVoucher.h>

Inheritance diagram for MTReturnTicketVoucher:
MTransaction

Public Member Functions

 MTReturnTicketVoucher ()
 default constructor: generates an invalid transaction More...
 
 MTReturnTicketVoucher (const MTReturnTicketVoucher &)
 copy constructor: the two copies share their state More...
 
virtual ~MTReturnTicketVoucher ()
 deletes this instance More...
 
Q_SLOT Nullable< MOOrdergetorder () const
 the order that owned the returned object, in case this is called from the order window More...
 
MTReturnTicketVoucheroperator= (const MTReturnTicketVoucher &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTReturnTicketVoucher asyncQuery (const QString &abarcode, 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 MTReturnTicketVoucher query (const QString &abarcode, 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

 MTReturnTicketVoucher (const QString &abarcode, 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 MTReturnTicketVoucher_Private
 

Detailed Description

Privileged users: return a ticket or voucher and deduct its price from the order it was in. This may fail if the ticket or voucher has already been used.

Constructor & Destructor Documentation

MTReturnTicketVoucher::MTReturnTicketVoucher ( const QString &  abarcode,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
abarcodebarcode of the ticket or voucher
ifaceID of the interface that the transaction will be sent on

References MTReturnTicketVoucher_Private::in_barcode, and MTReturnTicketVoucher_Private.

MTReturnTicketVoucher::MTReturnTicketVoucher ( )

default constructor: generates an invalid transaction

References MTReturnTicketVoucher_Private.

MTReturnTicketVoucher::MTReturnTicketVoucher ( const MTReturnTicketVoucher t)

copy constructor: the two copies share their state

References MTReturnTicketVoucher_Private::attach().

MTReturnTicketVoucher::~MTReturnTicketVoucher ( )
virtual

deletes this instance

References MTReturnTicketVoucher_Private::detach().

Member Function Documentation

MTReturnTicketVoucher MTReturnTicketVoucher::asyncQuery ( const QString &  abarcode,
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
abarcodebarcode of the ticket or voucher
ifaceID of the interface that the transaction will be sent on
void MTReturnTicketVoucher::endQuery ( )
protectedvirtual
Nullable< MOOrder > MTReturnTicketVoucher::getorder ( ) const

the order that owned the returned object, in case this is called from the order window

References MTReturnTicketVoucher_Private::out_order.

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

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

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

MTReturnTicketVoucher MTReturnTicketVoucher::query ( const QString &  abarcode,
QString  iface = "MagicSmoke" 
)
static

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

Parameters
abarcodebarcode of the ticket or voucher
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryReturnTicketVoucher(), and MOverview::ticketReturn().

Friends And Related Function Documentation

friend class MTReturnTicketVoucher_Private
friend

Referenced by MTReturnTicketVoucher().


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