Diffstat (limited to 'noncore/apps/checkbook/checkbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/noncore/apps/checkbook/checkbook.h b/noncore/apps/checkbook/checkbook.h index 287788a..0260b43 100644 --- a/noncore/apps/checkbook/checkbook.h +++ b/noncore/apps/checkbook/checkbook.h | |||
@@ -1,16 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. | 3 | =. |
4 | .=l. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> | 4 | .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
@@ -23,24 +23,25 @@ | |||
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef CHECKBOOK_H | 29 | #ifndef CHECKBOOK_H |
30 | #define CHECKBOOK_H | 30 | #define CHECKBOOK_H |
31 | 31 | ||
32 | #include "traninfo.h" | 32 | #include "traninfo.h" |
33 | 33 | ||
34 | #include <qdialog.h> | 34 | #include <qdialog.h> |
35 | #include <qlistview.h> | ||
35 | 36 | ||
36 | class OTabWidget; | 37 | class OTabWidget; |
37 | 38 | ||
38 | class Graph; | 39 | class Graph; |
39 | class GraphInfo; | 40 | class GraphInfo; |
40 | class QComboBox; | 41 | class QComboBox; |
41 | class QLabel; | 42 | class QLabel; |
42 | class QLineEdit; | 43 | class QLineEdit; |
43 | class QListView; | 44 | class QListView; |
44 | class QMultiLineEdit; | 45 | class QMultiLineEdit; |
45 | class QString; | 46 | class QString; |
46 | 47 | ||
@@ -56,25 +57,25 @@ class Checkbook : public QDialog | |||
56 | 57 | ||
57 | private: | 58 | private: |
58 | TranInfoList transactions; | 59 | TranInfoList transactions; |
59 | QString name; | 60 | QString name; |
60 | QString filename; | 61 | QString filename; |
61 | QString filedir; | 62 | QString filedir; |
62 | char currencySymbol; | 63 | char currencySymbol; |
63 | int highTranNum; | 64 | int highTranNum; |
64 | 65 | ||
65 | OTabWidget *mainWidget; | 66 | OTabWidget *mainWidget; |
66 | void loadCheckbook(); | 67 | void loadCheckbook(); |
67 | void adjustBalance( float ); | 68 | void adjustBalance( float ); |
68 | TranInfo *findTranByID( int ); | 69 | TranInfo *findTran( const QString &, const QString &, const QString & ); |
69 | 70 | ||
70 | // Info tab | 71 | // Info tab |
71 | QWidget *initInfo(); | 72 | QWidget *initInfo(); |
72 | QLineEdit *nameEdit; | 73 | QLineEdit *nameEdit; |
73 | QComboBox *typeList; | 74 | QComboBox *typeList; |
74 | QLineEdit *bankEdit; | 75 | QLineEdit *bankEdit; |
75 | QLineEdit *acctNumEdit; | 76 | QLineEdit *acctNumEdit; |
76 | QLineEdit *pinNumEdit; | 77 | QLineEdit *pinNumEdit; |
77 | QLineEdit *balanceEdit; | 78 | QLineEdit *balanceEdit; |
78 | QMultiLineEdit *notesEdit; | 79 | QMultiLineEdit *notesEdit; |
79 | float startBalance; | 80 | float startBalance; |
80 | 81 | ||
@@ -96,13 +97,32 @@ class Checkbook : public QDialog | |||
96 | protected slots: | 97 | protected slots: |
97 | void accept(); | 98 | void accept(); |
98 | 99 | ||
99 | private slots: | 100 | private slots: |
100 | void slotNameChanged( const QString & ); | 101 | void slotNameChanged( const QString & ); |
101 | void slotStartingBalanceChanged( const QString & ); | 102 | void slotStartingBalanceChanged( const QString & ); |
102 | void slotNewTran(); | 103 | void slotNewTran(); |
103 | void slotEditTran(); | 104 | void slotEditTran(); |
104 | void slotDeleteTran(); | 105 | void slotDeleteTran(); |
105 | void slotDrawGraph(); | 106 | void slotDrawGraph(); |
106 | }; | 107 | }; |
107 | 108 | ||
109 | class CBListItem : public QListViewItem | ||
110 | { | ||
111 | //Q_OBJECT | ||
112 | |||
113 | public: | ||
114 | CBListItem( QListView *, QString = QString::null, QString = QString::null, | ||
115 | QString = QString::null, QString = QString::null, QString = QString::null, | ||
116 | QString = QString::null, QString = QString::null, QString = QString::null ); | ||
117 | |||
118 | void paintCell( QPainter *, const QColorGroup &, int, int, int ); | ||
119 | |||
120 | private: | ||
121 | QListView *owner; | ||
122 | bool m_known; | ||
123 | bool m_odd; | ||
124 | |||
125 | bool isAltBackground(); | ||
126 | }; | ||
127 | |||
108 | #endif | 128 | #endif |