author | mickeyl <mickeyl> | 2003-10-27 19:51:32 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-27 19:51:32 (UTC) |
commit | 951d1d4125a80dc814f95d2956853bf53ca52e9a (patch) (unidiff) | |
tree | 46c7a70b80a7eebb54cd59c46204c28335f3821c /noncore/apps/checkbook/checkbook.h | |
parent | f0a15a9866f9eddfe10596e63a1e6300b92b9e3f (diff) | |
download | opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.zip opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.tar.gz opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.tar.bz2 |
merge noncore/apps/* except
- advancedfm (ljp, please...)
- odict (tille, please...)
Diffstat (limited to 'noncore/apps/checkbook/checkbook.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/noncore/apps/checkbook/checkbook.h b/noncore/apps/checkbook/checkbook.h index 4a5011b..1b6a2d3 100644 --- a/noncore/apps/checkbook/checkbook.h +++ b/noncore/apps/checkbook/checkbook.h | |||
@@ -26,12 +26,13 @@ | |||
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 <qdatetime.h> | ||
32 | #include <qdialog.h> | 33 | #include <qdialog.h> |
33 | #include <qlistview.h> | 34 | #include <qlistview.h> |
34 | 35 | ||
35 | class OTabWidget; | 36 | class OTabWidget; |
36 | 37 | ||
37 | class CBInfo; | 38 | class CBInfo; |
@@ -43,84 +44,99 @@ class QLabel; | |||
43 | class QLineEdit; | 44 | class QLineEdit; |
44 | class QListView; | 45 | class QListView; |
45 | class QMultiLineEdit; | 46 | class QMultiLineEdit; |
46 | class QString; | 47 | class QString; |
47 | class TranInfo; | 48 | class TranInfo; |
48 | class TranInfoList; | 49 | class TranInfoList; |
50 | class Cfg; | ||
49 | 51 | ||
52 | |||
53 | // --- Checkbook -------------------------------------------------------------- | ||
50 | class Checkbook : public QDialog | 54 | class Checkbook : public QDialog |
51 | { | 55 | { |
52 | Q_OBJECT | 56 | Q_OBJECT |
53 | 57 | ||
54 | public: | 58 | public: |
55 | Checkbook( QWidget * = 0x0, CBInfo * = 0x0, const QString & = "$" ); | 59 | Checkbook( QWidget *, CBInfo *, Cfg *cfg ); |
56 | ~Checkbook(); | 60 | ~Checkbook(); |
57 | 61 | ||
62 | // resort | ||
63 | void resort(); | ||
64 | |||
58 | private: | 65 | private: |
59 | CBInfo *info; | 66 | CBInfo *info; |
60 | TranInfoList *tranList; | 67 | TranInfoList *tranList; |
61 | QString currencySymbol; | 68 | Cfg *_pCfg; |
62 | int highTranNum; | ||
63 | 69 | ||
64 | OTabWidget *mainWidget; | 70 | OTabWidget *mainWidget; |
65 | void loadCheckbook(); | 71 | void loadCheckbook(); |
66 | void adjustBalance(); | 72 | void adjustBalance(); |
67 | TranInfo *findTran( const QString &, const QString &, const QString & ); | ||
68 | 73 | ||
69 | // Info tab | 74 | // Info tab |
70 | QWidget *initInfo(); | 75 | QWidget *initInfo(); |
71 | QCheckBox *passwordCB; | 76 | QCheckBox *passwordCB; |
72 | QLineEdit *nameEdit; | 77 | QLineEdit *nameEdit; |
73 | QComboBox *typeList; | 78 | QComboBox *typeList; |
74 | QLineEdit *bankEdit; | 79 | QLineEdit *bankEdit; |
75 | QLineEdit *acctNumEdit; | 80 | QLineEdit *acctNumEdit; |
76 | QLineEdit *pinNumEdit; | 81 | QLineEdit *pinNumEdit; |
77 | QLineEdit *balanceEdit; | 82 | QLineEdit *balanceEdit; |
78 | QMultiLineEdit *notesEdit; | 83 | QMultiLineEdit *notesEdit; |
84 | int _sortCol; | ||
79 | 85 | ||
80 | // Transactions tab | 86 | // Transactions tab |
81 | QWidget *initTransactions(); | 87 | QWidget *initTransactions(); |
82 | QListView *tranTable; | 88 | QListView *tranTable; |
83 | QLabel *balanceLabel; | 89 | QComboBox *_cbSortType; |
90 | QDate _dLastNew; | ||
84 | 91 | ||
85 | // Charts tab | 92 | // Charts tab |
86 | QWidget *initCharts(); | 93 | QWidget *initCharts(); |
87 | GraphInfo *graphInfo; | 94 | GraphInfo *graphInfo; |
88 | QComboBox *graphList; | 95 | QComboBox *graphList; |
89 | Graph *graphWidget; | 96 | Graph *graphWidget; |
90 | 97 | ||
91 | void drawBalanceChart(); | 98 | void drawBalanceChart(); |
92 | void drawCategoryChart( bool = TRUE ); | 99 | void drawCategoryChart( bool = TRUE ); |
93 | 100 | ||
101 | |||
94 | protected slots: | 102 | protected slots: |
95 | void accept(); | 103 | void accept(); |
104 | void slotTab(QWidget *tab); | ||
96 | 105 | ||
97 | private slots: | 106 | private slots: |
98 | void slotPasswordClicked(); | 107 | void slotPasswordClicked(); |
99 | void slotNameChanged( const QString & ); | 108 | void slotNameChanged( const QString & ); |
100 | void slotStartingBalanceChanged( const QString & ); | 109 | void slotStartingBalanceChanged( const QString & ); |
101 | void slotNewTran(); | 110 | void slotNewTran(); |
102 | void slotEditTran(); | 111 | void slotEditTran(); |
103 | void slotDeleteTran(); | 112 | void slotDeleteTran(); |
104 | void slotDrawGraph(); | 113 | void slotDrawGraph(); |
114 | void slotSortChanged( const QString & ); | ||
105 | }; | 115 | }; |
106 | 116 | ||
117 | // --- CBListItem ------------------------------------------------------------- | ||
107 | class CBListItem : public QListViewItem | 118 | class CBListItem : public QListViewItem |
108 | { | 119 | { |
109 | //Q_OBJECT | 120 | //Q_OBJECT |
110 | 121 | ||
111 | public: | 122 | public: |
112 | CBListItem( QListView *, QString = QString::null, QString = QString::null, | 123 | CBListItem( TranInfo *, QListView *, QString = QString::null, QString = QString::null, |
113 | QString = QString::null, QString = QString::null, QString = QString::null, | 124 | QString = QString::null, QString = QString::null, QString = QString::null, |
114 | QString = QString::null, QString = QString::null, QString = QString::null ); | 125 | QString = QString::null, QString = QString::null, QString = QString::null ); |
115 | 126 | ||
116 | void paintCell( QPainter *, const QColorGroup &, int, int, int ); | 127 | void paintCell( QPainter *, const QColorGroup &, int, int, int ); |
117 | 128 | ||
129 | // --- members | ||
130 | TranInfo *getTranInfo() { return(_pTran); } | ||
131 | |||
118 | private: | 132 | private: |
133 | TranInfo *_pTran; | ||
119 | QListView *owner; | 134 | QListView *owner; |
120 | bool m_known; | 135 | bool m_known; |
121 | bool m_odd; | 136 | bool m_odd; |
122 | 137 | ||
123 | bool isAltBackground(); | 138 | bool isAltBackground(); |
124 | }; | 139 | }; |
125 | 140 | ||
141 | |||
126 | #endif | 142 | #endif |