00001 /* 00002 * Linux Advanced Business Enterprise Management System 00003 * 00004 * 00005 * File name....... : qlabticketline.h 00006 * File version.... : 1.0.0 00007 * Revision Date... : mardi 27 mai 2003 00008 * 00009 * File Description : Ticket Line Definition Class 00010 * 00011 * Author.......... : DJ Anubis 00012 * Copyright....... : (C) 2001-2003 by DJ Anubis 00013 * Email .......... : labproject@free.fr 00014 * 00015 * License : 00016 * Please read the license file in doc directory. 00017 * 1. Lab Public License. 00018 * You should have received a copy of the Lab Public License with this package. 00019 * If this is not the case, you can read it or download it at: 00020 * http://labproject.free.fr 00021 * 2. Q Public License. 00022 * Conformant to Trolltech QPL license. 00023 * 3. GNU General Public License. 00024 * Reserved for free projects. 00025 * 4. Commercial license. 00026 * Recommanded if your code is not distributed under one of the 3 models above. 00027 * 00028 * Read the license FAQ in doc directory. 00029 * 00030 * Revision Comments: 00031 * This is the class incarnation for the old structure. 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