MagicSmoke  $VERSION$
MTChangeVoucherValidity Class Reference

Changes the validity date of the voucher. More...

#include <srcMTChangeVoucherValidity.h>

Inheritance diagram for MTChangeVoucherValidity:
MTransaction

Public Member Functions

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

Static Public Member Functions

static MTChangeVoucherValidity asyncQuery (const QString &avoucherid, const bool &avalidforever, const qint64 &avalidtime, 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 MTChangeVoucherValidity query (const QString &avoucherid, const bool &avalidforever, const qint64 &avalidtime, 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

 MTChangeVoucherValidity (const QString &avoucherid, const bool &avalidforever, const qint64 &avalidtime, 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 MTChangeVoucherValidity_Private
 

Detailed Description

Changes the validity date of the voucher.

Constructor & Destructor Documentation

MTChangeVoucherValidity::MTChangeVoucherValidity ( const QString &  avoucherid,
const bool &  avalidforever,
const qint64 &  avalidtime,
const QString &  acomment,
QString  iface 
)
explicitprotected

generates an instance from its properties

Parameters
avoucheridID of the voucher
avalidforeverIf true: set validity to infinite.
avalidtimeValidity time of the voucher (will be rounded to a full day)
acommentoptional comment for emptying the voucher
ifaceID of the interface that the transaction will be sent on

References MTChangeVoucherValidity_Private::in_comment, MTChangeVoucherValidity_Private::in_validforever, MTChangeVoucherValidity_Private::in_validtime, MTChangeVoucherValidity_Private::in_voucherid, and MTChangeVoucherValidity_Private.

MTChangeVoucherValidity::MTChangeVoucherValidity ( )

default constructor: generates an invalid transaction

References MTChangeVoucherValidity_Private.

MTChangeVoucherValidity::MTChangeVoucherValidity ( const MTChangeVoucherValidity t)

copy constructor: the two copies share their state

References MTChangeVoucherValidity_Private::attach().

MTChangeVoucherValidity::~MTChangeVoucherValidity ( )
virtual

deletes this instance

References MTChangeVoucherValidity_Private::detach().

Member Function Documentation

MTChangeVoucherValidity MTChangeVoucherValidity::asyncQuery ( const QString &  avoucherid,
const bool &  avalidforever,
const qint64 &  avalidtime,
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
avalidforeverIf true: set validity to infinite.
avalidtimeValidity time of the voucher (will be rounded to a full day)
acommentoptional comment for emptying the voucher
ifaceID of the interface that the transaction will be sent on
void MTChangeVoucherValidity::endQuery ( )
protectedvirtual
Nullable< MOOrder > MTChangeVoucherValidity::getorder ( ) const

The order of the voucher as it is left after changing.

References MTChangeVoucherValidity_Private::out_order.

Nullable< MOVoucher > MTChangeVoucherValidity::getvoucher ( ) const

The voucher as it is left after changing.

References MTChangeVoucherValidity_Private::out_voucher.

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

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

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

MTChangeVoucherValidity MTChangeVoucherValidity::query ( const QString &  avoucherid,
const bool &  avalidforever,
const qint64 &  avalidtime,
const QString &  acomment,
QString  iface = "MagicSmoke" 
)
static

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

Parameters
avoucheridID of the voucher
avalidforeverIf true: set validity to infinite.
avalidtimeValidity time of the voucher (will be rounded to a full day)
acommentoptional comment for emptying the voucher
ifaceID of the interface that the transaction will be sent on

Referenced by MInterface::queryChangeVoucherValidity().

Friends And Related Function Documentation

friend class MTChangeVoucherValidity_Private
friend

Referenced by MTChangeVoucherValidity().


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