MagicSmoke  $VERSION$
MTEmptyVoucher Class Reference

Empties a voucher, makes it invalid for any further use, but also keeps the price tag. More...

#include <srcMTEmptyVoucher.h>

Inheritance diagram for MTEmptyVoucher:
MTransaction

Public Member Functions

 MTEmptyVoucher ()
 default constructor: generates an invalid transaction More...
 
 MTEmptyVoucher (const MTEmptyVoucher &)
 copy constructor: the two copies share their state More...
 
virtual ~MTEmptyVoucher ()
 deletes this instance More...
 
Q_SLOT Nullable< MOVouchergetvoucher () const
 The voucher as it is left after emptying. More...
 
MTEmptyVoucheroperator= (const MTEmptyVoucher &)
 copy assignment: the copy shares the state of the original object More...
 

Static Public Member Functions

static MTEmptyVoucher asyncQuery (const QString &avoucherid, const QString &acomment, 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 MTEmptyVoucher query (const QString &avoucherid, const QString &acomment, 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

 MTEmptyVoucher (const QString &avoucherid, const QString &acomment, 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 MTEmptyVoucher_Private
 

Detailed Description

Empties a voucher, makes it invalid for any further use, but also keeps the price tag.

This also works if the voucher is already invalid.

Constructor & Destructor Documentation

MTEmptyVoucher::MTEmptyVoucher ( const QString &  avoucherid,
const QString &  acomment,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
avoucheridID of the voucher
acommentoptional comment for emptying the voucher
ifaceID of the interface that the transaction will be sent on

References MTEmptyVoucher_Private::in_comment, MTEmptyVoucher_Private::in_voucherid, and MTEmptyVoucher_Private.

MTEmptyVoucher::MTEmptyVoucher ( )

default constructor: generates an invalid transaction

References MTEmptyVoucher_Private.

MTEmptyVoucher::MTEmptyVoucher ( const MTEmptyVoucher t)

copy constructor: the two copies share their state

References MTEmptyVoucher_Private::attach().

MTEmptyVoucher::~MTEmptyVoucher ( )
virtual

deletes this instance

References MTEmptyVoucher_Private::detach().

Member Function Documentation

MTEmptyVoucher MTEmptyVoucher::asyncQuery ( const QString &  avoucherid,
const QString &  acomment,
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
avoucheridID of the voucher
acommentoptional comment for emptying the voucher
ifaceID of the interface that the transaction will be sent on
void MTEmptyVoucher::endQuery ( )
protectedvirtual
Nullable< MOVoucher > MTEmptyVoucher::getvoucher ( ) const

The voucher as it is left after emptying.

References MTEmptyVoucher_Private::out_voucher.

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

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

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

MTEmptyVoucher MTEmptyVoucher::query ( const QString &  avoucherid,
const QString &  acomment,
QString  iface = "MagicSmoke" 
)
static

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

Parameters
avoucheridID of the voucher
acommentoptional comment for emptying the voucher
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryEmptyVoucher().

Friends And Related Function Documentation

friend class MTEmptyVoucher_Private
friend

Referenced by MTEmptyVoucher().


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