author | drw <drw> | 2002-10-21 23:04:11 (UTC) |
---|---|---|
committer | drw <drw> | 2002-10-21 23:04:11 (UTC) |
commit | 0b0f3dccd3b6dbb01fd268e2c737fd1a6c163379 (patch) (unidiff) | |
tree | fc39f1647722bb5bc9a935c32567a3da666ae843 /noncore/apps/checkbook/traninfo.h | |
parent | b466b56f8a17010d651f07149ae5b860296ac710 (diff) | |
download | opie-0b0f3dccd3b6dbb01fd268e2c737fd1a6c163379.zip opie-0b0f3dccd3b6dbb01fd268e2c737fd1a6c163379.tar.gz opie-0b0f3dccd3b6dbb01fd268e2c737fd1a6c163379.tar.bz2 |
New version of Checkbook app
Diffstat (limited to 'noncore/apps/checkbook/traninfo.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/traninfo.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/noncore/apps/checkbook/traninfo.h b/noncore/apps/checkbook/traninfo.h new file mode 100644 index 0000000..1743ff7 --- a/dev/null +++ b/noncore/apps/checkbook/traninfo.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | This file is part of the OPIE Project | ||
3 | =. | ||
4 | .=l. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef TRANINFO_H | ||
30 | #define TRANINFO_H | ||
31 | |||
32 | #include <qdatetime.h> | ||
33 | #include <qlist.h> | ||
34 | #include <qstring.h> | ||
35 | |||
36 | class Config; | ||
37 | |||
38 | class TranInfo | ||
39 | { | ||
40 | public: | ||
41 | TranInfo( int = 0, const QString & = 0x0, const QDate & = QDate::currentDate(), | ||
42 | bool = TRUE, const QString & = 0x0, const QString & = 0x0, | ||
43 | float = 0.0, float = 0.0, | ||
44 | const QString & = 0x0, const QString & = 0x0 ); | ||
45 | TranInfo( Config, int ); | ||
46 | |||
47 | int id() const { return i; } | ||
48 | const QString &desc() const { return d; } | ||
49 | const QDate &date() const { return td; } | ||
50 | bool withdrawal()const { return w; } | ||
51 | const QString &type() const { return t; } | ||
52 | const QString &category()const { return c; } | ||
53 | float amount() const { return a; } | ||
54 | float fee() const { return f; } | ||
55 | const QString &number() const { return cn; } | ||
56 | const QString ¬es() const { return n; } | ||
57 | |||
58 | void setDesc( const QString &desc ) { d = desc; } | ||
59 | void setDate( const QDate &date ) { td = date; } | ||
60 | void setWithdrawal( bool withdrawal ){ w = withdrawal; } | ||
61 | void setType( const QString &type ) { t = type; } | ||
62 | void setCategory( const QString &cat ){ c = cat; } | ||
63 | void setAmount( float amount ) { a = amount; } | ||
64 | void setFee( float fee ) { f = fee; } | ||
65 | void setNumber( const QString &num ){ cn = num; } | ||
66 | void setNotes( const QString ¬es ){ n = notes; } | ||
67 | |||
68 | void write( Config *, int ); | ||
69 | |||
70 | private: | ||
71 | int i; | ||
72 | QString d; | ||
73 | QDate td; | ||
74 | bool w; | ||
75 | QString t; | ||
76 | QString c; | ||
77 | float a; | ||
78 | float f; | ||
79 | QString cn; | ||
80 | QString n; | ||
81 | }; | ||
82 | |||
83 | typedef QList<TranInfo> TranInfoList; | ||
84 | |||
85 | #endif | ||