Diffstat (limited to 'noncore/apps/checkbook/checkbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/apps/checkbook/checkbook.h b/noncore/apps/checkbook/checkbook.h index e2f0e56..80bc106 100644 --- a/noncore/apps/checkbook/checkbook.h +++ b/noncore/apps/checkbook/checkbook.h | |||
@@ -1,150 +1,149 @@ | |||
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 <drw@handhelds.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 |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
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 <opie2/otabwidget.h> | 32 | #include <opie2/otabwidget.h> |
33 | 33 | ||
34 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
35 | #include <qdialog.h> | 35 | #include <qdialog.h> |
36 | #include <qlistview.h> | 36 | #include <qlistview.h> |
37 | 37 | ||
38 | using Opie::OTabWidget; | ||
39 | 38 | ||
40 | class CBInfo; | 39 | class CBInfo; |
41 | class Graph; | 40 | class Graph; |
42 | class GraphInfo; | 41 | class GraphInfo; |
43 | class QCheckBox; | 42 | class QCheckBox; |
44 | class QComboBox; | 43 | class QComboBox; |
45 | class QLabel; | 44 | class QLabel; |
46 | class QLineEdit; | 45 | class QLineEdit; |
47 | class QListView; | 46 | class QListView; |
48 | class QMultiLineEdit; | 47 | class QMultiLineEdit; |
49 | class QString; | 48 | class QString; |
50 | class TranInfo; | 49 | class TranInfo; |
51 | class TranInfoList; | 50 | class TranInfoList; |
52 | class Cfg; | 51 | class Cfg; |
53 | class QMouseEvent; | 52 | class QMouseEvent; |
54 | 53 | ||
55 | 54 | ||
56 | // --- Checkbook -------------------------------------------------------------- | 55 | // --- Checkbook -------------------------------------------------------------- |
57 | class Checkbook : public QDialog | 56 | class Checkbook : public QDialog |
58 | { | 57 | { |
59 | Q_OBJECT | 58 | Q_OBJECT |
60 | 59 | ||
61 | public: | 60 | public: |
62 | Checkbook( QWidget *, CBInfo *, Cfg *cfg ); | 61 | Checkbook( QWidget *, CBInfo *, Cfg *cfg ); |
63 | ~Checkbook(); | 62 | ~Checkbook(); |
64 | 63 | ||
65 | // resort | 64 | // resort |
66 | void resort(); | 65 | void resort(); |
67 | 66 | ||
68 | // members | 67 | // members |
69 | TranInfoList *getTranList() { return(tranList); } | 68 | TranInfoList *getTranList() { return(tranList); } |
70 | 69 | ||
71 | private: | 70 | private: |
72 | CBInfo *info; | 71 | CBInfo *info; |
73 | TranInfoList *tranList; | 72 | TranInfoList *tranList; |
74 | Cfg *_pCfg; | 73 | Cfg *_pCfg; |
75 | 74 | ||
76 | OTabWidget *mainWidget; | 75 | Opie::Ui::OTabWidget *mainWidget; |
77 | void loadCheckbook(); | 76 | void loadCheckbook(); |
78 | void adjustBalance(); | 77 | void adjustBalance(); |
79 | 78 | ||
80 | // Info tab | 79 | // Info tab |
81 | QWidget *initInfo(); | 80 | QWidget *initInfo(); |
82 | QCheckBox *passwordCB; | 81 | QCheckBox *passwordCB; |
83 | QLineEdit *nameEdit; | 82 | QLineEdit *nameEdit; |
84 | QComboBox *typeList; | 83 | QComboBox *typeList; |
85 | QLineEdit *bankEdit; | 84 | QLineEdit *bankEdit; |
86 | QLineEdit *acctNumEdit; | 85 | QLineEdit *acctNumEdit; |
87 | QLineEdit *pinNumEdit; | 86 | QLineEdit *pinNumEdit; |
88 | QLineEdit *balanceEdit; | 87 | QLineEdit *balanceEdit; |
89 | QMultiLineEdit *notesEdit; | 88 | QMultiLineEdit *notesEdit; |
90 | int _sortCol; | 89 | int _sortCol; |
91 | 90 | ||
92 | // Transactions tab | 91 | // Transactions tab |
93 | QWidget *initTransactions(); | 92 | QWidget *initTransactions(); |
94 | QListView *tranTable; | 93 | QListView *tranTable; |
95 | QComboBox *_cbSortType; | 94 | QComboBox *_cbSortType; |
96 | QDate _dLastNew; | 95 | QDate _dLastNew; |
97 | 96 | ||
98 | // Charts tab | 97 | // Charts tab |
99 | QWidget *initCharts(); | 98 | QWidget *initCharts(); |
100 | GraphInfo *graphInfo; | 99 | GraphInfo *graphInfo; |
101 | QComboBox *graphList; | 100 | QComboBox *graphList; |
102 | Graph *graphWidget; | 101 | Graph *graphWidget; |
103 | 102 | ||
104 | void drawBalanceChart(); | 103 | void drawBalanceChart(); |
105 | void drawCategoryChart( bool = TRUE ); | 104 | void drawCategoryChart( bool = TRUE ); |
106 | 105 | ||
107 | 106 | ||
108 | protected slots: | 107 | protected slots: |
109 | void accept(); | 108 | void accept(); |
110 | void slotTab(QWidget *tab); | 109 | void slotTab(QWidget *tab); |
111 | 110 | ||
112 | private slots: | 111 | private slots: |
113 | void slotPasswordClicked(); | 112 | void slotPasswordClicked(); |
114 | void slotNameChanged( const QString & ); | 113 | void slotNameChanged( const QString & ); |
115 | void slotStartingBalanceChanged( const QString & ); | 114 | void slotStartingBalanceChanged( const QString & ); |
116 | void slotNewTran(); | 115 | void slotNewTran(); |
117 | void slotEditTran(); | 116 | void slotEditTran(); |
118 | void slotMenuTran(QListViewItem *, const QPoint &); | 117 | void slotMenuTran(QListViewItem *, const QPoint &); |
119 | void slotDeleteTran(); | 118 | void slotDeleteTran(); |
120 | void slotDrawGraph(); | 119 | void slotDrawGraph(); |
121 | void slotSortChanged( const QString & ); | 120 | void slotSortChanged( const QString & ); |
122 | }; | 121 | }; |
123 | 122 | ||
124 | 123 | ||
125 | // --- CBListItem ------------------------------------------------------------- | 124 | // --- CBListItem ------------------------------------------------------------- |
126 | class CBListItem : public QListViewItem | 125 | class CBListItem : public QListViewItem |
127 | { | 126 | { |
128 | //Q_OBJECT | 127 | //Q_OBJECT |
129 | 128 | ||
130 | public: | 129 | public: |
131 | CBListItem( TranInfo *, QListView *, QString = QString::null, QString = QString::null, | 130 | CBListItem( TranInfo *, QListView *, QString = QString::null, QString = QString::null, |
132 | QString = QString::null, QString = QString::null, QString = QString::null, | 131 | QString = QString::null, QString = QString::null, QString = QString::null, |
133 | QString = QString::null, QString = QString::null, QString = QString::null ); | 132 | QString = QString::null, QString = QString::null, QString = QString::null ); |
134 | 133 | ||
135 | void paintCell( QPainter *, const QColorGroup &, int, int, int ); | 134 | void paintCell( QPainter *, const QColorGroup &, int, int, int ); |
136 | 135 | ||
137 | // --- members | 136 | // --- members |
138 | TranInfo *getTranInfo() { return(_pTran); } | 137 | TranInfo *getTranInfo() { return(_pTran); } |
139 | 138 | ||
140 | private: | 139 | private: |
141 | TranInfo *_pTran; | 140 | TranInfo *_pTran; |
142 | QListView *owner; | 141 | QListView *owner; |
143 | bool m_known; | 142 | bool m_known; |
144 | bool m_odd; | 143 | bool m_odd; |
145 | 144 | ||
146 | bool isAltBackground(); | 145 | bool isAltBackground(); |
147 | }; | 146 | }; |
148 | 147 | ||
149 | 148 | ||
150 | #endif | 149 | #endif |