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