13 #ifndef MAGICSMOKE_ORDERAUDITDLG_P_H
14 #define MAGICSMOKE_ORDERAUDITDLG_P_H
18 #include <MTGetOrderAudit>
19 #include <QMetaMethod>
26 const QMetaObject mobj=T::staticMetaObject;
28 int id=mobj.indexOfProperty(n.toLatin1().data());
31 id=mobj.indexOfMethod(n.toLatin1().data());
33 QMetaMethod mm=mobj.method(
id);
34 if(mm.parameterNames().size()!=0)
return false;
35 if(QString(mm.typeName()).isEmpty())
return false;
42 const QMetaObject mobj=T::staticMetaObject;
44 int id=mobj.indexOfProperty(n.toLatin1().data());
45 if(
id>=0)
return mobj.property(
id).readOnGadget(obj);
47 id=mobj.indexOfMethod(n.toLatin1().data());
48 if(
id<0)
return QVariant();
49 QMetaMethod mm=mobj.method(
id);
50 if(mm.parameterNames().size()!=0)
return QVariant();
51 if(QString(mm.typeName()).isEmpty())
return QVariant();
53 int dataid=QMetaType::type(mm.typeName());
54 void *data=QMetaType::create(dataid);
56 if(mm.invokeOnGadget(obj, QGenericReturnArgument(mm.typeName(),data)))
57 ret=QVariant(dataid,data);
58 QMetaType::destroy(dataid,data);
67 const QMetaObject*mobj=metaObject();
69 int id=mobj->indexOfProperty(n.toLatin1().data());
72 id=mobj->indexOfMethod(n.toLatin1().data());
74 QMetaMethod mm=mobj->method(
id);
75 if(mm.parameterNames().size()!=0)
return false;
76 if(QString(mm.typeName()).isEmpty())
return false;
81 const QMetaObject*mobj=metaObject();
83 int id=mobj->indexOfProperty(n.toLatin1().data());
84 if(
id>=0)
return mobj->property(
id).read(
this);
86 id=mobj->indexOfMethod(n.toLatin1().data());
87 if(
id<0)
return QVariant();
88 QMetaMethod mm=mobj->method(
id);
89 if(mm.parameterNames().size()!=0)
return QVariant();
90 if(QString(mm.typeName()).isEmpty())
return QVariant();
92 int dataid=QMetaType::type(mm.typeName());
93 void *data=QMetaType::create(dataid);
95 if(mm.invoke(
this, Qt::DirectConnection, QGenericReturnArgument(mm.typeName(),data)))
96 ret=QVariant(dataid,data);
97 QMetaType::destroy(dataid,data);
122 morder=i.morder;mticket=i.mticket;mvoucher=i.mvoucher;
132 default:
return false;
141 default:
return false;
151 case Ticket:
return (qint64)mticket.audittime();
152 case Voucher:
return (qint64)mvoucher.audittime();
157 case Ticket:
return mticket.audituname();
158 case Voucher:
return mvoucher.audituname();
159 default:
return QString();
163 case Ticket:
return mticket.audittransaction();
164 case Voucher:
return mvoucher.audittransaction();
165 default:
return QString();
169 if(mtype==
None || i.mtype==
None)
return false;
179 default:
return QString();
183 case Order:
return QCoreApplication::translate(
"MOAItem",
"Order");
184 case Ticket:
return QCoreApplication::translate(
"MOAItem",
"Ticket");
185 case Voucher:
return QCoreApplication::translate(
"MOAItem",
"Voucher");
186 default:
return QString();
209 mitems=p.mitems;mprice=p.mprice;
214 if(mitems.size()>0)
return mitems[0].
auditTime();
218 if(mitems.size()>0)
return mitems[0].
auditUser();
219 else return QString();
223 else return QString();
239 qint64
size()
const{
return mitems.size();}
254 QList<MOAItem>mitems;
MOAItem(const MOVoucherAudit &a)
Definition: orderauditdlg_p.h:117
Nullable< QString > audittransaction
Definition: srcMOOrderAudit.h:64
Definition: srcMOVoucherAudit.h:14
QString itemID() const
Definition: orderauditdlg_p.h:175
MOAItem & operator[](int i)
Definition: orderauditdlg_p.h:245
MOAParcel(const MOAItem &i)
Definition: orderauditdlg_p.h:207
Nullable< QString > ticketid
uniquely identifies the ticket, this ID is automatically generated when the ticket is created by the ...
Definition: srcMOTicketAbstract.h:53
QString auditUser() const
Definition: orderauditdlg_p.h:217
MOAItem operator[](int i) const
Definition: orderauditdlg_p.h:244
virtual bool hasValue(QString n)
Definition: orderauditdlg_p.h:126
Nullable< qint64 > audittime
Definition: srcMOOrderAudit.h:60
MOAParcel & operator=(const MOAParcel &p)
Definition: orderauditdlg_p.h:208
bool isSameTransaction(const MOAItem &i) const
Definition: orderauditdlg_p.h:168
MOAItem item(int i) const
Definition: orderauditdlg_p.h:243
Nullable< QString > voucherid
Definition: srcMOVoucherAbstract.h:39
qint64 totalPrice() const
Definition: orderauditdlg_p.h:241
qint64 size() const
Definition: orderauditdlg_p.h:239
MOAItem(const MOTicketAudit &a)
Definition: orderauditdlg_p.h:116
MOAItem(const MOOrderAudit &a)
Definition: orderauditdlg_p.h:115
Definition: orderauditdlg_p.h:111
Definition: orderauditdlg_p.h:102
Definition: orderauditdlg_p.h:111
static QVariant getMetaValue(T *obj, QString n)
Definition: orderauditdlg_p.h:40
Nullable< QString > audituname
Definition: srcMOOrderAudit.h:62
QString auditTransaction() const
Definition: orderauditdlg_p.h:161
This class represents the audit information about an order.
Definition: srcMOOrderAudit.h:15
MOAItem & item(int i)
Definition: orderauditdlg_p.h:246
QString auditUser() const
Definition: orderauditdlg_p.h:155
MOAParcel(const MOAParcel &p)
Definition: orderauditdlg_p.h:206
Definition: orderauditdlg_p.h:62
static bool hasMetaValue(T *obj, QString n)
Definition: orderauditdlg_p.h:23
Definition: orderauditdlg_p.h:111
virtual bool hasValue(QString n)
Definition: orderauditdlg_p.h:65
void setPrice(qint64 p)
Definition: orderauditdlg_p.h:248
MOOrderAudit order() const
Definition: orderauditdlg_p.h:145
ItemType
Definition: orderauditdlg_p.h:111
MOAItem(const MOAItem &i)
Definition: orderauditdlg_p.h:118
qint64 auditTime() const
Definition: orderauditdlg_p.h:213
MOAItem & operator=(const MOAItem &i)
Definition: orderauditdlg_p.h:119
MOAItem()
Definition: orderauditdlg_p.h:114
MOTicketAudit ticket() const
Definition: orderauditdlg_p.h:146
Nullable< qint64 > orderid
Definition: srcMOOrderAudit.h:44
virtual QVariant getValue(QString n)
Definition: orderauditdlg_p.h:135
bool isSameTransaction(const MOAItem &i) const
Definition: orderauditdlg_p.h:226
Definition: orderauditdlg_p.h:111
ItemType itemType() const
Definition: orderauditdlg_p.h:112
virtual QVariant getValue(QString n)
Definition: orderauditdlg_p.h:79
QString itemTypeString() const
Definition: orderauditdlg_p.h:182
QString auditTransaction() const
Definition: orderauditdlg_p.h:221
MOAParcel()
Definition: orderauditdlg_p.h:205
MOVoucherAudit voucher() const
Definition: orderauditdlg_p.h:147
Definition: srcMOTicketAudit.h:14
qint64 auditTime() const
Definition: orderauditdlg_p.h:149
bool addItem(const MOAItem &i)
Definition: orderauditdlg_p.h:232
bool operator<(const MOAParcel &p) const
Definition: orderauditdlg_p.h:251
Definition: orderauditdlg_p.h:196