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