Diffstat (limited to 'noncore/apps/checkbook/checkbook.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.h | 32 |
1 files changed, 24 insertions, 8 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 | |||
@@ -30,4 +30,5 @@ | |||
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> |
@@ -47,5 +48,8 @@ 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 | { |
@@ -53,17 +57,18 @@ class Checkbook : public QDialog | |||
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 |
@@ -77,9 +82,11 @@ class Checkbook : public QDialog | |||
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 |
@@ -92,6 +99,8 @@ class Checkbook : public QDialog | |||
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: |
@@ -103,6 +112,8 @@ class Checkbook : public QDialog | |||
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 | { |
@@ -110,5 +121,5 @@ class CBListItem : public QListViewItem | |||
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 ); |
@@ -116,5 +127,9 @@ class CBListItem : public QListViewItem | |||
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; |
@@ -124,3 +139,4 @@ class CBListItem : public QListViewItem | |||
124 | }; | 139 | }; |
125 | 140 | ||
141 | |||
126 | #endif | 142 | #endif |