00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef QLABTICKETLINE_H
00036 #define QLABTICKETLINE_H
00037
00038 #include <qobject.h>
00039 #include <qvariant.h>
00040
00041 class QDateTime ;
00042 class QlabDatabaseCashboxClient ;
00043
00044 class Q_EXPORT QlabTicketLine : public QObject
00045 {
00046 Q_OBJECT
00047
00048 Q_ENUMS( LineTypes )
00049
00050 public :
00051 QlabTicketLine( QObject * parent = 0, char * name = 0 ) ;
00052 ~QlabTicketLine() ;
00060 enum LineTypes { Header = 1, Footer, Line,
00061 Subtotal, Total, GrandTotal,
00062 Rebate, Tax,
00063 Refund, Cashin, Cheque, CreditCard, Moneo,
00064 PrivateCard, Delayed, Coupons, InternalCoupons,
00065 LineCancel, PayCancel, Separator, ChequeExternal,
00066 CashWidthdraw, ChequeWidthdraw, CashCount,
00067 CashCurrency, CashClose, ZipCode } ;
00068
00069 public slots :
00070 QVariant value( const QString & fld ) ;
00071 void setValue( const QString & fld, const QVariant & value ) ;
00072 void setGetField( const QString & fldname ) ;
00073 bool store() ;
00074 bool get( const QVariant & val ) ;
00075 QString lastError() ;
00076
00077 signals :
00091 void itemTypeError( const QString & err ) ;
00092
00093 private slots :
00094 void init() ;
00095
00096 private :
00105 QMap< QString, QVariant> line ;
00106
00111 QString defaultGet ;
00116 bool changed ;
00122 QString dbErr ;
00123
00128 QlabDatabaseCashboxClient * dbc ;
00133 QlabDatabaseCashboxClient * master ;
00134
00135 } ;
00136
00137 #endif // QLABTICKETLINE_H
00138