Diffstat (limited to 'noncore/apps/checkbook/traninfo.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/traninfo.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/traninfo.h b/noncore/apps/checkbook/traninfo.h index e944c29..e488816 100644 --- a/noncore/apps/checkbook/traninfo.h +++ b/noncore/apps/checkbook/traninfo.h | |||
@@ -36,51 +36,57 @@ | |||
36 | class Config; | 36 | class Config; |
37 | 37 | ||
38 | class TranInfo | 38 | class TranInfo |
39 | { | 39 | { |
40 | public: | 40 | public: |
41 | TranInfo( int = 0, const QString & = 0x0, const QDate & = QDate::currentDate(), | 41 | TranInfo( int = 0, const QString & = 0x0, const QDate & = QDate::currentDate(), |
42 | bool = TRUE, const QString & = 0x0, const QString & = 0x0, | 42 | bool = TRUE, const QString & = 0x0, const QString & = 0x0, |
43 | float = 0.0, float = 0.0, | 43 | float = 0.0, float = 0.0, |
44 | const QString & = 0x0, const QString & = 0x0 ); | 44 | const QString & = 0x0, const QString & = 0x0 ); |
45 | TranInfo( Config, int ); | 45 | TranInfo( Config, int ); |
46 | 46 | ||
47 | int id() const { return i; } | 47 | int id() const { return i; } |
48 | const QString &desc() const { return d; } | 48 | const QString &desc() const { return d; } |
49 | const QDate &date() const { return td; } | 49 | const QDate &date() const { return td; } |
50 | const QString &datestr(); | 50 | const QString &datestr(); |
51 | bool withdrawal()const { return w; } | 51 | bool withdrawal()const { return w; } |
52 | const QString &type() const { return t; } | 52 | const QString &type() const { return t; } |
53 | const QString &category()const { return c; } | 53 | const QString &category()const { return c; } |
54 | float amount() const { return a; } | 54 | float amount() const { return a; } |
55 | float fee() const { return f; } | 55 | float fee() const { return f; } |
56 | const QString &number() const { return cn; } | 56 | const QString &number() const { return cn; } |
57 | const QString ¬es() const { return n; } | 57 | const QString ¬es() const { return n; } |
58 | 58 | ||
59 | void setDesc( const QString &desc ) { d = desc; } | 59 | void setDesc( const QString &desc ) { d = desc; } |
60 | void setDate( const QDate &date ) { td = date; } | 60 | void setDate( const QDate &date ) { td = date; } |
61 | void setWithdrawal( bool withdrawal ){ w = withdrawal; } | 61 | void setWithdrawal( bool withdrawal ){ w = withdrawal; } |
62 | void setType( const QString &type ) { t = type; } | 62 | void setType( const QString &type ) { t = type; } |
63 | void setCategory( const QString &cat ){ c = cat; } | 63 | void setCategory( const QString &cat ){ c = cat; } |
64 | void setAmount( float amount ) { a = amount; } | 64 | void setAmount( float amount ) { a = amount; } |
65 | void setFee( float fee ) { f = fee; } | 65 | void setFee( float fee ) { f = fee; } |
66 | void setNumber( const QString &num ){ cn = num; } | 66 | void setNumber( const QString &num ){ cn = num; } |
67 | void setNotes( const QString ¬es ){ n = notes; } | 67 | void setNotes( const QString ¬es ){ n = notes; } |
68 | 68 | ||
69 | void write( Config *, int ); | 69 | void write( Config *, int ); |
70 | 70 | ||
71 | private: | 71 | private: |
72 | int i; | 72 | int i; |
73 | QString d; | 73 | QString d; |
74 | QDate td; | 74 | QDate td; |
75 | bool w; | 75 | bool w; |
76 | QString t; | 76 | QString t; |
77 | QString c; | 77 | QString c; |
78 | float a; | 78 | float a; |
79 | float f; | 79 | float f; |
80 | QString cn; | 80 | QString cn; |
81 | QString n; | 81 | QString n; |
82 | }; | 82 | }; |
83 | 83 | ||
84 | typedef QList<TranInfo> TranInfoList; | 84 | class TranInfoList : public QList<TranInfo> |
85 | { | ||
86 | protected: | ||
87 | int compareItems( QCollection::Item, QCollection::Item ); | ||
88 | }; | ||
89 | |||
90 | //typedef TranList<TranInfo> TranInfoList; | ||
85 | 91 | ||
86 | #endif | 92 | #endif |