summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qashmoney/newtransaction.h
Unidiff
Diffstat (limited to 'noncore/unsupported/qashmoney/newtransaction.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/unsupported/qashmoney/newtransaction.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/noncore/unsupported/qashmoney/newtransaction.h b/noncore/unsupported/qashmoney/newtransaction.h
new file mode 100755
index 0000000..db3a5ad
--- a/dev/null
+++ b/noncore/unsupported/qashmoney/newtransaction.h
@@ -0,0 +1,96 @@
1#ifndef NEWTRANSACTION_H
2#define NEWTRANSACTION_H
3
4#include <qlineedit.h>
5#include <qpushbutton.h>
6#include <qlayout.h>
7#include <qcheckbox.h>
8#include <qdialog.h>
9#include <qlabel.h>
10#include <qstringlist.h>
11#include <qhbox.h>
12#include <qcombobox.h>
13
14#include "transaction.h"
15#include "preferences.h"
16
17class NewTransaction : public QDialog
18{
19 Q_OBJECT
20
21 public:
22
23 int year, month, day;
24
25 NewTransaction ( QWidget* parent );
26 ~NewTransaction();
27
28 QLabel *namelabel;
29 QHBox *transactionnamebox;
30 QComboBox* transactionname;
31 QPushButton* descriptionbutton;
32
33 QLabel *amountlabel;
34 QHBox *transactionamountbox;
35 QLineEdit* transactionamount;
36 QPushButton* calculatorbutton;
37
38 QLabel *datelabel;
39 QHBox *transactiondatebox;
40 QLineEdit* transactiondate;
41 QPushButton* datebutton;
42
43 QCheckBox *clearedcheckbox;
44
45 QLabel *numberlabel;
46 QLineEdit *transactionnumber;
47
48 QLabel *budgetlabel;
49 QComboBox *budgetbox;
50
51 QLabel *lineitemlabel;
52 QComboBox *lineitembox;
53
54 QCheckBox *depositbox;
55
56 QGridLayout *layout;
57
58 int getDay ();
59 int getMonth ();
60 int getYear ();
61 QString getDescription ();
62 void setDescription ( QString );
63 void setComboBoxes ( int, int );
64
65 // When a user edits an transaction and edits the date, this flag
66 // is set to TRUE adding the new date to the transaction. Otherwise,
67 // the old date is used for the edited transaction. This prevents a date
68 // from reverting to 0/0/0 if the date is not edited
69 bool getDateEdited ();
70
71 public slots:
72
73 void showCalculator();
74 void showCalendar ();
75 void addTransactionDescription ();
76 int getNameIndex ( QString name );
77 int getCurrentBudget ();
78 int getCurrentLineItem ();
79 int getBudgetIndex ( int budgetid );
80 int getLineItemIndex ( int lineitemid );
81 void setLineItems ();
82
83 private slots:
84 void setCurrentBudget ( int index );
85 void setCurrentLineItem ( int index );
86
87 private:
88 bool dateedited;
89 int index, currentbudget, currentlineitem;
90 QString transactiondescription;
91 QStringList *budgetnameslist, *budgetidslist;
92 QStringList lineitemslist, lineitemidslist;
93
94};
95
96#endif